diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 50bc7ca1..135e6054 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -359,7 +359,11 @@ def vm_destroy_builder(provider): shutil.rmtree('builder') # get rid of vm and related disk images FDroidPopen(('virsh', '-c', 'qemu:///system', 'destroy', 'builder_default')) + logging.info("...waiting a sec...") + time.sleep(10) FDroidPopen(('virsh', '-c', 'qemu:///system', 'undefine', 'builder_default', '--nvram', '--managed-save', '--remove-all-storage', '--snapshots-metadata')) + logging.info("...waiting a sec...") + time.sleep(10) # Note that 'force' here also implies test mode. diff --git a/makebuildserver b/makebuildserver index c3a6ab81..3b14bd7d 100755 --- a/makebuildserver +++ b/makebuildserver @@ -349,23 +349,23 @@ 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...") + logger.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) + logger.info("could not force libvirt domain '%s' off: %s", config['domain'], e) try: # libvirt python bindings do not support all flags required # 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...") + logger.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: - logging.info("finding libvirt domain '%s' failed. (%s)", config['domain'], e) + logger.info("finding libvirt domain '%s' failed. (%s)", config['domain'], e) except libvirt.libvirtError as e: - logging.critical('could not connect to libvirtd: %s', e) + logger.critical('could not connect to libvirtd: %s', e) sys.exit(1) @@ -588,7 +588,7 @@ def main(): v.up(provision=True) except subprocess.CalledProcessError as e: debug_log_vagrant_vm(serverdir, config['domain']) - logging.critical('could not bring buildserver vm up. %s', e) + logger.critical('could not bring buildserver vm up. %s', e) sys.exit(1) if config['copy_caches_from_host']: