Description of problem: In Havana-3, if Cinder is configured with the NfsDriver, openstack-cinder-volume tries to execute mount directly with sudo instead of through the rootwrap. Version-Release number of selected component (if applicable): openstack-cinder-2013.2-0.8.b3.el6.noarch How reproducible: Unknown. Steps to Reproduce: 1. Setup OpenStack 2. Configure Cinder to use the NfsDriver 3. Try to create a volume Actual results: 2013-09-11 14:55:41.919 8586 INFO cinder.volume.manager [-] Updating volume status 2013-09-11 14:55:41.971 8586 WARNING cinder.volume.drivers.nfs [-] Exception during mounting Unexpected error while running command. Command: sudo mount -t nfs -o rw,sync 192.168.100.30:/nfs/cs2_cinder1 /etc/cinder/volumes/08624ff4b087fa2469aa49ffe177f16a Exit code: 1 Stdout: '' Stderr: 'sudo: no tty present and no askpass program specified\n' Expected results: sudo /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf mount <...> Additional info: Installed with own Puppet manifests, using the stackforge Puppet modules. There's a hopefully correct "rootwrap_config = /etc/cinder/rootwrap.conf" line in /etc/cinder/cinder.conf and /etc/sudeors.d/cinder reads: Defaults:cinder !requiretty cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
Likely introduced by https://review.openstack.org/#/c/43064/ .
I fixed like below. diff -urp -rup cinder-2013.2.b3/cinder/brick/remotefs/remotefs.py cinder-my_2013.2.b3/cinder/brick/remotefs/remotefs.py --- cinder-2013.2.b3/cinder/brick/remotefs/remotefs.py 2013-09-07 00:39:49.000000000 +0900 +++ cinder-my_2013.2.b3/cinder/brick/remotefs/remotefs.py 2013-09-20 12:24:52.450943786 +0900 @@ -60,7 +60,7 @@ class RemoteFsClient(object): self._mount_options = None else: raise exception.ProtocolNotSupported(protocol=mount_type) - self.root_helper = root_helper + self.root_helper = 'sudo cinder-rootwrap %s' % CONF.rootwrap_config self.set_execute(execute) def set_execute(self, execute):
Fixed in 2013.2 release.