From patchwork Wed Aug 5 09:45:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 39333 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n759kD2j031617 for ; Wed, 5 Aug 2009 09:46:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933926AbZHEJqE (ORCPT ); Wed, 5 Aug 2009 05:46:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933046AbZHEJqD (ORCPT ); Wed, 5 Aug 2009 05:46:03 -0400 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 Message-ID: <4A7954D7.3020409@redhat.com> Date: Wed, 05 Aug 2009 11:45:59 +0200 From: Gerd Hoffmann User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: KVM list Subject: [autotest] vm creation fails (not) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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)