diff --git a/ffs-updatetest.py b/ffs-updatetest.py index 95e92ffd7d7e6c5d5823a1bf39d42348d2d0969c..48e5a39d67c85e659b000708fb338028cab00d39 100755 --- a/ffs-updatetest.py +++ b/ffs-updatetest.py @@ -105,39 +105,6 @@ def create_snapshot_context(): restore_snapshot(snap_name) delete_snapshot(snap_name) -def wait_for_unavailable(): - "Rebooting system" - logging.debug("Waiting for VM to become unavailable...") - for i in range(90): - result = subprocess.run(["qm", "guest", "cmd", args.vmid, "ping"]) - if result.returncode == 0: - logging.debug("Try {}: VM available".format(i)) - else: - logging.debug("VM has become unavailable after {} tries".format(i)) - return True - time.sleep(1) - logging.warning("Timeout waiting for VM to become unavailable") - return False - -def wait_for_available(): - logging.debug("Waiting for VM to become available...") - for i in range(90): - result = subprocess.run(["qm", "guest", "cmd", args.vmid, "ping"]) - if result.returncode != 0: - logging.debug("Try {}: VM unavailable".format(i)) - else: - logging.debug("VM has become available after {} tries".format(i)) - return True - time.sleep(1) - logging.warning("Timeout waiting for VM to become available") - return False - -def wait_for_reboot(): - if wait_for_unavailable() and wait_for_available(): - return True - logging.warning("Timeout waiting for VM reboot") - return False - def run_autoupdate(): logging.debug("Forcing autoupdate") terminal = spawn_console()