Cannot upload vmdk images due to unsupported vmdk format

Bug #1983279 reported by Alexandre Perreault
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Unassigned

Bug Description

Hi,

We have recently upgraded our platform from ussuri to Yoga. We are now facing a problem that we were not before.

When uploading vmdk images via glance we are now getting this error
glance.common.format_inspector.ImageFormatError: Unsupported VMDK format b'streamOptimized'

Is this normal? Even when we upload a standard vmdk from https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.vmdk we get the error.

We see that this file format_inspector.py did not exist in Ussuri. What is the main reason for calling this file?

We actually do not even use vmdk in our platform. Once they are uploaded to glance we automatically convert them to raw. Now we cannot even upload a vmdk to glance.

This seems to be an issue as we did not have this problem in ussuri.

Let me know if you have any questions.

Regards,

Alex

Revision history for this message
Dan Smith (danms) wrote :

The format inspector should not be causing a failure even if it doesn't understand something about the format. Can you paste full logs with a stack trace?

Revision history for this message
Dan Smith (danms) wrote :
Download full text (4.6 KiB)

Okay I was able to reproduce this:

Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi [None req-2efbee35-6e32-4a2c-b3ce-5e4c448dc428 demo admin] Caught error: Unsupported VMDK format b'streamOptimized': glance.common.format_inspector.ImageFormatError: Unsupported VMDK format b'streamOptimized'
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi Traceback (most recent call last):
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 1286, in __call__
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi action_result = self.dispatch(self.controller, action,
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/common/wsgi.py", line 1325, in dispatch
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi return method(*args, **kwargs)
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/common/utils.py", line 414, in wrapped
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_data.py", line 302, in upload
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi self._restore(image_repo, image)
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi self.force_reraise()
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi raise self.value
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/api/v2/image_data.py", line 162, in upload
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi image.set_data(data, size, backend=backend)
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/opt/stack/glance/glance/notifier.py", line 497, in set_data
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi _send_notification(notify_error, 'image.upload', msg)
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 227, in __exit__
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi self.force_reraise()
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR glance.common.wsgi File "/usr/local/lib/python3.8/dist-packages/oslo_utils/excutils.py", line 200, in force_reraise
Nov 09 07:11:36 ubuntu <email address hidden>[266154]: ERROR gl...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/glance/+/864128

Changed in glance:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/glance/+/864129

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/864128
Committed: https://opendev.org/openstack/glance/commit/199722a65a88f9c28b554b180ec36415ed3a51ac
Submitter: "Zuul (22348)"
Branch: master

commit 199722a65a88f9c28b554b180ec36415ed3a51ac
Author: Dan Smith <email address hidden>
Date: Wed Nov 9 07:33:37 2022 -0800

    Fix unintentional exception inspecting VMDK

    It looks like a raise statement was left in the virtual_size property
    handler for VMDK, which should have been converted to a log at some
    point. All the other inspectors return zero for virtual_size if the
    format does not match or they are unable to parse the data. This
    converts that raise to a log, and adds a test to make sure we make it
    far enough in the processing of the complex VMDK format to ensure that
    behavior.

    Closes-Bug: #1983279

    Change-Id: I0352ab6b2c00055de094ac5902b8d50941d06dcf

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/glance/+/864908

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance/+/864909

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/glance/+/864910

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/glance/+/864912

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/glance/+/864913

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/glance/+/864908
Committed: https://opendev.org/openstack/glance/commit/07f98747a2d4bf65f44348603ecba639d602db4d
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 07f98747a2d4bf65f44348603ecba639d602db4d
Author: Dan Smith <email address hidden>
Date: Wed Nov 9 07:33:37 2022 -0800

    Fix unintentional exception inspecting VMDK

    It looks like a raise statement was left in the virtual_size property
    handler for VMDK, which should have been converted to a log at some
    point. All the other inspectors return zero for virtual_size if the
    format does not match or they are unable to parse the data. This
    converts that raise to a log, and adds a test to make sure we make it
    far enough in the processing of the complex VMDK format to ensure that
    behavior.

    Closes-Bug: #1983279

    Change-Id: I0352ab6b2c00055de094ac5902b8d50941d06dcf
    (cherry picked from commit 199722a65a88f9c28b554b180ec36415ed3a51ac)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/glance/+/864910
Committed: https://opendev.org/openstack/glance/commit/2281c0868e00d0289e4a5c78fbff99f67b5d3d4d
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 2281c0868e00d0289e4a5c78fbff99f67b5d3d4d
Author: Dan Smith <email address hidden>
Date: Wed Nov 9 07:33:37 2022 -0800

    Fix unintentional exception inspecting VMDK

    It looks like a raise statement was left in the virtual_size property
    handler for VMDK, which should have been converted to a log at some
    point. All the other inspectors return zero for virtual_size if the
    format does not match or they are unable to parse the data. This
    converts that raise to a log, and adds a test to make sure we make it
    far enough in the processing of the complex VMDK format to ensure that
    behavior.

    Closes-Bug: #1983279

    Change-Id: I0352ab6b2c00055de094ac5902b8d50941d06dcf
    (cherry picked from commit 199722a65a88f9c28b554b180ec36415ed3a51ac)
    (cherry picked from commit 07f98747a2d4bf65f44348603ecba639d602db4d)
    (cherry picked from commit 323e9f5f93c99121c6ee34e711fb4fd1d191e430)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 26.0.0.0b2

This issue was fixed in the openstack/glance 26.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 23.1.0

This issue was fixed in the openstack/glance 23.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 25.1.0

This issue was fixed in the openstack/glance 25.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/victoria)

