consistency snapshot creation passed even if the volume is in error state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
Nitin Madhok |
Bug Description
This is on stable/mitaka with 3par backend.
The expectation is that if the volume is in error, the cgsnapshot creation should fail.
To reproduce:
1) created a cinder type and attached the backend
cinder type-key TestCG set volume_
2)Created an consistancy group for that volume type
stack@hlm:
+------
| Property | Value |
+------
| availability_zone | nova |
| created_at | 2016-06-
| description | None |
| id | 8593a4bd-
| name | Test_CG |
| status | available |
| volume_types | [u'c4b5ffa4-
+------
3) created an volume using the consistancy group and that volume type
stack@hlm:
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | 8593a4bd-
| created_at | 2016-06-
| description | None |
| encrypted | False |
| id | ebeae7ea-
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | iscsi_test_cg |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | 2016-06-
| user_id | 7851f2237187405
| volume_type | TestCG |
+------
4) stack@hlm:
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| ebeae7ea-
+------
5) I reset the state of volume to error state
cinder reset-state --state error ebeae7ea-
6) stack@hlm:
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| ebeae7ea-
+------
7) Tried to create an usual way snapshot and it failed as expected
stack@hlm:
ERROR: Invalid volume: Volume ebeae7ea-
8) Now tried to create consistancy snapshot and it passed
stack@hlm:
+------
| Property | Value |
+------
| consistencygroup_id | 8593a4bd-
| created_at | 2016-06-
| description | None |
| id | ef792156-
| name | CG_snap |
| status | creating |
+------
9) The snapshot-list show the snapshot in available status
stack@hlm:
+------
| ID | Volume ID | Status | Name | Size |
+------
| 41131a45-
+------
10) stack@hlm:
+------
| ID | Status | Name |
+------
| ef792156-
+------
11) stack@hlm:
+------
| Property | Value |
+------
| consistencygroup_id | 8593a4bd-
| created_at | 2016-06-
| description | None |
| id | ef792156-
| name | CG_snap |
| status | available |
+------
tags: | added: cg |
Changed in cinder: | |
assignee: | Xing Yang (xing-yang) → Nitin Madhok (nmadhok) |
Reproduced this in the trunk.