image_utils: log message uses incorrect variable

Bug #2008041 reported by Brian Rosmaita
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Winicius Allan

Bug Description

Observed in master (Antelope development), but goes back pretty far in the stable branches.

Example log message:

2023-02-15 15:42:32.242 66 ERROR oslo_messaging.rpc.server ImageUnacceptable: Image 9f9449d8-c56a-4110-b0c0-30dc1f37fb67 is unacceptable: qemu-img is not installed and image is of type False. Only RAW images can be used if qemu-img is not installed.

(Note the "image is of type False" phrase, which is supposed to say what the disk_format of the image is.)

This happens at https://opendev.org/openstack/cinder/src/commit/a92aa06e463f6322e8abdc2f570a801ea82dd1cb/cinder/image/image_utils.py#L661

In the function where this happens, we don't have the image metadata available, and I'm not sure it's worth making a call to glance to get it. The disk format could be passed in to the function, but I'm not sure that gives us really interesting information. So maybe the thing to do is just have one error message here. You can decide how you want to fix it, and reviewers will let you know what they think (or you can ask at the weekly cinder meeting).

Changed in cinder:
assignee: nobody → Winicius Allan (winiciusallan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/904306
Committed: https://opendev.org/openstack/cinder/commit/38cdcc3b47ced3cb14334d953408f8c88c28f00b
Submitter: "Zuul (22348)"
Branch: master

commit 38cdcc3b47ced3cb14334d953408f8c88c28f00b
Author: Winicius Silva <email address hidden>
Date: Sat Dec 23 13:23:18 2023 -0300

    Change log message in get_qemu_data

    The get_qemu_data method in image_utils file raises an exception when
    disk_format is not of type RAW. The message supposed to say what disk type
    are using, but return False instead.

    So i change the log message to something more general, just specifying that
    the disk are being used is not of RAW type.

    Closes-Bug: #2008041
    Change-Id: I5c73b85531897656cb6a9d55391933ce40eb0635

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 24.0.0.0rc1

This issue was fixed in the openstack/cinder 24.0.0.0rc1 release candidate.

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.