Bug 1412246 - openstack-glance: Adding images with the same name should not be allowed. [NEEDINFO]
Summary: openstack-glance: Adding images with the same name should not be allowed.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-glance
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 12.0 (Pike)
Assignee: Cyril Roelandt
QA Contact: Avi Avraham
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 15:37 UTC by Alexander Chuzhoy
Modified: 2017-06-13 16:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-13 16:02:32 UTC
Target Upstream Version:
cyril: needinfo? (ekuvaja)


Attachments (Terms of Use)

Description Alexander Chuzhoy 2017-01-11 15:37:06 UTC
openstack-glance: Adding images with the same name should not be allowed.
Environment:
instack-undercloud-5.1.0-4.el7ost.noarch
openstack-glance-13.0.0-1.el7ost.noarch
puppet-glance-9.4.0-1.el7ost.noarch
python-glanceclient-2.5.0-1.el7ost.noarch
python-glance-store-0.18.0-2.el7ost.noarch
python-glance-13.0.0-1.el7ost.noarch


Steps to reproduce:

[stack@undercloud ~]$ openstack image list
+--------------------------------------+------------------------+--------+
| ID                                   | Name                   | Status |
+--------------------------------------+------------------------+--------+
| fe42e153-c31d-4e11-91c9-09ef2d270a9f | overcloud-full         | active |
| ad2fb62a-4d0e-4d7a-b5cf-3f35da735d9e | overcloud-full.initrd  | active |
| e7ce6320-5ad4-457c-aed7-a9dd799bb6c9 | overcloud-full.vmlinuz | active |
| 8f97c474-7fad-4ea1-82fa-ea110eb502ae | deploy-ramdisk         | active |
| b80c58d0-0bd1-4ed7-9769-aaded6c77116 | deploy-kernel          | active |
| 3dc605d7-c147-4222-936a-5e86d10499cf | bm-deploy-ramdisk      | active |
| f2e646f0-27fc-4bad-bfc8-8abfee2c8992 | bm-deploy-kernel       | active |
| 13d11b11-c08a-4236-9127-2342da91e007 | overcloud-full         | active |
| 8ce8504c-8474-4251-a296-faf1bedf2ddd | overcloud-full-initrd  | active |
| 94e76e3e-0b84-4650-969f-60048db7dafd | overcloud-full-vmlinuz | active |
+--------------------------------------+------------------------+--------+



[stack@undercloud ~]$ DEPLOY_KERNEL=$(openstack image show deploy-kernel -f value -c id)
[stack@undercloud ~]$ DEPLOY_RAMDISK=$(openstack image show deploy-ramdisk -f value -c id)
[stack@undercloud ~]$ openstack image create --file overcloud-full.qcow2 --public --container-format bare --disk-format qcow2 --property kernel_id=$KERNEL_ID --property ramdisk_id=$RAMDISK_ID overcloud-full
+------------------+-----------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                               |
+------------------+-----------------------------------------------------------------------------------------------------+
| checksum         | 130c65bac2bdda47626e764e5affb9cb                                                                    |
| container_format | bare                                                                                                |
| created_at       | 2017-01-11T15:31:54.000000                                                                          |
| deleted          | False                                                                                               |
| deleted_at       | None                                                                                                |
| disk_format      | qcow2                                                                                               |
| id               | b3db0d80-bdea-45c3-aefe-9f7d0e94e1d7                                                                |
| is_public        | True                                                                                                |
| min_disk         | 0                                                                                                   |
| min_ram          | 0                                                                                                   |
| name             | overcloud-full                                                                                      |
| owner            | 78554a1791584ccb997ffcc82a671c96                                                                    |
| properties       | kernel_id='27ec5e9f-65f8-4ff5-a7e2-95f81b392f42', ramdisk_id='6e674c18-c46c-41cf-ba38-eef1fd6428c9' |
| protected        | False                                                                                               |
| size             | 1287809536                                                                                          |
| status           | active                                                                                              |
| updated_at       | 2017-01-11T15:32:33.000000                                                                          |
| virtual_size     | None                                                                                                |
+------------------+-----------------------------------------------------------------------------------------------------+

Running an overcloud deployment later on fails with:
 u'message': u"Failed to run action [action_ex_id=d116ade6-029c-4a4b-ae81-53a5d6131753, action_cls='<class 'mistral.actions.action_factory.DeployStackAction'>', attributes='{}', params='{u'container': u'overcloud', u'timeout': 240}']\n ERROR: Failed to validate: Failed to validate: resources[0]: No images unique match found for {'name': u'overcloud-full'}.",
 u'status': u'FAILED'}

Comment 2 Cyril Roelandt 2017-01-16 14:59:49 UTC
I really do not think this is an issue with glance. Multiple images may have the same name, and some glanceclient commands expect an ID rather than a human readable name for this exact reason (in v2 at least).

The installer adds a constraint on the uniqueness of image names, so I'd say it is up to you and the installer to make sure that no two images share the same name.

Plus, implementing this upstream would probably cause issues with existing installations where multiple images have the same name, so I do not think upstream would really like that. I'm adding Erno to this bug, since he's our upstream specialist. Erno, would you agree with me?

Comment 4 Cyril Roelandt 2017-01-16 17:50:45 UTC
Well, this really does not seem like a Glance bug to me. The whole matter seems triple-o-related to me. Let's wait and see what Erno thinks about this.

Comment 6 Cyril Roelandt 2017-06-13 16:02:32 UTC
So, this bug seems a bit abandonned. Again, it does not feel like a bug to me, and if it is one, it should be fixed upstream (though I don't think it will ever happen). Closing this bug, feel free to re-open if need be.

Comment 7 Alexander Chuzhoy 2017-06-13 16:15:46 UTC
Created an upstream bug:
https://bugs.launchpad.net/glance/+bug/1697728


Note You need to log in before you can comment on or make changes to this bug.