Cannot remove shared image from project.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
New
|
Undecided
|
Unassigned |
Bug Description
I'm sharing out an image to a project. (TEST-PROJECT)
When I remove the image from the project it still shows up in the Horizon Dashboard under the TEST-PROJECT
and from the CLI, it is removed from the shared image list but is still listed in the images for the project.
Am I doing it wrong?
I've tested this with the same results in both Pike and Queens
Create the image:
openstack image create "test-cirros" --file /root/cirros-
+------
| Field | Value |
+------
| checksum | 4bda4108d1a74dd
| container_format | bare |
| created_at | 2018-03-
| disk_format | raw |
| file | /v2/images/
| id | 6cab246b-
| min_disk | 0 |
| min_ram | 0 |
| name | test-cirros |
| owner | 165e500d43ca4d9
| protected | False |
| schema | /v2/schemas/image |
| size | 41126400 |
| status | active |
| tags | |
| updated_at | 2018-03-
| virtual_size | None |
| visibility | shared |
+------
Share the image:
os image add project "test-cirros" TEST-PROJECT
+------
| Field | Value |
+------
| created_at | 2018-03-
| image_id | 6cab246b-
| member_id | b755f30bf7a248f
| schema | /v2/schemas/member |
| status | pending |
| updated_at | 2018-03-
+------
Accept the image:
os image set --project TEST-PROJECT --accept test-cirros
List the member projects:
glance member-list --image-id 6cab246b-
+------
| Image ID | Member ID | Status |
+------
| 6cab246b-
+------
Remove the image from the project:
os image remove project "test-cirros" TEST-PROJECT
tail -90 /var/log/
2018-03-23 14:29:14.224 163251 INFO eventlet.
2018-03-23 14:29:14.293 163251 INFO eventlet.
2018-03-23 14:29:14.303 163251 INFO eventlet.
2018-03-23 14:29:14.365 163251 INFO eventlet.
2018-03-23 14:29:14.452 163251 INFO eventlet.
It is no longer shared:
glance member-list --image-id 6cab246b-
+------
| Image ID | Member ID | Status |
+------
+------
os image show test-cirros
+------
| Field | Value |
+------
| checksum | 4bda4108d1a74dd
| container_format | bare |
| created_at | 2018-03-
| disk_format | raw |
| file | /v2/images/
| id | 6cab246b-
| min_disk | 0 |
| min_ram | 0 |
| name | test-cirros |
| owner | b755f30bf7a248f
| protected | False |
| schema | /v2/schemas/image |
| size | 41126400 |
| status | active |
| tags | |
| updated_at | 2018-03-
| virtual_size | None |
| visibility | shared |
+------
Become the Test Project
source TEST-PROJECT.rc
os image list | grep test-cirros
| 6cab246b-
I can still create an instance:
os server create --flavor m1.medium --image test-cirros --nic net-id=
+------
| Field | Value |
+------
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-
| OS-EXT-
| OS-EXT-
| OS-EXT-STS:vm_state | building |
| OS-SRV-
| OS-SRV-
| accessIPv4 | |
| accessIPv6 | |
| addresses | |
| adminPass | WGkia5JgkY27 |
| config_drive | |
| created | 2018-03-
| flavor | m1.medium (a45f62df-
| hostId | |
| id | d81c851f-
| image | test-cirros (6cab246b-
| key_name | None |
| name | test-cirr-inst |
| progress | 0 |
| project_id | b755f30bf7a248f
| properties | |
| security_groups | name='default' |
| status | BUILD |
| updated | 2018-03-
| user_id | 42afd8026b521a8
| volumes_attached | |
+------