mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
Merge pull request #35 from MasterChief-John-117/fix-templates
Increase timeout and fix infinite loop if starrs delete fails
This commit is contained in:
commit
f734894dbc
1 changed files with 5 additions and 2 deletions
|
@ -99,7 +99,10 @@ def delete_vm_task(vmid):
|
|||
while retry < 3:
|
||||
try:
|
||||
delete_starrs(starrs, vm.name)
|
||||
break
|
||||
except:
|
||||
retry += 1
|
||||
time.sleep(3)
|
||||
continue
|
||||
if vm.status != 'stopped':
|
||||
vm.stop()
|
||||
|
@ -167,12 +170,12 @@ def setup_template_task(template_id, name, user, ssh_key, cores, memory):
|
|||
logging.info(
|
||||
'[{}] Waiting until Proxmox is done provisioning.'.format(name))
|
||||
set_job_status(job, 'waiting for Proxmox')
|
||||
timeout = 20
|
||||
timeout = 25
|
||||
retry = 0
|
||||
while retry < timeout:
|
||||
if not VM(vmid).is_provisioned():
|
||||
retry += 1
|
||||
time.sleep(6)
|
||||
time.sleep(12)
|
||||
continue
|
||||
break
|
||||
if retry == timeout:
|
||||
|
|
Loading…
Reference in a new issue