From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: xen-devel@lists.xensource.com
Cc: zhigang.x.wang@oracle.com
Subject: [PATCH 4 of 4] always create a lockfile on xendomains service start
Date: Wed, 08 Jun 2011 17:45:16 -0400 [thread overview]
Message-ID: <ab0a7d100668a25f0e6f.1307569516@zhigang.us.oracle.com> (raw)
In-Reply-To: <patchbomb.1307569512@zhigang.us.oracle.com>
# HG changeset patch
# User Zhigang Wang <zhigang.x.wang@oracle.com>
# Date 1307569509 14400
# Node ID ab0a7d100668a25f0e6f025b474694962e2e8aef
# Parent b944852b97898ed11ea10eb9301efadc19ec50ca
always create a lockfile on xendomains service start
Currently if there's no saved VMs or VMs under /etc/xen/auto, the lockfile will
not be created.
If no lockfile, when system reboot, system will not wait xendomains service to
stop. Thus any running VMs without a link to /etc/xen/auto will not be cleanly
shutdown.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff -r b944852b9789 -r ab0a7d100668 tools/hotplug/Linux/init.d/xendomains
--- a/tools/hotplug/Linux/init.d/xendomains Wed Jun 08 17:45:09 2011 -0400
+++ b/tools/hotplug/Linux/init.d/xendomains Wed Jun 08 17:45:09 2011 -0400
@@ -249,8 +249,6 @@ start()
if [ "$XENDOMAINS_RESTORE" = "true" ] &&
contains_something "$XENDOMAINS_SAVE"
then
- mkdir -p $(dirname "$LOCKFILE")
- touch $LOCKFILE
echo -n "Restoring Xen domains:"
saved_domains=`ls $XENDOMAINS_SAVE`
for dom in $XENDOMAINS_SAVE/*; do
@@ -276,7 +274,6 @@ start()
if contains_something "$XENDOMAINS_AUTO"
then
- touch $LOCKFILE
echo -n "Starting auto Xen domains:"
# We expect config scripts for auto starting domains to be in
# XENDOMAINS_AUTO - they could just be symlinks to files elsewhere
@@ -305,6 +302,8 @@ start()
fi
done
fi
+ mkdir -p $(dirname "$LOCKFILE")
+ touch $LOCKFILE
}
all_zombies()
next prev parent reply other threads:[~2011-06-08 21:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 21:45 [PATCH 0 of 4] fix xendomains service Zhigang Wang
2011-06-08 21:45 ` [PATCH 1 of 4] fix state Zhigang Wang
2011-06-17 17:25 ` Ian Jackson
2011-06-08 21:45 ` [PATCH 2 of 4] fix not functional eval Zhigang Wang
2011-06-21 16:44 ` Ian Jackson
2011-06-08 21:45 ` [PATCH 3 of 4] make xendomains service save/migrate vms under /etc/xen/auto only Zhigang Wang
2011-06-21 16:51 ` Ian Jackson
2011-06-08 21:45 ` Zhigang Wang [this message]
2011-06-21 16:55 ` [PATCH 4 of 4] always create a lockfile on xendomains service start Ian Jackson
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=ab0a7d100668a25f0e6f.1307569516@zhigang.us.oracle.com \
--to=zhigang.x.wang@oracle.com \
--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).