add retries everywhere cuz proxmox sucks, use json for iso list (for marc <3)

This commit is contained in:
Jordan Rodgers 2018-09-26 22:39:31 -04:00
parent b658033d85
commit 8bf49a664a
5 changed files with 28 additions and 8 deletions

View file

@ -133,6 +133,9 @@ def setup_template_task(template_id, name, user, ssh_key, cores, memory):
ip = get_next_ip(starrs, app.config['STARRS_IP_RANGE'])
register_starrs(starrs, name, app.config['STARRS_USER'], mac, ip)
get_vm_expire(db, vmid, app.config['VM_EXPIRE_MONTHS'])
print("[{}] Giving Proxmox some time to finish cloning.".format(name))
job.meta['status'] = 'waiting for Proxmox'
time.sleep(15)
print("[{}] Setting CPU and memory.".format(name))
job.meta['status'] = 'setting CPU and memory'
job.save_meta()