Merge "Support Qemu >= 2.10.0 in Quobyte driver"
This commit is contained in:
commit
45254ed56c
|
@ -756,7 +756,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
drv.extend_volume(volume, 3)
|
||||
|
||||
image_utils.qemu_img_info.assert_called_once_with(volume_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
image_utils.resize_image.assert_called_once_with(volume_path, 3)
|
||||
|
||||
|
@ -802,7 +802,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
|
||||
drv._read_info_file.assert_called_once_with(info_path)
|
||||
image_utils.qemu_img_info.assert_called_once_with(snap_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
(image_utils.convert_image.
|
||||
assert_called_once_with(src_vol_path,
|
||||
|
@ -859,7 +859,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
|
||||
drv._read_info_file.assert_called_once_with(info_path)
|
||||
image_utils.qemu_img_info.assert_called_once_with(snap_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
self.assertFalse(image_utils.convert_image.called,
|
||||
("_convert_image was called but should not have been")
|
||||
|
@ -917,7 +917,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
|
||||
drv._read_info_file.assert_called_once_with(info_path)
|
||||
image_utils.qemu_img_info.assert_called_once_with(snap_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
(image_utils.convert_image.
|
||||
assert_called_once_with(
|
||||
|
@ -1001,7 +1001,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
|
||||
drv.get_active_image_from_info.assert_called_once_with(volume)
|
||||
image_utils.qemu_img_info.assert_called_once_with(vol_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
|
||||
self.assertEqual('raw', conn_info['data']['format'])
|
||||
|
@ -1048,7 +1048,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
mock_get_active_image_from_info.assert_called_once_with(volume)
|
||||
mock_local_volume_dir.assert_called_once_with(volume)
|
||||
mock_qemu_img_info.assert_called_once_with(volume_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
mock_upload_volume.assert_called_once_with(
|
||||
mock.ANY, mock.ANY, mock.ANY, upload_path, run_as_root=False)
|
||||
|
@ -1095,7 +1095,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
mock_get_active_image_from_info.assert_called_once_with(volume)
|
||||
mock_local_volume_dir.assert_called_with(volume)
|
||||
mock_qemu_img_info.assert_called_once_with(volume_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
mock_convert_image.assert_called_once_with(
|
||||
volume_path, upload_path, 'raw', run_as_root=False)
|
||||
|
@ -1146,7 +1146,7 @@ class QuobyteDriverTestCase(test.TestCase):
|
|||
mock_get_active_image_from_info.assert_called_once_with(volume)
|
||||
mock_local_volume_dir.assert_called_with(volume)
|
||||
mock_qemu_img_info.assert_called_once_with(volume_path,
|
||||
force_share=False,
|
||||
force_share=True,
|
||||
run_as_root=False)
|
||||
mock_convert_image.assert_called_once_with(
|
||||
volume_path, upload_path, 'raw', run_as_root=False)
|
||||
|
|
|
@ -35,7 +35,7 @@ from cinder import utils
|
|||
from cinder.volume import configuration
|
||||
from cinder.volume.drivers import remotefs as remotefs_drv
|
||||
|
||||
VERSION = '1.1.8'
|
||||
VERSION = '1.1.9'
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -97,6 +97,7 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriverDistributed):
|
|||
1.1.6 - Optimizes volume creation
|
||||
1.1.7 - Support fuse subtype based Quobyte mount validation
|
||||
1.1.8 - Adds optional snapshot merge caching
|
||||
1.1.9 - Support for Qemu >= 2.10.0
|
||||
|
||||
"""
|
||||
|
||||
|
@ -243,9 +244,10 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriverDistributed):
|
|||
LOG.warning("The NAS file permissions mode will be 666 "
|
||||
"(allowing other/world read & write access).")
|
||||
|
||||
def _qemu_img_info(self, path, volume_name):
|
||||
def _qemu_img_info(self, path, volume_name, force_share=True):
|
||||
return super(QuobyteDriver, self)._qemu_img_info_base(
|
||||
path, volume_name, self.configuration.quobyte_mount_point_base)
|
||||
path, volume_name, self.configuration.quobyte_mount_point_base,
|
||||
force_share=True)
|
||||
|
||||
@utils.synchronized('quobyte', external=False)
|
||||
def create_cloned_volume(self, volume, src_vref):
|
||||
|
|
Loading…
Reference in New Issue