mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
delete starrs first
This commit is contained in:
parent
a8703ec53c
commit
b3f3670e6f
1 changed files with 2 additions and 1 deletions
|
@ -96,6 +96,8 @@ def delete_vm_task(vmid):
|
||||||
db = connect_db()
|
db = connect_db()
|
||||||
starrs = connect_starrs()
|
starrs = connect_starrs()
|
||||||
vm = VM(vmid)
|
vm = VM(vmid)
|
||||||
|
# do this before deleting the VM since it is hard to reconcile later
|
||||||
|
delete_starrs(starrs, vm.name)
|
||||||
if vm.status != 'stopped':
|
if vm.status != 'stopped':
|
||||||
vm.stop()
|
vm.stop()
|
||||||
retry = 0
|
retry = 0
|
||||||
|
@ -106,7 +108,6 @@ def delete_vm_task(vmid):
|
||||||
retry += 1
|
retry += 1
|
||||||
vm.delete()
|
vm.delete()
|
||||||
delete_vm_expire(db, vmid)
|
delete_vm_expire(db, vmid)
|
||||||
delete_starrs(starrs, vm.name)
|
|
||||||
|
|
||||||
|
|
||||||
def process_expiring_vms_task():
|
def process_expiring_vms_task():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue