Duplicated image names.

Bug #1310507 reported by Haiyang DING
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned

Bug Description

When I try to create a new image with command "glance image-create", I found that the name of an already existing image can be used to name the new one. For example:

+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| a52c2602-ff9f-471e-b414-52d2c967e728 | cirros-0.3.1-x86_64-uec | ami | ami | 25165824 | active |
| 3c5974ba-5ff9-4d93-9e1f-e0489f1ca85f | cirros-0.3.1-x86_64-uec-kernel | aki | aki | 4955792 | active |
| 793c880f-aeba-419a-b603-cc59959d4c4f | cirros-0.3.1-x86_64-uec-ramdisk | ari | ari | 3714968 | active |
| 366bd9e4-f696-46cd-85c4-5abbed492450 | F17-x86_64-cfntools | qcow2 | bare | 476704768 | active |
| 1a6588c1-282c-4b26-a5fb-82ccb12bf943 | precise-server-img | qcow2 | bare | 258277888 | active |
| 2320f9d3-74c3-410c-a80a-19278f67d67a | precise-server-img | qcow2 | bare | 258277888 | active |
| 3f3f7ca7-999d-497b-a97b-55b5d1d21103 | precise-server-img | qcow2 | bare | 258277888 | active |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+

I have seen a similar report at : https://bugs.launchpad.net/glance/+bug/687949

The answer was "This is by design. We can't expect users to avoid other user's image names..." which I totally agree: users should have their freedom choosing names.

However, I think we can make it better since this has some negative impacts on other actions. For instance,

1. "heat stack-create" requires the name of a image while duplicated image name(s) would cause an error.
2. Inconvenience is also found when deleting such image(s), since one would have to use "ID" instead of "Name".
3. Moreover when a user creates a image without checking if there is any duplicates, he would run into trouble afterwards since it requires some extra efforts to distinguish "his image" from the duplicated one(s).

So, I think we should at least warn the users when they try to create image with existing image name(s) and (maybe) give them a chance to rename the image before further action is actually carried out. Using duplicated name is still allowed.

What do you think?

This is my first time proposing anything here. Any suggestion is welcome.

Thank you.

Best regards.

Revision history for this message
Erno Kuvaja (jokke) wrote :

Thanks Haiyang,

Please find my 2cents for the points you raised below:
1) I think this is a bug in heat then, is there a bug open?
2) yes the ID is the unique identifier of the image and should be used on image operations. I do not see how we could change that without breaking something in fundamentals discussed around it already.
3) I do dislike this as long as having duplicate naming is perfectly fine on systems perspective and that would teach the users to wrong direction. We definitely do not want to check the image names globally and tell the user if the name exists anywhere in the database, and verifying that against the users own images would be pointless. If the user want's to avoid duplicate naming on images (s)he has access, the best way to do it is to check the image names in use before creating a new one. Personally I think adding extra warning/confirmation request would annoy more users than help avoiding annoyance.

Thanks for thinking about this and bringing ideas on the table rather than coming up with a bug "Duplicate image names - I don't like this" style of approach. Please do continue doing that as the above are just my personal opinions ;)

Changed in glance:
status: New → Invalid
Revision history for this message
Haiyang DING (dinghaiyang) wrote :

To Erno Kuvaja:

Hi,

Thank you for your reply and I am going to take the 2 cents with pleasure (I googled '2 cents' since English is not my first language).

After reading your post, I find my post (which can hardly be called a 'proposition') lacks serious thoughts on either the fundamentals of OpenStack (your 2nd point ) or the user's behavior (your 3rd point) . I think I have to learn more about OpenStack and the community and bring up something more constructively next time.

I am going to close this bug report by marking it as 'invalid'.

In the end, thank you, again, for your opinion. I have just started working on OpenStack and your post means much to me.

Best regards.

Haiyang

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.