← Back to team overview

openstack team mailing list archive

Glance snapshots of VMs are invisble in horizon and glance image-list

 

Hi all,

When I create a snapshot of a VM, the snapshot just vanishes or is hidden.

*Scenario:*
1. Create a vm with local storage
2. Create a snapshot of the VM after its running succesfully
3. In horizon create a snapshot of the VM
4. You get redirected to Image & Snapshots page but there is no sign of the
snapshot.

*Some more debugging:*


glance image-list
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+
| ID                                   | Name                     | Disk
Format | Container Format | Size    | Status |
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+
| 6d196c6a-b210-45f7-a4ab-4d98e5b2a31b | cirros-0.3.0-x86_64-disk | qcow2
    | bare             | 9761280 | active |
+--------------------------------------+--------------------------+-------------+------------------+---------+--------+

nova image-list
+--------------------------------------+--------------------------+--------+--------------------------------------+
| ID                                   | Name                     | Status
| Server                               |
+--------------------------------------+--------------------------+--------+--------------------------------------+
| 6d196c6a-b210-45f7-a4ab-4d98e5b2a31b | cirros-0.3.0-x86_64-disk | ACTIVE
|                                      |
| 33d37a0b-0c4d-4976-8580-9e7bf8b53776 | test snapshot            | ACTIVE
| 526e1738-1b44-4509-900e-b29beed7e0f7 |
+--------------------------------------+--------------------------+--------+--------------------------------------+

As you can see glance image-list and nova image-list return different
results. The snapshot has in fact
been created correctly as you can see here:
ls /var/lib/glance/images/6d196c6a-b210-45f7-a4ab-4d98e5b2a31b -lh
-rw-r----- 1 glance glance 9.4M Oct 19 14:24
/var/lib/glance/images/6d196c6a-b210-45f7-a4ab-4d98e5b2a31b


*This is the snapshot image detail: *
glance image-show 33d37a0b-0c4d-4976-8580-9e7bf8b53776
+---------------------------+--------------------------------------+
| Property                  | Value                                |
+---------------------------+--------------------------------------+
| Property 'base_image_ref' | 6d196c6a-b210-45f7-a4ab-4d98e5b2a31b |
| Property 'image_location' | snapshot                             |
| Property 'image_state'    | available                            |
| Property 'image_type'     | snapshot                             |
| Property 'instance_uuid'  | 526e1738-1b44-4509-900e-b29beed7e0f7 |
| Property 'owner_id'       | c21b7e53480b497aac6683d618a6b3ce     |
| Property 'user_id'        | 4899e879f62846f1a4926b781a7489f6     |
| checksum                  | 46742031d20be7eabf52e55c9e7bf345     |
| container_format          | bare                                 |
| created_at                | 2012-10-19T06:59:45                  |
| deleted                   | False                                |
| disk_format               | qcow2                                |
| id                        | 33d37a0b-0c4d-4976-8580-9e7bf8b53776 |
| is_public                 | False                                |
| min_disk                  | 0                                    |
| min_ram                   | 0                                    |
| name                      | test snapshot                        |
| protected                 | False                                |
| size                      | 14352384                             |
| status                    | active                               |
| updated_at                | 2012-10-19T06:59:55                  |
+---------------------------+--------------------------------------+
nova image-show 33d37a0b-0c4d-4976-8580-9e7bf8b53776
+-------------------------+--------------------------------------+
| Property                | Value                                |
+-------------------------+--------------------------------------+
| created                 | 2012-10-19T06:59:45Z                 |
| id                      | 33d37a0b-0c4d-4976-8580-9e7bf8b53776 |
| metadata base_image_ref | 6d196c6a-b210-45f7-a4ab-4d98e5b2a31b |
| metadata image_location | snapshot                             |
| metadata image_state    | available                            |
| metadata image_type     | snapshot                             |
| metadata instance_uuid  | 526e1738-1b44-4509-900e-b29beed7e0f7 |
| metadata owner_id       | c21b7e53480b497aac6683d618a6b3ce     |
| metadata user_id        | 4899e879f62846f1a4926b781a7489f6     |
| minDisk                 | 0                                    |
| minRam                  | 0                                    |
| name                    | test snapshot                        |
| progress                | 100                                  |
| server                  | 526e1738-1b44-4509-900e-b29beed7e0f7 |
| status                  | ACTIVE                               |
| updated                 | 2012-10-19T06:59:55Z                 |
+-------------------------+--------------------------------------+

As you can see the image is_public = False, which is correct as this
snapshot should only be visible to the
user who created the snapshot.

*My workaround*:
Make the image public and it works fine (Image can be seen in horizon):
glance image-update 33d37a0b-0c4d-4976-8580-9e7bf8b53776 --is-public=True

Seems this is a big bug or a misconfiguration, but I guess it's a
misconfiguration on my part.
I've attached all my glance configuration files as attachment:
glance-config.tar.gz.
The logs didn't contain errors either.

Really hope somebody can help me in the right direction. Thanks a lot!
Sam

Attachment: glance-config.tar.gz
Description: GNU Zip compressed data


Follow ups