It appears that, with privsep enabled, RemoteFS doesn't work properly for NFS. With the release of os-brick 1.5.0 we started seeing the following failure:
016-08-05 18:06:37.180 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Running cmd (subprocess): mkdir -p /var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0 execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:344
2016-08-05 18:06:37.185 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] CMD "mkdir -p /var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0" returned: 0 in 0.005s execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:374
2016-08-05 18:06:37.185 35383 DEBUG os_brick.remotefs.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] JSBRYANT: mnt_cmd is ['mount', '-t', 'nfs', '-o', 'rw,vers=4', '10.2.125.7:/SL01SEV316090_1', '/var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0'] _do_mount /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/os_brick/remotefs/remotefs.py:124
2016-08-05 18:06:37.186 35383 INFO oslo.privsep.daemon [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Running privsep helper: ['sudo', 'cinder-rootwrap', '/etc/cinder/rootwrap.conf', 'privsep-helper', '--config-file', '/etc/cinder/cinder.conf', '--config-dir', ['/etc/cinder'], '--privsep_context', 'os_brick.privileged.default', '--privsep_sock_path', '/tmp/tmpjPxFIy/privsep.sock']
2016-08-05 18:06:37.201 35383 DEBUG os_brick.remotefs.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Failed to do nfs mount. _mount_nfs /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/os_brick/remotefs/remotefs.py:145
2016-08-05 18:06:37.202 35383 DEBUG cinder.volume.drivers.nfs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Mount attempt 1 failed: NFS mount failed for share 10.2.125.7:/SL01SEV316090_1. Error - {'nfs': u'execv() arg 2 must contain only strings'}.
Retrying mount ... _ensure_share_mounted /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/volume/drivers/nfs.py:164
2016-08-05 18:06:38.203 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Running cmd (subprocess): mount execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:344
2016-08-05 18:06:38.209 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] CMD "mount" returned: 0 in 0.006s execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:374
2016-08-05 18:06:38.210 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Running cmd (subprocess): mkdir -p /var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0 execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:344
2016-08-05 18:06:38.216 35383 DEBUG oslo_concurrency.processutils [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] CMD "mkdir -p /var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0" returned: 0 in 0.006s execute /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/oslo_concurrency/processutils.py:374
2016-08-05 18:06:38.217 35383 DEBUG os_brick.remotefs.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] JSBRYANT: mnt_cmd is ['mount', '-t', 'nfs', '-o', 'rw,vers=4', '10.2.125.7:/SL01SEV316090_1', '/var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0'] _do_mount /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/os_brick/remotefs/remotefs.py:124
2016-08-05 18:06:38.218 35383 INFO oslo.privsep.daemon [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Running privsep helper: ['sudo', 'cinder-rootwrap', '/etc/cinder/rootwrap.conf', 'privsep-helper', '--config-file', '/etc/cinder/cinder.conf', '--config-dir', ['/etc/cinder'], '--privsep_context', 'os_brick.privileged.default', '--privsep_sock_path', '/tmp/tmpJU2WgV/privsep.sock']
2016-08-05 18:06:38.233 35383 DEBUG os_brick.remotefs.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Failed to do nfs mount. _mount_nfs /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/os_brick/remotefs/remotefs.py:145
2016-08-05 18:06:38.234 35383 ERROR cinder.volume.drivers.nfs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Mount failure for 10.2.125.7:/SL01SEV316090_1 after 3 attempts.
2016-08-05 18:06:38.235 35383 ERROR cinder.volume.drivers.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Exception during mounting NFS mount failed for share 10.2.125.7:/SL01SEV316090_1. Error - {'nfs': u'execv() arg 2 must contain only strings'}
2016-08-05 18:06:38.235 35383 DEBUG cinder.volume.drivers.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Available shares [] _ensure_shares_mounted /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/volume/drivers/remotefs.py:279
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Failed to initialize driver.
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager Traceback (most recent call last):
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager File "/opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/volume/manager.py", line 388, in init_host
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager self.driver.do_setup(ctxt)
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager File "/opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/volume/drivers/nfs.py", line 144, in do_setup
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager self.set_nas_security_options(self._is_voldb_empty_at_startup)
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager File "/opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/volume/drivers/nfs.py", line 342, in set_nas_security_options
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager raise exception.NfsNoSharesMounted()
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager NfsNoSharesMounted: No mounted NFS shares found
2016-08-05 18:06:38.236 35383 ERROR cinder.volume.manager
2016-08-05 18:06:38.238 35383 DEBUG cinder.service [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Creating RPC server for service cinder-volume start /opt/bbc/openstack-11.0-master/cinder/local/lib/python2.7/site-packages/cinder/service.py:232
The root of the problem is here:
2016-08-05 18:06:38.235 35383 ERROR cinder.volume.drivers.remotefs [req-88f40bc4-b88b-4ae8-85a0-735250e0eadd - - - - -] Exception during mounting NFS mount failed for share 10.2.125.7:/SL01SEV316090_1. Error - {'nfs': u'execv() arg 2 must contain only strings'}
For some reason execv thinks we are sending an integer instead of a string. The command that is being sent:
['mount', '-t', 'nfs', '-o', 'rw,vers=4', '10.2.125.7:/SL01SEV316090_1', '/var/lib/cinder/mnt/5fd17b88c08c2759966c40234dfd10c0']
Not sure why one of those arguments is being interpreted as a non-string.
If we force the RemoteFS driver to use rootwrap instead, we don't see this problem.
os-brick will need to be fixed.
What version of oslo.rootwrap do you have installed? 5.0.0?