From: Wei Liu Subject: Re: [PATCH 3/3] systemd: xendomains now depends on xen-init-dom0 Date: Wed, 22 Oct 2014 13:07:02 +0100 Message-ID: <20141022120702.GC5087@zion.uk.xensource.com> References: <1413885372-8412-1-git-send-email-wei.liu2@citrix.com> <1413885372-8412-4-git-send-email-wei.liu2@citrix.com> <20141022115724.GE8718@perard.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20141022115724.GE8718@perard.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anthony PERARD Cc: olaf@aepfle.de, Wei Liu , ian.campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Oct 22, 2014 at 12:57:24PM +0100, Anthony PERARD wrote: > On Tue, Oct 21, 2014 at 10:56:12AM +0100, Wei Liu wrote: > > Signed-off-by: Wei Liu > > --- > > tools/hotplug/Linux/systemd/xendomains.service.in | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in > > index f88c336..8577317 100644 > > --- a/tools/hotplug/Linux/systemd/xendomains.service.in > > +++ b/tools/hotplug/Linux/systemd/xendomains.service.in > > @@ -1,7 +1,7 @@ > > [Unit] > > Description=Xendomains - start and stop guests on boot and shutdown > > Requires=xenstored.socket > > -After=xenstored.service xenconsoled.service > > +After=xenstored.service xenconsoled.service xen-init-dom0.service > > ConditionVirtualization=xen > > Having a service listed in After does not mean a service depends on the > other. It just mean: run xendomains.service after xen-init-dom0.service, > but xen-init-dom0.service might not run at all.. > > If xen-init-dom0.service needs to be run before xendomains.service, you > also need to add it to the Requires list. > Then I must have misread the manual "After= ensures that the configured unit is started after the listed unit finished starting up" Looks like "finished starting up" doesn't guarantee it exits with success? > So the patch should probably look like this: > -Requires=xenstored.socket > -After=xenstored.service xenconsoled.service > +Requires=xenstored.socket xen-init-dom0.service > +After=xenstored.service xenconsoled.service xen-init-dom0.service > > (This also means, if xen-init-dom0 fail, xendomains will not be started > at all.) > Anyway, this looks sensible and it's what I expect. I will add in that line. Wei. > -- > Anthony PERARD