image_utils: log message uses incorrect variable

Bug #2008041 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Triaged
Low
Unassigned

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).

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.