Should raise error when removing the clone point snapshot NOT silent rollback

Registered by dan kim

This is the case with hp san storage but it will be same with other cases.

When we try to delete a volume that has dependent snapshots, the error appears like berow.

Delete for volume b4968af6-febc-4bed-8465-0816dc4f337e failed: Invalid volume: Volume still has 1 dependent snapshots (HTTP 400) (Request-ID: req-84be2915-5c9f-4e48-9c22-f09ca1118390)
ERROR: Unable to delete any of the specified volumes.

But when we try to delete a snapshot that depended on volumes ( a clone point snapshot ), it's not deleted with no error message. we just can see a log in the cinder-volume.log like below.

Stdout: '\n<gauche version="1.0">\n\n <response description="A GENERAL ERROR OCCURRED THAT IS NOT COVERED BY A MORE SPECIFIC ERROR CODE.: &quot;Volume delete operation failed: \'The snapshot \'snapshot-a1af9d32-0a23-4c93-b605-801ceb265cd6\' 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.\'&quot;" name="CliqOperationFailed" processingTime="5956" result="80001010"/>\n\n</gauche>'

I suggest that cinder-volume adds snapshot-volume mapping information in snapshot_medata db if we create volumes using a snapshot, and check the snapshot is a clone point or not when removing the snapshot.

Then cinder-api can raise a meaningful error to the user.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
dan kim
Direction:
Needs approval
Assignee:
dan kim
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Sean McGinnis

Related branches

Sprints

Whiteboard

(smcginnis): Marking obsolete as this has been sitting out there for a long time. If this is still needed, please submit a new bp.

None

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.