WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 1 of 3] xencommons: Kill xenstored when stopping

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 3] xencommons: Kill xenstored when stopping xencommons
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 28 Jun 2010 14:23:16 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Mon, 28 Jun 2010 06:26:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C289F52.1010006@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1277729923@gdunlap-desktop> <e71645625934f162c3d7.1277729924@gdunlap-desktop> <alpine.DEB.2.00.1006281408160.22638@kaball-desktop> <4C289F52.1010006@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2010-06-28 at 14:10 +0100, George Dunlap wrote:
> Seems like a comment to that effect in the script would be useful, then. :-)

Yes, this isn't the first attempt to kill xenstored from this script.

It might be worth having a really-stop-i-know-what-im-doing target

> What doesn't stop correctly?  I've manually killed it and started it 
> again, and it seemed to work.  Granted, there wasn't a whole lot stored 
> in it at the time...

Watches aren't preserved, so for example netback's watch
on /local/domain/0/backends/ gets lost and you can't start any network
backends even after you start xenstored again, similarly for other
device types.

Same thing for any domU's you might have running, they will loose the
ability to attach and detach devices, the watch on the control node
which controls reboot etc goes away etc.

Ian.


> 
>   -George
> 
> On 28/06/10 14:08, Stefano Stabellini wrote:
> > xenstored doesn't stop correctly.
> > There is no point in stopping xenstored if we are going to break the
> > host.
> >
> > On Mon, 28 Jun 2010, George Dunlap wrote:
> >> Signed-off-by: George Dunlap<george.dunlap@xxxxxxxxxxxxx>
> >>
> >> diff -r bf64e1081333 -r e71645625934 tools/hotplug/Linux/init.d/xencommons
> >> --- a/tools/hotplug/Linux/init.d/xencommons        Fri Jun 25 16:05:20 
> >> 2010 +0100
> >> +++ b/tools/hotplug/Linux/init.d/xencommons        Mon Jun 28 13:24:26 
> >> 2010 +0100
> >> @@ -22,6 +22,7 @@
> >>   test -f /etc/sysconfig/xencommons&&  . /etc/sysconfig/xencommons
> >>
> >>   XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
> >> +XENSTORED_PIDFILE=/var/run/xenstored.pid
> >>   shopt -s extglob
> >>
> >>   if test "x$1" = xstart&&  \
> >> @@ -42,7 +43,7 @@
> >>            test -z "$XENSTORED_ROOTDIR" || 
> >> XENSTORED_ROOTDIR="/var/lib/xenstored"
> >>            rm -f "$XENSTORED_ROOTDIR"/tdb*&>/dev/null
> >>            test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T 
> >> /var/log/xen/xenstored-trace.log"
> >> -          xenstored --pid-file=/var/run/xenstore.pid $XENSTORED_ARGS
> >> +          xenstored --pid-file=$XENSTORED_PIDFILE $XENSTORED_ARGS
> >>            xenstore-write "/local/domain/0/name" "Domain-0"
> >>    fi
> >>
> >> @@ -57,6 +58,12 @@
> >>            while kill -9 $pid>/dev/null 2>&1; do sleep 0.1; done
> >>            rm -f $XENCONSOLED_PIDFILE
> >>    fi
> >> +
> >> +  if read 2>/dev/null<$XENSTORED_PIDFILE pid; then
> >> +          kill $pid
> >> +          while kill -9 $pid>/dev/null 2>&1; do sleep 0.1; done
> >> +          rm -f $XENSTORED_PIDFILE
> >> +  fi
> >>   }
> >>
> >>   case "$1" in
> >>
> >> _______________________________________________
> >> Xen-devel mailing list
> >> Xen-devel@xxxxxxxxxxxxxxxxxxx
> >> http://lists.xensource.com/xen-devel
> >>
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>