Merge "Removes potentially bad exit value from accepted list in Quobyte volume driver"
This commit is contained in:
commit
dde0bea80c
@ -47,8 +47,7 @@ class QuobyteTestCase(test.NoDBTestCase):
|
||||
mock_ensure_tree.assert_called_once_with(export_mnt_base)
|
||||
expected_commands = [mock.call('mount.quobyte',
|
||||
quobyte_volume,
|
||||
export_mnt_base,
|
||||
check_exit_code=[0, 4])
|
||||
export_mnt_base)
|
||||
]
|
||||
mock_execute.assert_has_calls(expected_commands)
|
||||
mock_exists.assert_called_once_with(" /run/systemd/system")
|
||||
@ -72,8 +71,7 @@ class QuobyteTestCase(test.NoDBTestCase):
|
||||
'--user',
|
||||
'mount.quobyte',
|
||||
quobyte_volume,
|
||||
export_mnt_base,
|
||||
check_exit_code=[0, 4])
|
||||
export_mnt_base)
|
||||
]
|
||||
mock_execute.assert_has_calls(expected_commands)
|
||||
mock_exists.assert_called_once_with(" /run/systemd/system")
|
||||
@ -100,8 +98,7 @@ class QuobyteTestCase(test.NoDBTestCase):
|
||||
quobyte_volume,
|
||||
export_mnt_base,
|
||||
'-c',
|
||||
config_file_dummy,
|
||||
check_exit_code=[0, 4])
|
||||
config_file_dummy)
|
||||
]
|
||||
mock_execute.assert_has_calls(expected_commands)
|
||||
mock_exists.assert_called_once_with(" /run/systemd/system")
|
||||
|
@ -54,7 +54,7 @@ def mount_volume(volume, mnt_base, configfile=None):
|
||||
LOG.debug('Mounting volume %s at mount point %s ...',
|
||||
volume,
|
||||
mnt_base)
|
||||
utils.execute(*command, check_exit_code=[0, 4])
|
||||
utils.execute(*command)
|
||||
LOG.info('Mounted volume: %s', volume)
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ class LibvirtQuobyteVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
|
||||
|
||||
return conf
|
||||
|
||||
@utils.synchronized('connect_volume')
|
||||
@utils.synchronized('connect_qb_volume')
|
||||
def connect_volume(self, connection_info, disk_info, instance):
|
||||
"""Connect the volume."""
|
||||
data = connection_info['data']
|
||||
@ -133,7 +133,7 @@ class LibvirtQuobyteVolumeDriver(fs.LibvirtBaseFileSystemVolumeDriver):
|
||||
|
||||
validate_volume(mount_path)
|
||||
|
||||
@utils.synchronized('connect_volume')
|
||||
@utils.synchronized('connect_qb_volume')
|
||||
def disconnect_volume(self, connection_info, disk_dev, instance):
|
||||
"""Disconnect the volume."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user