Don't pass disk_format or container_format to image task upload
In task upload we update the image properties after importing the image. Attempting to set disk_format/container_format at that point is not the right choice in life. Depends-On: https://review.openstack.org/613438 Change-Id: I3b086e83514a71cea0bb4119d75c48c153099141
This commit is contained in:
parent
448cda91e3
commit
c080f5a2af
@ -4973,12 +4973,13 @@ class _OpenStackCloudMixin(_normalize.Normalizer):
|
||||
self, name, filename,
|
||||
wait, timeout, meta, **image_kwargs):
|
||||
|
||||
properties = image_kwargs['properties']
|
||||
properties = image_kwargs.pop('properties', {})
|
||||
md5 = properties[self._IMAGE_MD5_KEY]
|
||||
sha256 = properties[self._IMAGE_SHA256_KEY]
|
||||
container = properties[self._IMAGE_OBJECT_KEY].split('/', 1)[0]
|
||||
properties = image_kwargs.pop('properties', {})
|
||||
image_kwargs.update(properties)
|
||||
image_kwargs.pop('disk_format', None)
|
||||
image_kwargs.pop('container_format', None)
|
||||
|
||||
self.create_container(container)
|
||||
self.create_object(
|
||||
|
@ -487,6 +487,7 @@ class TestImage(BaseTestImage):
|
||||
|
||||
self.cloud.create_image(
|
||||
self.image_name, self.imagefile.name, wait=True, timeout=1,
|
||||
disk_format='vhd', container_format='ovf',
|
||||
is_public=False, container=self.container_name)
|
||||
|
||||
self.assert_calls()
|
||||
|
6
releasenotes/notes/fix-image-task-ae79502dd5c7ecba.yaml
Normal file
6
releasenotes/notes/fix-image-task-ae79502dd5c7ecba.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed a regression in image upload when the cloud uses the task
|
||||
upload method. A refactor led to attempting to update the disk_format
|
||||
and container_format values after the image had been imported.
|
Loading…
Reference in New Issue
Block a user