All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: xen-devel@lists.xenproject.org, Olaf Hering <olaf@aepfle.de>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@citrix.com>
Subject: Re: [PATCH for-4.7 1/2] hotplug: Fix xendomains lock path for RHEL-based systems
Date: Wed, 11 May 2016 15:31:03 +0100	[thread overview]
Message-ID: <20160511143103.GE8063@citrix.com> (raw)
In-Reply-To: <1462965285-5299-1-git-send-email-george.dunlap@citrix.com>

On Wed, May 11, 2016 at 12:14:44PM +0100, George Dunlap wrote:
> Commit c996572 changed the LOCKFILE path from a check between two
> hardcoded paths (/var/lock/subsys/ or /var/lock) to using the
> XEN_LOCK_DIR variable designated at configure time.  Since
> XEN_LOCK_DIR doesn't (and shouldn't) have the 'subsys' postfix, this
> effectively moves all the lock files by default to /var/lock instead.
> 
> Unfortunately, this breaks xendomains on RedHat-based SYSV init
> systems.  RedHat-based SYSV init systems try to only call "${SERVICE}
> shutdown" on systems which actually have an actively running
> component; and they use the existence of /var/lock/subsys/${SERVICE}
> to determine which systems are running.
> 
> Changing XEN_LOCK_DIR to /var/lock/subsys is not suitable, as only
> system services like xendomains should create lockfiles there; other
> locks (such as the console locks) should be created in /var/lock
> instead.
> 
> Instead, re-instate the check for the subsys/ subdirectory of the lock
> directory in the xendomains script.
> 
> Signed-off-by: George Dunlap <george.dunlap@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
> 
> Release justification: This is a regression in functionality (although
> it's been there for the entire 4.6 cycle now).
> 
> 
> CC: Ian Jackson <ian.jackson@citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Olaf Hering <olaf@aepfle.de>
> ---
>  tools/hotplug/Linux/xendomains.in | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/hotplug/Linux/xendomains.in b/tools/hotplug/Linux/xendomains.in
> index 9f88649..727cd42 100644
> --- a/tools/hotplug/Linux/xendomains.in
> +++ b/tools/hotplug/Linux/xendomains.in
> @@ -49,7 +49,13 @@ if [ ! -e /dev/xen/privcmd ] && [ ! -e /proc/xen/privcmd ]; then
>  	exit 0
>  fi
>  
> -LOCKFILE=${XEN_LOCK_DIR}/xendomains
> +# RHEL-based systems only shutdown a service if they find a lockfile
> +# in /var/lock/subsys
> +if [[ -d ${XEN_LOCK_DIR}/subsys ]] ; then
> +    LOCKFILE=${XEN_LOCK_DIR}/subsys/xendomains
> +else
> +    LOCKFILE=${XEN_LOCK_DIR}/xendomains
> +fi
>  
>  XENDOM_CONFIG=@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xendomains
>  
> -- 
> 2.1.4
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-05-11 14:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 11:14 [PATCH for-4.7 1/2] hotplug: Fix xendomains lock path for RHEL-based systems George Dunlap
2016-05-11 11:14 ` [PATCH for-4.7 2/2] tools/xendomains: Create lockfile on start unconditionally George Dunlap
2016-05-11 11:19   ` George Dunlap
2016-05-11 14:31     ` Wei Liu
2016-05-11 14:30   ` Wei Liu
2016-05-11 14:38   ` Olaf Hering
2016-05-25 12:57   ` George Dunlap
2016-05-11 14:31 ` Wei Liu [this message]
2016-05-11 14:37 ` [PATCH for-4.7 1/2] hotplug: Fix xendomains lock path for RHEL-based systems Olaf Hering
2016-05-25 12:55 ` George Dunlap

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=20160511143103.GE8063@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xenproject.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.