From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: [autotest] vm creation fails (not) Date: Wed, 05 Aug 2009 11:45:59 +0200 Message-ID: <4A7954D7.3020409@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050909040305050405020608" To: KVM list Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44844 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933018AbZHEJqB (ORCPT ); Wed, 5 Aug 2009 05:46:01 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n759k23C012464 for ; Wed, 5 Aug 2009 05:46:02 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n759k1Qc014063 for ; Wed, 5 Aug 2009 05:46:02 -0400 Received: from zweiblum.home.kraxel.org (vpn2-8-58.ams2.redhat.com [10.36.8.58]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n759k0IH019590 for ; Wed, 5 Aug 2009 05:46:00 -0400 Sender: kvm-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------050909040305050405020608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------050909040305050405020608 Content-Type: text/plain; name="fix" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix" 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) --------------050909040305050405020608--