mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
makebuildserver added sleep after destroy/undefine
This commit is contained in:
parent
3c4b1dec84
commit
718d01dea2
@ -14,6 +14,7 @@ import hashlib
|
||||
import yaml
|
||||
import math
|
||||
import json
|
||||
import time
|
||||
import logging
|
||||
from clint.textui import progress
|
||||
from optparse import OptionParser
|
||||
@ -348,6 +349,8 @@ def destroy_current_image(v, serverdir):
|
||||
try:
|
||||
logger.debug('virsh -c qemu:///system destroy %s', config['domain'])
|
||||
subprocess.check_call(['virsh', '-c', 'qemu:///system', 'destroy', config['domain']])
|
||||
logging.info("...waiting a sec...")
|
||||
time.sleep(10)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logging.info("could not force libvirt domain '%s' off: %s", config['domain'], e)
|
||||
try:
|
||||
@ -355,6 +358,8 @@ def destroy_current_image(v, serverdir):
|
||||
# for undefining domains correctly.
|
||||
logger.debug('virsh -c qemu:///system undefine %s --nvram --managed-save --remove-all-storage --snapshots-metadata', config['domain'])
|
||||
subprocess.check_call(('virsh', '-c', 'qemu:///system', 'undefine', config['domain'], '--nvram', '--managed-save', '--remove-all-storage', '--snapshots-metadata'))
|
||||
logging.info("...waiting a sec...")
|
||||
time.sleep(10)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.info("could not undefine libvirt domain '%s': %s", dom.name(), e)
|
||||
except libvirt.libvirtError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user