[autotest] vm creation fails (not)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hi,

Now and then autotest thinks creating the vm failed, although qemu started up just fine. autotest then goes to wait($qemupid) and hangs there forever ...

I suspect this is a race: autotest uses 'help' on the monitor to check whenever qemu is alive. If qemu created the monitor socket fast enougth it works. Otherwise it doesn't.

I've papered over it with the quick&dirty patch below. Someone who knows autotest better that /me should fix this properly.

thanks,
  Gerd
diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py
index eba9b84..cbb01e7 100644
--- a/client/tests/kvm/kvm_vm.py
+++ b/client/tests/kvm/kvm_vm.py
@@ -382,6 +382,9 @@ class VM:
             self.process = kvm_subprocess.run_bg(qemu_command, None,
                                                  logging.debug, "(qemu) ")
 
+            # wait a bit to give qemu enougth time to create the monitor socket
+            time.sleep(3)
+
             if not self.process.is_alive():
                 logging.error("VM could not be created; "
                               "qemu command failed:\n%s" % qemu_command)

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux