saltstack/salt-cloud — pull request #718 by mahendra (2013-08-12 16:34:47+00:00)
Title: Ensure that all volumes created during init follow delvol_on_destroy

If a user uses salt-cloud --map and make an instance. He uses the "volumes" option and create/attach volumes to this instance (with delvol_on_destroy = True in the configuration)

Now, if the instance is destroyed using salt-cloud -d --map option. In such a situation, the non-root volumes must also be destroyed.

Basically when the instance is created the delvol_on_destroy option must be set on all volumes created by the salt-cloud script.

Also, the delvol/keepvol_on_destroy actions must work on any volume attached to the instance.

The question also comes up - what will happen to a volume if it is detached from the instance before the instance is destroyed. In such a case, it is the admin's decision. The volume will not be destroyed.