glance image creation throws non-fatal 404 errors

Bug #1367600 reported by Adam Gandelman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Raga lahari
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

Noticed this in devstack runs, shows up locally as well. Anytime an image is uploaded to glance via openstack client, a 404 error is output, tho the command succeeds and the image is successfully created.:

+ openstack image create cirros --public --container-format ami --disk-format ami --property kernel_id=7ccb8a73-58d6-4113-815d-2027e56a4e33 --property ramdisk_id=46ed6e8b-0491-4c79-8e73-34c3aa557265 --file cirros-0.3.2-x86_64-blank.img
ERROR: glanceclient.common.http Request returned failure status 404.

And this shows up during devstack runs in the gate:

http://logstash.openstack.org/#eyJzZWFyY2giOiJtZXNzYWdlOlwiZ2xhbmNlY2xpZW50LmNvbW1vbi5odHRwIFJlcXVlc3QgcmV0dXJuZWQgZmFpbHVyZSBzdGF0dXMgNDA0LlwiIiwiZmllbGRzIjpbXSwib2Zmc2V0IjowLCJ0aW1lZnJhbWUiOiI0MzIwMCIsImdyYXBobW9kZSI6ImNvdW50IiwidGltZSI6eyJ1c2VyX2ludGVydmFsIjowfSwic3RhbXAiOjE0MTAzMzIwMjc5NzZ9

summary: - glance image creation throws non-fatal 404 errosr
+ glance image creation throws non-fatal 404 errors
Revision history for this message
Steve Martinelli (stevemar) wrote :

So in openstackclient, we try to GET the image first, as indicated here:

https://github.com/openstack/python-openstackclient/blob/master/openstackclient/image/v1/image.py#L228-L244

We successfully catch the exception, but it seems that glanceclient logs the error as well.

https://github.com/openstack/python-glanceclient/blob/master/glanceclient/common/http.py#L220

Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: New → Invalid
Changed in python-glanceclient:
assignee: nobody → Sridevi (sridevi-maddipati)
Revision history for this message
Sridevi (sridevi-maddipati) wrote :

An if condition can be introduced in the def get() present in the /opt/stack/python-glanceclient/
glanceclient/v1/images.py. It checks whether the entered value is id or name of an image. If it is id,
request is sent else it goes back to the find_resource function present in /opt/stack/python-openstackclient/openstackclient/common/utils.py.

But the test cases are getting failed since the test input doesn't have the format of an id(32 digits). It is only single digit.

Changed in python-glanceclient:
assignee: Sridevi (sridevi-maddipati) → nobody
Changed in python-glanceclient:
assignee: nobody → Raga lahari (raga-lahari)
Revision history for this message
Ian Cordasco (icordasc) wrote :

Marking this as an opinion. I don't quite see the value in this, and others haven't seen it as something worth working on. I'm leaving the blueprint open in the hopes that it might find others who can elaborate and fill out some use-case descriptions for it.

Changed in python-glanceclient:
status: New → Opinion
status: Opinion → Invalid
Revision history for this message
Ian Cordasco (icordasc) wrote :

Excuse my last comment. That was meant for a different bug. This no longer seems to be valid.

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.