[Openstack-operators] [cinder] - some snapshots are there, but they are hidden in the snapshot-list

Saverio Proto zioproto at gmail.com
Wed Mar 16 12:42:03 UTC 2016


Hello there,

I could not believe my eyes today.
We are talking about Cinder in Juno.
So we have a use case where we have to be sure we do snapshots
everyday, so we have a script that tries to do the snapshot in this
way:

while [ `/usr/bin/cinder snapshot-list | grep $DISPLAY_NAME | wc -l` -eq 0 ]; do
    /usr/bin/cinder snapshot-create --force True --display-name
$DISPLAY_NAME $VOLUME_ID >> $LOG_FILE 2>&1
    sleep 5
done

Looking over the log file we noticed that every snapshot required 3 or
4 tries to go through. Digging into the logs I found that I have some
snapshots that are valid, but they do not appear in the snapshot-list.

This is what I mean:

$ cinder snapshot-list | grep d0a750fd-37dd-43ee-87d8-aacbcacc5dc4
$ cinder snapshot-show d0a750fd-37dd-43ee-87d8-aacbcacc5dc4
+--------------------------------------------+--------------------------------------+
|                  Property                  |                Value
             |
+--------------------------------------------+--------------------------------------+
|                 created_at                 |
2016-03-15T23:30:21.000000      |
|            display_description             |                 None
             |
|                display_name                | backup--130-20160316-00:30 |
|                     id                     |
d0a750fd-37dd-43ee-87d8-aacbcacc5dc4 |
|                  metadata                  |                  {}
             |
|  os-extended-snapshot-attributes:progress  |                 100%
             |
| os-extended-snapshot-attributes:project_id |
bdf747f88fee4b5a9faca3da7c26754c   |
|                    size                    |                 2048
             |
|                   status                   |              available
             |
|                 volume_id                  |
34d9a7a5-0383-4e59-8293-e9f9d4989490 |
+--------------------------------------------+--------------------------------------+
$

Very same thing with the latest openstack client

macsp:~ proto$ openstack snapshot list | grep
d0a750fd-37dd-43ee-87d8-aacbcacc5dc4
macsp:~ proto$ openstack snapshot show d0a750fd-37dd-43ee-87d8-aacbcacc5dc4
+--------------------------------------------+--------------------------------------+
| Field                                      | Value
             |
+--------------------------------------------+--------------------------------------+
| created_at                                 |
2016-03-15T23:30:21.000000           |
| description                                | None
             |
| id                                         |
d0a750fd-37dd-43ee-87d8-aacbcacc5dc4 |
| name                                       | backup--130-20160316-00:30 |
| os-extended-snapshot-attributes:progress   | 100%
             |
| os-extended-snapshot-attributes:project_id |
bdf747f88fee4b5a9faca3da7c26754c     |
| properties                                 |
             |
| size                                       | 2048
             |
| status                                     | available
             |
| volume_id                                  |
34d9a7a5-0383-4e59-8293-e9f9d4989490 |
+--------------------------------------------+--------------------------------------+

I checked the entry in the mysql database for this snapshots, they
look exactly identical to other entries where the snapshot appear.

Is this a old Juno bug ?

thank you

Saverio



More information about the OpenStack-operators mailing list