Change abandoned by "Cyril Roelandt <email address hidden>" on branch: stable/victoria
Review: https://review.opendev.org/c/openstack/glance/+/864913
Reason: This branch is too old, we will not merge this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/wallaby)

Change abandoned by "Cyril Roelandt <email address hidden>" on branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/glance/+/864912
Reason: This branch is too old, we will not merge this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/864129
Committed: https://opendev.org/openstack/glance/commit/943124ed6c0f2e8caf9ceb296174e71b47fc6f4f
Submitter: "Zuul (22348)"
Branch: master

commit 943124ed6c0f2e8caf9ceb296174e71b47fc6f4f
Author: Dan Smith <email address hidden>
Date: Wed Nov 9 07:47:46 2022 -0800

    Further robustification of format_inspector

    This adds a little more caution around the format_inspector,
    specifically when calling virtual_size in case something very
    unexpected goes wrong to ensure we don't interrupt the upload
    process.

    Change-Id: I14648e7b724b771755cd10fc5f5362a826780dd7
    Related-Bug: #1983279

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/glance/+/864909
Committed: https://opendev.org/openstack/glance/commit/323e9f5f93c99121c6ee34e711fb4fd1d191e430
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 323e9f5f93c99121c6ee34e711fb4fd1d191e430
Author: Dan Smith <email address hidden>
Date: Wed Nov 9 07:33:37 2022 -0800

    Fix unintentional exception inspecting VMDK

    It looks like a raise statement was left in the virtual_size property
    handler for VMDK, which should have been converted to a log at some
    point. All the other inspectors return zero for virtual_size if the
    format does not match or they are unable to parse the data. This
    converts that raise to a log, and adds a test to make sure we make it
    far enough in the processing of the complex VMDK format to ensure that
    behavior.

    Closes-Bug: #1983279

    Change-Id: I0352ab6b2c00055de094ac5902b8d50941d06dcf
    (cherry picked from commit 199722a65a88f9c28b554b180ec36415ed3a51ac)
    (cherry picked from commit 07f98747a2d4bf65f44348603ecba639d602db4d)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 24.2.1

This issue was fixed in the openstack/glance 24.2.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.