mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
makebuildserver added sleep after destroy/undefine
This commit is contained in:
parent
3c4b1dec84
commit
718d01dea2
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,7 @@ import hashlib
|
||||||
import yaml
|
import yaml
|
||||||
import math
|
import math
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
import logging
|
import logging
|
||||||
from clint.textui import progress
|
from clint.textui import progress
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
@ -348,6 +349,8 @@ def destroy_current_image(v, serverdir):
|
||||||
try:
|
try:
|
||||||
logger.debug('virsh -c qemu:///system destroy %s', config['domain'])
|
logger.debug('virsh -c qemu:///system destroy %s', config['domain'])
|
||||||
subprocess.check_call(['virsh', '-c', 'qemu:///system', 'destroy', 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:
|
except subprocess.CalledProcessError as e:
|
||||||
logging.info("could not force libvirt domain '%s' off: %s", config['domain'], e)
|
logging.info("could not force libvirt domain '%s' off: %s", config['domain'], e)
|
||||||
try:
|
try:
|
||||||
|
@ -355,6 +358,8 @@ def destroy_current_image(v, serverdir):
|
||||||
# for undefining domains correctly.
|
# for undefining domains correctly.
|
||||||
logger.debug('virsh -c qemu:///system undefine %s --nvram --managed-save --remove-all-storage --snapshots-metadata', config['domain'])
|
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'))
|
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:
|
except subprocess.CalledProcessError as e:
|
||||||
logger.info("could not undefine libvirt domain '%s': %s", dom.name(), e)
|
logger.info("could not undefine libvirt domain '%s': %s", dom.name(), e)
|
||||||
except libvirt.libvirtError as e:
|
except libvirt.libvirtError as e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue