Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Permission denied for cinder backed by NFS

Hello,

I setup Kilo OpenStack with RDO package and my cinder-volume is backed with NFS.

When I create a volume, I got a "permission denied" error in /var/log/cinder/volume.log.

  (snip)
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher ProcessExecutionError: Unexpected error while running command.
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Command: truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-
9ce5-49c913088f48
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Exit code: 1
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stdout: u''
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stderr: 'truncate: cannot open '/var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48' for writing: Permission denied\n'

Then I dug in deeper and found I could successfully create a volume MANUALLY using cinder-rootwrap. So I think NFS setting is correct.

sudo cinder-rootwrap /etc/cinder/rootwrap.conf \
 truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48

Did anybody encountered such error?

Permission denied for cinder backed by NFS

Hello,

I setup Kilo OpenStack with RDO package and my cinder-volume is backed with NFS.

When I create a volume, I got a "permission denied" error in /var/log/cinder/volume.log.

  (snip)
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher ProcessExecutionError: Unexpected error while running command.
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Command: truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-
9ce5-49c913088f48
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Exit code: 1
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stdout: u''
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stderr: 'truncate: cannot open '/var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48' for writing: Permission denied\n'

Then I dug in deeper and found I could successfully create a volume MANUALLY using cinder-rootwrap. So I think NFS setting is correct.

sudo cinder-rootwrap /etc/cinder/rootwrap.conf \
 truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48

Did anybody encountered such error?


(added)

I tried chmod the NFS export directory so that others can write to it.I can successfully create a volume now.

# before
rwxr-xr-x    2 root root 4096 12月  3 12:15 test1_cinder
# after
rwxr-xrwx    2 root root 4096 12月  3 12:15 test1_cinder

But I don't think it is an intended behavior. Because I could create a volume on 755 NFS directory in Juno.

Permission denied for cinder backed by NFS

Hello,

I setup Kilo OpenStack with RDO package and my cinder-volume is backed with NFS.

When I create a volume, I got a "permission denied" error in /var/log/cinder/volume.log.

  (snip)
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher ProcessExecutionError: Unexpected error while running command.
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Command: truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-
9ce5-49c913088f48
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Exit code: 1
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stdout: u''
2015-12-03 14:59:36.680 4193 TRACE oslo_messaging.rpc.dispatcher Stderr: 'truncate: cannot open '/var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48' for writing: Permission denied\n'

Then I dug in deeper and found I could successfully create a volume MANUALLY using cinder-rootwrap. So I think NFS setting is correct.

sudo cinder-rootwrap /etc/cinder/rootwrap.conf \
 truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-0e1a4b72-eda6-4b58-9ce5-49c913088f48

Did anybody encountered such error?


(added)

I tried chmod the NFS export directory so that others can write to it.I can successfully create a volume now.

# before
rwxr-xr-x    2 root root 4096 12月  3 12:15 test1_cinder
# after
rwxr-xrwx    2 root root 4096 12月  3 12:15 test1_cinder

But I don't think it is an intended behavior. Because I could create a volume on 755 NFS directory in Juno.


I have found some disparity between Juno and Kilo.

when you create a volume in Juno, cinder-volume log looks like this.

2015-12-03 17:22:52.981 14443 DEBUG cinder.openstack.common.processutils [req-1f2d05 - -] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf truncate -s 1G /var/lib/cinder/mnt/dc4db500da4856a90baf5fc91774dcf0/volume-
10628be4-1e45-4fd9-87e7-4ede3134ba80 execute /usr/lib/python2.7/site-packages/cinder/openstack/common/processutils.py:158

However in Kilo, rootwrap is not used!

2015-12-03 17:26:04.098 11897 DEBUG oslo_concurrency.processutils [req] CMD "truncate -s 1G /var/lib/cinder/mnt/07e2e40cd3318d2c3b7272887a58cd60/volume-393a112a-7ffb-402f-94cc-6a505899f395" returned: 0 in 0.009s execute /usr/li
b/python2.7/site-packages/oslo_concurrency/processutils.py:225

maybe that's why chmod 777 is needed in Kilo, and not in Juno..