xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Sander Eikelenboom <linux@eikelenboom.it>
To: xen-devel@lists.xensource.com
Cc: Ian.Campbell@citrix.com
Subject: [PATCH 3 of 3] hotplug: Change options used for shutdown command in xendomains script to be compatible with both xm and xl
Date: Thu, 06 Sep 2012 21:41:29 +0200	[thread overview]
Message-ID: <261ce3cdaee8d5c30f12.1346960489@xentest.example.org> (raw)
In-Reply-To: <patchbomb.1346960486@xentest.example.org>

  * Use short options for shutdown command in xendomains script to be compatible with both xm and xl
  * Drop using the --halt: Linux in a guest treats "halt" and "poweroff" identically, so the --halt is pointless and not implemented in xl

Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>

diff -r 780eae92908a -r 261ce3cdaee8 tools/hotplug/Linux/init.d/sysconfig.xendomains
--- a/tools/hotplug/Linux/init.d/sysconfig.xendomains	Thu Sep 06 21:36:41 2012 +0200
+++ b/tools/hotplug/Linux/init.d/sysconfig.xendomains	Thu Sep 06 21:36:44 2012 +0200
@@ -56,29 +56,29 @@ XENDOMAINS_MIGRATE=""
 XENDOMAINS_SAVE=/var/lib/xen/save
 
 ## Type: string
-## Default: "--halt --wait"
+## Default: "-w"
 #
 # If neither MIGRATE nor SAVE were enabled or if they failed, you can
 # try to shut down a domain by sending it a shutdown request. To do this,
-# set this to "--halt --wait". Omit the "--wait" flag to avoid waiting
+# set this to "-w". Omit the "-w" flag to avoid waiting
 # for the domain to be really down. Leave empty to skip domain shutdown.
 #
-XENDOMAINS_SHUTDOWN="--halt --wait"
+XENDOMAINS_SHUTDOWN="-w"
 
 ## Type: string
-## Default: "--all --halt --wait"
+## Default: "-a -w"
 #
 # After we have gone over all virtual machines (resp. all automatically
 # started ones, see XENDOMAINS_AUTO_ONLY below) in a loop and sent SysRq,
 # migrated, saved and/or shutdown according to the settings above, we
 # might want to shutdown the virtual machines that are still running
 # for some reason or another. To do this, set this variable to
-# "--all --halt --wait", it will be passed to xm shutdown.
+# "-a -w", it will be passed to xm shutdown.
 # Leave it empty not to do anything special here.
 # (Note: This will hit all virtual machines, even if XENDOMAINS_AUTO_ONLY
 # is set.)
 # 
-XENDOMAINS_SHUTDOWN_ALL="--all --halt --wait"
+XENDOMAINS_SHUTDOWN_ALL="-a -w"
 
 ## Type: boolean
 ## Default: true
diff -r 780eae92908a -r 261ce3cdaee8 tools/hotplug/Linux/init.d/xendomains
--- a/tools/hotplug/Linux/init.d/xendomains	Thu Sep 06 21:36:41 2012 +0200
+++ b/tools/hotplug/Linux/init.d/xendomains	Thu Sep 06 21:36:44 2012 +0200
@@ -434,7 +434,7 @@ stop()
 	    fi
 	fi
 	if test -n "$XENDOMAINS_SHUTDOWN"; then
-	    # XENDOMAINS_SHUTDOWN should be "--halt --wait"
+	    # XENDOMAINS_SHUTDOWN should be "-w"
 	    echo -n "(shut)"
 	    watchdog_xencmd shutdown &
 	    WDOG_PID=$!
@@ -453,7 +453,7 @@ stop()
     # This is because it's easier to do ;-) but arguably if this script is run
     # on system shutdown then it's also the right thing to do.
     if ! all_zombies && test -n "$XENDOMAINS_SHUTDOWN_ALL"; then
-	# XENDOMAINS_SHUTDOWN_ALL should be "--all --halt --wait"
+	# XENDOMAINS_SHUTDOWN_ALL should be "-a -w"
 	echo -n " SHUTDOWN_ALL "
 	watchdog_xencmd shutdown 1 false &
 	WDOG_PID=$!
diff -r 780eae92908a -r 261ce3cdaee8 tools/hotplug/NetBSD/rc.d/xendomains
--- a/tools/hotplug/NetBSD/rc.d/xendomains	Thu Sep 06 21:36:41 2012 +0200
+++ b/tools/hotplug/NetBSD/rc.d/xendomains	Thu Sep 06 21:36:44 2012 +0200
@@ -94,7 +94,7 @@ xendomains_stop()
 	#
 	echo "Stopping xen domains."
 	for domain in $(xendomains_list); do
-		${ctl_command} shutdown --halt $domain
+		${ctl_command} shutdown $domain
 	done
 	while [ $timeout -gt 0 ]; do
 		livedomains=$(xendomains_list)

  parent reply	other threads:[~2012-09-06 19:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 19:41 [PATCH 0 of 3] xl and hotplug: Introduce and use shutdown and reboot xm compatibility options Sander Eikelenboom
2012-09-06 19:41 ` [PATCH 1 of 3] xl: Introduce shutdown xm compatibility option -a Sander Eikelenboom
2012-09-13 16:06   ` Ian Jackson
2012-09-06 19:41 ` [PATCH 2 of 3] xl: Introduce reboot xm compatibility option -a and -w Sander Eikelenboom
2012-09-07  8:57   ` Ian Campbell
2012-09-06 19:41 ` Sander Eikelenboom [this message]
2012-09-13 16:07   ` [PATCH 3 of 3] hotplug: Change options used for shutdown command in xendomains script to be compatible with both xm and xl Ian Jackson
2012-09-25  9:35 ` [PATCH 0 of 3] xl and hotplug: Introduce and use shutdown and reboot xm compatibility options Ian Campbell
2012-09-25 15:11   ` Sander Eikelenboom
2012-09-25 15:29     ` Ian Campbell
2012-09-25 15:47       ` Sander Eikelenboom
2012-09-25 15:49         ` Ian Jackson
2012-09-25 15:56         ` Ian Campbell
2012-09-25 15:48       ` Ian Jackson
2012-09-27 20:11       ` Sander Eikelenboom
2012-10-02 14:02         ` Ian Campbell
2012-10-03  9:03           ` Sander Eikelenboom
2012-10-04  8:35             ` Ian Campbell

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=261ce3cdaee8d5c30f12.1346960489@xentest.example.org \
    --to=linux@eikelenboom.it \
    --cc=Ian.Campbell@citrix.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).