Merge "Remove default root_helper of sudo for remotefs"
This commit is contained in:
commit
4925c1a73a
@ -780,8 +780,8 @@ class RemoteFsConnector(InitiatorConnector):
|
||||
|
||||
def __init__(self, mount_type, root_helper, driver=None,
|
||||
execute=putils.execute, *args, **kwargs):
|
||||
self._remotefsclient = remotefs.RemoteFsClient(mount_type,
|
||||
execute, root_helper)
|
||||
self._remotefsclient = remotefs.RemoteFsClient(mount_type, root_helper,
|
||||
execute=execute)
|
||||
super(RemoteFsConnector, self).__init__(root_helper, driver=driver,
|
||||
execute=execute, *args,
|
||||
**kwargs)
|
||||
|
@ -48,8 +48,8 @@ CONF.register_opts(remotefs_client_opts)
|
||||
|
||||
class RemoteFsClient(object):
|
||||
|
||||
def __init__(self, mount_type, execute=putils.execute,
|
||||
root_helper="sudo", *args, **kwargs):
|
||||
def __init__(self, mount_type, root_helper,
|
||||
execute=putils.execute, *args, **kwargs):
|
||||
|
||||
self._mount_type = mount_type
|
||||
if mount_type == "nfs":
|
||||
|
@ -34,7 +34,7 @@ class BrickRemoteFsTestCase(test.TestCase):
|
||||
def setUp(self):
|
||||
super(BrickRemoteFsTestCase, self).setUp()
|
||||
self._mox = mox.Mox()
|
||||
self._nfsclient = remotefs.RemoteFsClient('nfs')
|
||||
self._nfsclient = remotefs.RemoteFsClient('nfs', 'sudo')
|
||||
self._nfsclient._mount_options = None
|
||||
self._nfsclient._mount_base = self.TEST_MNT_BASE
|
||||
self.addCleanup(self._mox.UnsetStubs)
|
||||
|
@ -26,6 +26,7 @@ from cinder.image import image_utils
|
||||
from cinder.openstack.common import log as logging
|
||||
from cinder.openstack.common import processutils as putils
|
||||
from cinder import units
|
||||
from cinder import utils
|
||||
from cinder.volume import driver
|
||||
|
||||
VERSION = '1.1.0'
|
||||
@ -359,7 +360,9 @@ class NfsDriver(RemoteFsDriver):
|
||||
self._remotefsclient = None
|
||||
super(NfsDriver, self).__init__(*args, **kwargs)
|
||||
self.configuration.append_config_values(volume_opts)
|
||||
self._remotefsclient = remotefs.RemoteFsClient('nfs', execute)
|
||||
root_helper = utils.get_root_helper()
|
||||
self._remotefsclient = remotefs.RemoteFsClient('nfs', root_helper,
|
||||
execute=execute)
|
||||
|
||||
def set_execute(self, execute):
|
||||
super(NfsDriver, self).set_execute(execute)
|
||||
|
Loading…
Reference in New Issue
Block a user