[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 13/13] tools: don't stop xenstore domain when stopping dom0



On 18/12/15 13:14, Juergen Gross wrote:
> When restarting or shutting down dom0 the xendomains script tries to
> stop all other domains. Don't do this for the xenstore domain, as it
> might survive a dom0 reboot in the future.
>
> The same applies to xl shutdown --all.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> ---
>  tools/hotplug/Linux/xendomains.in | 17 +++++++++++++++++
>  tools/libxl/xl_cmdimpl.c          | 19 +++++++++++++++----
>  2 files changed, 32 insertions(+), 4 deletions(-)
>
> diff --git a/tools/hotplug/Linux/xendomains.in 
> b/tools/hotplug/Linux/xendomains.in
> index dfe0b33..70b7f16 100644
> --- a/tools/hotplug/Linux/xendomains.in
> +++ b/tools/hotplug/Linux/xendomains.in
> @@ -196,6 +196,17 @@ rdnames()
>      done
>  }
>  
> +# set xenstore domain id (or 0 if no xenstore domain)
> +get_xsdomid()

A get/set mismatch.

> +{
> +    ${bindir}/xenstore-exists /tool/xenstored/domid
> +    if test $? -ne 0; then
> +        XS_DOMID=0
> +    else
> +        XS_DOMID=`${bindir}/xenstore-read /tool/xenstored/domid`
> +    fi

This is racy.  Can't you use a failure of xenstore-read as a signal that
the key doesn't exist?

~Andrew

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.