All images have no Project

Asked by Lingfeng Xiong on 2015-12-29

I deployed glance (liberty) on Debian Stretch from Debian's official repo.
Now glance works, I can upload images and start VMs. But when user create a image, or take a snapshot, the image has no 'Project' attribute. Which makes the image invisible for anyone other than admin.

For example, the following is a snapshot taken from a normal user:

$ glance image-show 6ba66f20-2256-4cec-a996-1af9e56ecea0
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| architecture | x86_64 |
| checksum | 8b09f18144c38132d425a4c9c8ed99de |
| clean_attempts | 3 |
| container_format | bare |
| created_at | 2015-12-29T06:21:01Z |
| disk_format | qcow2 |
| id | 6ba66f20-2256-4cec-a996-1af9e56ecea0 |
| image_location | snapshot |
| image_state | available |
| image_type | snapshot |
| instance_uuid | f9c953f7-8474-4900-a259-9343a8d3af70 |
| kernel_id | None |
| min_disk | 20 |
| min_ram | 0 |
| name | debian-stretch-mysql-test |
| owner | None |
| owner_id | cd86f12a9b0245f2a93c93d476f4b39e |
| protected | False |
| ramdisk_id | None |
| size | 1728249856 |
| status | active |
| tags | [] |
| updated_at | 2015-12-29T06:21:58Z |
| user_id | bfa5b570d4544c09b78fd8522753ece5 |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+

The owner_id is the correct tenant id that the VM belongs to. But the snapshot is invisible in dashboard for that user.

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
2015-12-29
Last reply:
2016-05-10
Lingfeng Xiong (xionglingfeng) said : #1

It seems that owner is not correctly set. It always be NULL in database.
However, if I manually change it to the tenant id, run "glance image-list" with corresponding user can correctly show the image, but horizon still not.

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

This could happen if you haven't configured keystone in your wsgi pipeline.

In your glance-api.conf file, what does this section look like:

 [paste_deploy]
 flavor = xxxx

to have keystone you'll need something like

look at glance-api-paste.ini to see valid values for 'flavor'.

Solved in the above comment.