glance image-create with --owner only work on tenant ID
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Invalid
|
Undecided
|
Unassigned |
Bug Description
running:
glance image-create --name tenant --disk-format qcow2 --container-format bare --location http://
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2013-09-04T08:55:45 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 52357c0a-
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | tenant |
| owner | dafna |
| protected | False |
| size | 1974140928 |
| status | active |
| updated_at | 2013-09-04T08:55:45 |
+------
will give no errors but the image is not created.
only if I give the ID of the image, the image is created
[root@opens-vdsb ~(keystone_admin)]# glance image-create --name tenant --disk-format qcow2 --container-format bare --location http://
+------
| Property | Value |
+------
| checksum | None |
| container_format | bare |
| created_at | 2013-09-04T08:56:26 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 68df9bcc-
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | tenant |
| owner | e91123ca3572428
| protected | False |
| size | 1974140928 |
| status | active |
| updated_at | 2013-09-04T08:56:27 |
+------
[dron@opens-vdsb /(keystone_admin)]$ glance image-list
+------
| ID | Name | Disk Format | Container Format | Size | Status |
+------
| cf34a754-
| 68df9bcc-
+------
I think we need at least one of the blow fixes to improve glance api:
1. we should be able to create an owned image using tenant name
2. if this will be blocked we should block commnad from running for wrong param supplied.
affects: | glance → python-glanceclient |
affects: | python-glanceclient → glance |
Changed in glance: | |
status: | New → Invalid |
Te client explicitly asks for it to be the tenant ID[0].
What I think it's happening here is that the image is being created correctly but not listed since you created under a tenant w/ id 'tenant' while in the context Glance has a tenant_id.
As a reminder, glance does not check for tenant existence, it assumes the tenant exists and it is an ID.
[0] https:/ /github. com/openstack/ python- glanceclient/ blob/master/ glanceclient/ v1/shell. py#L190