All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: KVM list <kvm@vger.kernel.org>
Subject: [autotest] vm creation fails (not)
Date: Wed, 05 Aug 2009 11:45:59 +0200	[thread overview]
Message-ID: <4A7954D7.3020409@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

   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

[-- Attachment #2: fix --]
[-- Type: text/plain, Size: 631 bytes --]

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)

             reply	other threads:[~2009-08-05  9:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05  9:45 Gerd Hoffmann [this message]
     [not found] <657495968.1491511249467149457.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-08-05 10:16 ` [autotest] vm creation fails (not) Michael Goldish
2009-08-05 12:53   ` Gerd Hoffmann
2009-08-05 13:12     ` Michael Goldish
2009-08-05 13:21       ` Gerd Hoffmann
2009-08-05 14:05         ` Michael Goldish
2009-08-05 14:52           ` Gerd Hoffmann
2009-08-05 15:43           ` Avi Kivity
     [not found] <1912575528.1512971249485400261.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-08-05 15:21 ` Michael Goldish
     [not found] <938753791.1515401249487180985.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-08-05 15:48 ` Michael Goldish
2009-08-05 15:58   ` Gerd Hoffmann
2009-08-05 16:02   ` Avi Kivity
     [not found] <87671503.1527311249497775045.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-08-05 18:47 ` Michael Goldish
2009-08-06 10:23   ` Avi Kivity
     [not found] <798406659.1555201249555283903.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-08-06 10:43 ` Michael Goldish
2009-08-06 11:33   ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A7954D7.3020409@redhat.com \
    --to=kraxel@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.