glance image-show <name> does not work

Bug #1605287 reported by Cyril Roelandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Cyril Roelandt

Bug Description

In v2, one cannot run "glance image-show <name>".

$ glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 38ad91fe-d433-4322-b658-5402f801861a | cirros-0.3.4-x86_64-uec |
| d258921f-a88d-4605-b34d-dde621347577 | cirros-0.3.4-x86_64-uec-kernel |
| dc0797db-ade5-45e8-892b-bfe0f4ae1eca | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+

$ glance image-show cirros-0.3.4-x86_64-uec
404 Not Found
No image found with ID cirros-0.3.4-x86_64-uec
    (HTTP 404)

This used to work in v1.

Changed in python-glanceclient:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/345541

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
Erno Kuvaja (jokke) wrote :

Hi Cyril,

As image name is not unique property (or even mandatory) it was decided not to allow using it as key either.

If we have two or more images with name "cirros-0.3.4-x86_64-uec" what this command should return? Randomly one of them, all of them or error?

Changed in python-glanceclient:
status: In Progress → Invalid
Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

It should return an error, stating that more than one image have the requested name and that the user should re-run the command with an ID. Human beings would rather use human-readable names for their images instead of a UUID, imho. I have a downstream bug where a user feels like this is a regression from v1.

What do you think?

Revision history for this message
Ian Cordasco (icordasc) wrote :

Hi Cyril,

I just found your review and followed it back here as this was closed as invalid before I saw it.

I've only been thinking about this for a little bit, but here's where I'm coming from:

Right now the image-show command relies on being provided an Image UUID to find the right item. This means that you're making a request and passing cirros-0.3.4-x86_64-uec as a UUID and a 404 response is *technically* the correct behaviour.

I believe the decision to limit searching to just UUID was perhaps not the best one. That said, I don't think retro-fitting name searching into image-show is the right answer either.

**If** we were to agree as a team to add things back, then I would prefer this functionality be provided via a --name flag. I know that's still different from v1 behaviour but it at least highlights exactly what's happening for the user and --name's documentation can point out exactly how inefficient it might be.

Does that make sense?

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

Not to sidetrack the interesting conversation but I wonder if we should add functionality to glanceclient or work on improving osc (given we will have to get rid of the glanceclient soon-ish).

Thoughts? What do your end-users feel (or is this anticipation)?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

Change abandoned by Ian Cordasco (<email address hidden>) on branch: master
Review: https://review.openstack.org/345541
Reason: The bug was marked as invalid. This has been blocked for a while.

There has been no progress on the bug since: https://bugs.launchpad.net/python-glanceclient/+bug/1605287

As such, I'm abandoning this until Cyril can work with us to improve this User Experience in a better way.

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.