When volume snapshot has at least one clone (not flattened child in CEPH reference or from Openstack perspective this is volume created from snapshot) it is not possible to delete this snapshot till you don't perform flatten procedure for rbd image. This is OK, but the issue is that Horizon doesn't reports an error - only "Successfully scheduled". The same behavior if you try to delete from cli.
Steps to reproduce:
1) Create volume (glance image doesn't matter)
2) Create snapshot from volume
3) Create volume from snapshot, that you created at step2
4) Try to delete snapshot
Expected results:
Error message
"No possible to delete snapshot. It has at least one clone "
or
"No possible to delete snapshot. It has clone id:c8b9cca0-fbe1-416f-8d10-5ca9874b8fed "
Actual result:
From horizon:
Success: deletion of Volume Snapshot: snapshot_of_pap:
Detailed bug description:
When volume snapshot has at least one clone (not flattened child in CEPH reference or from Openstack perspective this is volume created from snapshot) it is not possible to delete this snapshot till you don't perform flatten procedure for rbd image. This is OK, but the issue is that Horizon doesn't reports an error - only "Successfully scheduled". The same behavior if you try to delete from cli.
Steps to reproduce:
1) Create volume (glance image doesn't matter)
2) Create snapshot from volume
3) Create volume from snapshot, that you created at step2
4) Try to delete snapshot
Expected results:
Error message fbe1-416f- 8d10-5ca9874b8f ed "
"No possible to delete snapshot. It has at least one clone "
or
"No possible to delete snapshot. It has clone id:c8b9cca0-
Actual result:
From horizon:
Success: deletion of Volume Snapshot: snapshot_of_pap:
From cli: no output fbe1-416f- 8d10-5ca9874b8f ed ------- ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + 10T14:30: 09.000000 | fbe1-416f- 8d10-5ca9874b8f ed | snapshot- attributes: progress | 100% | snapshot- attributes: project_ id | c28fc7a16349407 3bea1f5773c946d 6e | 3f42-4c92- ad35-4102e6219f d1 | fbe1-416f- 8d10-5ca9874b8f ed fbe1-416f- 8d10-5ca9874b8f ed ------- ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ---+--- ------- ------- ------- ------- ------- + 10T14:30: 09.000000 | fbe1-416f- 8d10-5ca9874b8f ed | snapshot- attributes: progress | 100% | snapshot- attributes: project_ id | c28fc7a16349407 3bea1f5773c946d 6e | 3f42-4c92- ad35-4102e6219f d1 |
# cinder snapshot-show c8b9cca0-
+------
| Property | Value |
+------
| created_at | 2016-08-
| description | |
| id | c8b9cca0-
| metadata | {} |
| name | snapshot_of_pap |
| os-extended-
| os-extended-
| size | 1 |
| status | available |
| volume_id | 773c20e5-
# cinder snapshot-delete c8b9cca0-
# cinder snapshot-show c8b9cca0-
+------
| Property | Value |
+------
| created_at | 2016-08-
| description | |
| id | c8b9cca0-
| metadata | {} |
| name | snapshot_of_pap |
| os-extended-
| os-extended-
| size | 1 |
| status | available |
| volume_id | 773c20e5-
Workaround: 3f42-4c92- ad35-4102e6219f d1 773c20e5- 3f42-4c92- ad35-4102e6219f d1 volume- 773c20e5- 3f42-4c92- ad35-4102e6219f d1 c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed 1024 MB volume- 773c20e5- 3f42-4c92- ad35-4102e6219f d1@snapshot- c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed volume- 84e05b5c- 557a-4757- ba60-8fa0c7040c 2f volume- 84e05b5c- 557a-4757- ba60-8fa0c7040c 2f
# rbd ls volumes | grep 773c20e5-
volume-
# rbd snap ls volumes/
SNAPID NAME SIZE
508 snapshot-
# rbd children volumes/
volumes/
# rbd flatten volumes/
Image flatten: 100% complete...done.
Impact:
After this action we can remove snapshot as child become independent from snapshot.
Description of the environment: ------- ------- ------- -----|- ------- -|----- ------- ---- kibana | 0.9.0 | 4.0.0 ure_alerting | 0.9.0 | 4.0.0 plugin | 1.0.2 | 4.0.0
Operation system: Ubuntu 14.04
Versions of components: MOS 9
Related projects installed:
# fuel plugins
id | name | version | package_version
---|---
1 | elasticsearch_
2 | influxdb_grafana | 0.9.0 | 4.0.0
3 | lma_collector | 0.9.0 | 4.0.0
4 | lma_infrastruct
5 | static_ntp_routing | 4.0.6 | 4.0.0
6 | zabbix-database | 4.0.1 | 4.0.0
9 | static_routing | 4.0.7 | 4.0.0
10 | ivb5_plugin_vw | 1.0.27 | 4.0.0
7 | zabbix_monitoring | 2.6.25 | 4.0.0
11 | avi_controller_
12 | openbook | 1.3.4 | 4.0.0
Network model: Neutron+OVS
Additional information:
A debug output of `# cinder --debug snapshot-delete` is almost the same when snapshot is actually deleted or when it is remaining not deleted.
# cinder --debug snapshot-delete c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed lient.session: REQ: curl -g -i -X GET http:// 192.168. 0.2:5000/ -H "Accept: application/json" -H "User-Agent: python- keystoneclient" lient.session: RESP: [300] content-length: 591 vary: X-Auth-Token server: Apache connection: close date: Wed, 10 Aug 2016 14:45:03 GMT content-type: application/json 30T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v3+json" }], "id": "v3.4", "links": [{"href": "http:// 192.168. 0.2:5000/ v3/", "rel": "self"}]}, {"status": "stable", "updated": "2014-04- 17T00:00: 00Z", "media-types": [{"base": "application/json", "type": "application/ vnd.openstack. identity- v2.0+json" }], "id": "v2.0", "links": [{"href": "http:// 192.168. 0.2:5000/ v2.0/", "rel": "self"}, {"href": "http:// docs.openstack. org/", "type": "text/html", "rel": "describedby"}]}]}}
DEBUG:keystonec
DEBUG:keystonec
RESP BODY: {"versions": {"values": [{"status": "stable", "updated": "2015-03-
DEBUG:keystonec lient.auth. identity. v2:Making authentication request to http:// 192.168. 0.2:5000/ v2.0/tokens lient.session: REQ: curl -g -i -X GET http:// 192.168. 0.2:8776/ v2/a75515eef05a 4a818d925a879be 99ff9/snapshots /c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed -H "User-Agent: python- cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}9d36af216 253d2f7ddd99400 20ef88e6343e533 f" lient.session: RESP: [200] content-length: 387 x-compute- request- id: req-f8e19416- a7be-47cf- b842-431b3e3c37 b9 connection: close date: Wed, 10 Aug 2016 14:45:04 GMT content-type: application/json x-openstack- request- id: req-f8e19416- a7be-47cf- b842-431b3e3c37 b9 snapshot- attributes: progress" : "100%", "name": "snapshot_of_pap", "volume_id": "773c20e5- 3f42-4c92- ad35-4102e6219f d1", "os-extended- snapshot- attributes: project_ id": "c28fc7a1634940 73bea1f5773c946 d6e", "created_at": "2016-08- 10T14:30: 09.000000" , "size": 1, "id": "c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed", "description": ""}}
DEBUG:keystonec
DEBUG:keystonec
RESP BODY: {"snapshot": {"status": "available", "metadata": {}, "os-extended-
DEBUG:keystonec lient.session: REQ: curl -g -i -X DELETE http:// 192.168. 0.2:8776/ v2/a75515eef05a 4a818d925a879be 99ff9/snapshots /c8b9cca0- fbe1-416f- 8d10-5ca9874b8f ed -H "User-Agent: python- cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}9d36af216 253d2f7ddd99400 20ef88e6343e533 f" lient.session: RESP: [202] date: Wed, 10 Aug 2016 14:45:04 GMT connection: close content-type: text/html; charset=UTF-8 content-length: 0 x-openstack- request- id: req-3a51a348- ce6c-4454- b082-3c0202d6a6 2e
DEBUG:keystonec