Merge "Always upload image volumes in a native thread" into stable/2024.2

This commit is contained in:
Zuul
2025-10-22 14:04:09 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -1128,7 +1128,7 @@ def upload_volume(context: context.RequestContext,
image_id, volume_format, image_meta['disk_format'])
if volume_fd is not None:
image_service.update(context, image_id, {},
volume_fd,
tpool.Proxy(volume_fd),
store_id=store_id,
base_image_ref=base_image_ref)
else:

View File

@@ -1037,9 +1037,9 @@ class TestUploadVolume(test.TestCase):
self.assertFalse(mock_info.called)
mock_chown.assert_not_called()
mock_open.assert_not_called()
mock_proxy.assert_not_called()
mock_proxy.assert_called_once_with(mock.sentinel.volume_fd)
image_service.update.assert_called_once_with(
ctxt, image_meta['id'], {}, mock.sentinel.volume_fd,
ctxt, image_meta['id'], {}, mock_proxy.return_value,
store_id=None, base_image_ref=None)
@mock.patch('cinder.image.accelerator.ImageAccel._get_engine')