Merge "Removes potentially bad exit value from accepted list in Quobyte volume driver"

This commit is contained in:
Jenkins 2017-06-30 12:21:19 +00:00 committed by Gerrit Code Review
commit dde0bea80c
2 changed files with 6 additions and 9 deletions

View File

@ -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")

View File

@ -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."""