mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
deleting instance with disk causes also delete of all corresponding snapshots. previously deleting instance with snapshots ended with error and probably also database inconsistency.
This commit is contained in:
parent
a3a572a8a8
commit
48371ff92d
1 changed files with 2 additions and 0 deletions
|
@ -347,6 +347,8 @@ def instance(request, compute_id, vname):
|
||||||
if conn.get_status() == 1:
|
if conn.get_status() == 1:
|
||||||
conn.force_shutdown()
|
conn.force_shutdown()
|
||||||
if request.POST.get('delete_disk', ''):
|
if request.POST.get('delete_disk', ''):
|
||||||
|
for snap in snapshots:
|
||||||
|
conn.snapshot_delete(snap['name'])
|
||||||
conn.delete_disk()
|
conn.delete_disk()
|
||||||
conn.delete()
|
conn.delete()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue