Open aorourkehp opened 8 years ago
This is a client issue that was introduced in one of our newer patches (python requests support). The patch has been backed out and this issue is no loner relevant. Cinder driver catches the LeftHand exception as such:
except hpexceptions.HTTPServerError as ex:
in_use_msg = 'cannot be deleted because it is a clone point'
if in_use_msg in ex.get_description():
raise exception.SnapshotIsBusy(ex)
This may not be the best practice to search for a specific string within the error description.
If you create a snapshot from a volume, then create a volume from that snapshot and try and delete the snapshot, you put the snapshot in error_deleting state in cinder and leave an orphaned snapshot in lefthand.
You would run into this when you create snapshots of an important volume. If something ever went wrong, you would want to be able to create a volume from one of those snapshots in order to recover the data. At this point, cinder allows you to delete either the snapshot or the newly created volume while lefthand doesn't. It seems like cinder thinks that both volumes are completely independent as well as the new volume and the snapshot are no longer related, while lefthand must maintain the snapshot. In lefthand, you must delete the newly created volume before you can delete the snapshot.
How to reproduce:
Create a lefthand volume:
cinder create --volume-type lefthand 1
Create a snapshot of that volume:
cinder snapshot-create <volume-id>
Create a volume from that snapshot:
cinder create --snapshot-id <snapshot-id>
Delete the snapshot:
cinder snapshot-delete <snapshot-id>
The snapshot goes into error_deleting state and we get the following error:
The actual error in left hand states:
The operation failed: The snapshot 'snapshot-66ec2d8e-4ef2-452c-a4ef-ab9b1b2af00c' cannot be deleted because it is a clone point. When multiple volumes depend on a snapshot, that snapshot is a clone point. To delete the clone point, you must first delete all but one of the volumes that depend on it.