From: Bastian de Groot <degroot@univention.de>
To: James Harper <james.harper@bendigoit.com.au>
Cc: xen-devel@lists.xensource.com
Subject: Re: Race condition in /etc/xen/scripts/block
Date: Fri, 16 Jul 2010 13:28:39 +0200 [thread overview]
Message-ID: <201007161328.39953.degroot@univention.de> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D01A0A84D@trantor>
Hi James,
thank you for your fast reply. The VMs are not PV domains, so the problem
seems to be pretty much the same as yours. I would be very glad if you could
publish the patch, so that I can test if it works for me.
Thanks again,
Bastian
Am Freitag 16 Juli 2010 12:07:29 schrieben Sie:
> > Hello,
> >
> > I am trying to figure out the behavior of the hook-script for block
>
> devices
>
> > (/etc/xen/scripts/block).
> >
> > Here is the problem:
> > I want to start a VM. It shall boot from a dm-device, which is setup
>
> by a
>
> > script executed in the script /etc/xen/scripts/block. The dm-device
>
> doesn't
>
> > exist when "xm start " is executed .
> >
> > When I place the setup script at the top of the block-script,
>
> everything
>
> > works fine (http://pastebin.com/UYYbGupC). But when the script is
>
> placed in
>
> > the phy case branch of the block-script, the VM won't start
> > (http://pastebin.com/iPdJ65AH).
> >
> > Whether the VM starts or not, also depends on the runtime of the setup
>
> script.
>
> > When the script is executed fast, it is much more likely that the VM
>
> starts.
>
> > So, is there a way to setup a device in the hook-script?
> >
> > My configuration: Xen 3.4 on a 2.6.32 Kernel
> >
> > I would appreciate your help on that very much,
> > Bastian
>
> I've seen a similar thing when using drbd. When you run 'xm start' the
> drbd device is 'secondary' and one of the things the block setup script
> does is make it 'primary' which means it can be opened/accessed.
> Unfortunately most of the time qemu-dm has already tried to open it and
> failed by then.
>
> In that case I solved it by having qemu-dm try to open in a loop with a
> sleep each time. Not the most elegant solution but it works.
>
> I don't think the same problem exists with PV domains so if you are
> using a PV DomU then I've probably not been much help...
>
> James
next prev parent reply other threads:[~2010-07-16 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 9:59 Race condition in /etc/xen/scripts/block Bastian de Groot
2010-07-16 10:07 ` James Harper
2010-07-16 11:28 ` Bastian de Groot [this message]
2010-07-16 11:35 ` James Harper
2010-07-20 11:56 ` Bastian de Groot
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=201007161328.39953.degroot@univention.de \
--to=degroot@univention.de \
--cc=james.harper@bendigoit.com.au \
--cc=xen-devel@lists.xensource.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).