openstack-glance: Adding images with the same name should not be allowed.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Opinion
|
Undecided
|
Unassigned |
Bug Description
openstack-glance: Adding images with the same name should not be allowed.
Environment:
instack-
openstack-
puppet-
python-
python-
python-
Steps to reproduce:
[stack@undercloud ~]$ openstack image list
+------
| ID | Name | Status |
+------
| fe42e153-
| ad2fb62a-
| e7ce6320-
| 8f97c474-
| b80c58d0-
| 3dc605d7-
| f2e646f0-
| 13d11b11-
| 8ce8504c-
| 94e76e3e-
+------
[stack@undercloud ~]$ DEPLOY_
[stack@undercloud ~]$ DEPLOY_
[stack@undercloud ~]$ openstack image create --file overcloud-
+------
| Field | Value |
+------
| checksum | 130c65bac2bdda4
| container_format | bare |
| created_at | 2017-01-
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | b3db0d80-
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | overcloud-full |
| owner | 78554a1791584cc
| properties | kernel_
| protected | False |
| size | 1287809536 |
| status | active |
| updated_at | 2017-01-
| virtual_size | None |
+------
Running an overcloud deployment later on fails with:
u'message': u"Failed to run action [action_
u'status': u'FAILED'}
Glance image ids (eg b3db0d80- bdea-45c3- aefe-9f7d0e94e1 d7) are globally unique.
Image names are not unique. This is by design, and I don't think it's something we want to change.
If I remember correctly, you can provide either a *name* or an *id* to the "openstack client".
The difference is that
* a name will work if you are lucky and it is unique
whereas
* an id will always work
For this reason, things that need to work reliably should work with ids rather than names.