Disables xattrs on Quobyte driver mounts

After removing xattr usage in the previous change
this explicitely disables xattrs on the mounts.
Also two minor comment corrections are added.

Closes-Bug: 1659328

Change-Id: I33c9eee0be817b549b1dcaadaa415365ec48a074
This commit is contained in:
Silvan Kaiser
2017-02-17 10:27:03 +01:00
parent 81ece6a9f2
commit 6ee83f53b8
2 changed files with 8 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ class QuobyteDriverTestCase(test.TestCase):
mkdir_call = mock.call('mkdir', '-p', self.TEST_MNT_POINT)
mount_call = mock.call(
'mount.quobyte', self.TEST_QUOBYTE_VOLUME,
'mount.quobyte', '--disable-xattrs', self.TEST_QUOBYTE_VOLUME,
self.TEST_MNT_POINT, run_as_root=False)
mock_execute.assert_has_calls(
@@ -181,7 +181,7 @@ class QuobyteDriverTestCase(test.TestCase):
mkdir_call = mock.call('mkdir', '-p', self.TEST_MNT_POINT)
mount_call = mock.call(
'mount.quobyte', self.TEST_QUOBYTE_VOLUME,
'mount.quobyte', '--disable-xattrs', self.TEST_QUOBYTE_VOLUME,
self.TEST_MNT_POINT, run_as_root=False)
mock_execute.assert_has_calls([mkdir_call, mount_call],
any_order=False)
@@ -212,7 +212,7 @@ class QuobyteDriverTestCase(test.TestCase):
mkdir_call = mock.call('mkdir', '-p', self.TEST_MNT_POINT)
mount_call = mock.call(
'mount.quobyte', self.TEST_QUOBYTE_VOLUME,
'mount.quobyte', '--disable-xattrs', self.TEST_QUOBYTE_VOLUME,
self.TEST_MNT_POINT, run_as_root=False)
mock_execute.assert_has_calls([mkdir_call, mount_call],
any_order=False)
@@ -1006,7 +1006,7 @@ class QuobyteDriverTestCase(test.TestCase):
part_mock.return_value = self.get_mock_partitions()
drv = self._driver
# As this uses a local fs dir size is >0, raising an exception
# As this uses a local fs the dir size is >0, raising an exception
self.assertRaises(
exception.VolumeDriverException,
drv._validate_volume,

View File

@@ -31,7 +31,7 @@ from cinder import interface
from cinder import utils
from cinder.volume.drivers import remotefs as remotefs_drv
VERSION = '1.1.1'
VERSION = '1.1.3'
LOG = logging.getLogger(__name__)
@@ -82,6 +82,7 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriverDistributed):
1.1 - Adds optional insecure NAS settings
1.1.1 - Removes getfattr calls from driver
1.1.2 - Fixes a bug in the creation of cloned volumes
1.1.3 - Explicitely mounts Quobyte volumes w/o xattrs
"""
@@ -450,7 +451,8 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriverDistributed):
if not os.path.isdir(mount_path):
self._execute('mkdir', '-p', mount_path)
command = ['mount.quobyte', quobyte_volume, mount_path]
command = ['mount.quobyte', '--disable-xattrs',
quobyte_volume, mount_path]
if self.configuration.quobyte_client_cfg:
command.extend(['-c', self.configuration.quobyte_client_cfg])