From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v7 2/8] cxenstored: add support for systemd active sockets Date: Thu, 6 Aug 2015 10:29:59 +0100 Message-ID: <1438853399.9747.126.camel@citrix.com> References: <1405639699-13494-1-git-send-email-mcgrof@do-not-panic.com> <1405639699-13494-3-git-send-email-mcgrof@do-not-panic.com> <1438769878.9747.47.camel@citrix.com> <20150805131758.GM26074@zion.uk.xensource.com> <20150805172437.GA15719@zion.uk.xensource.com> <20150805181920.GB15719@zion.uk.xensource.com> <1438852396.9747.123.camel@citrix.com> <20150806092054.GH15719@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZNHVN-0004GT-6z for xen-devel@lists.xenproject.org; Thu, 06 Aug 2015 09:30:29 +0000 In-Reply-To: <20150806092054.GH15719@zion.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: Wei Liu Cc: George Dunlap , xen-devel , "Luis R. Rodriguez" , "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org On Thu, 2015-08-06 at 10:20 +0100, Wei Liu wrote: > On Thu, Aug 06, 2015 at 10:13:16AM +0100, Ian Campbell wrote: > > On Wed, 2015-08-05 at 19:19 +0100, Wei Liu wrote: > > > On Wed, Aug 05, 2015 at 06:24:37PM +0100, Wei Liu wrote: > > > [...] > > > > > > > > > > > > > Right. I misinterpreted sd_boot. > > > > > > > > You patch, however, has the undesirable effect that it fails to > > > > report > > > > error if xenstored is started by systemd but couldn't claim the > > > > socket. I don't think this is the correct behaviour. > > > > > > > > After consulting with systemd manual [0], I think we should check > > > > sd_listen_fds return value to determine if it is started by > > > > systemd. > > > > Currently it only checks for <= 0, which covers 1) not started by > > > > systemd 2) an error occurs. > > > > > > > > Hopefully I interpret the doc correctly this time. I will prepare a > > > > patch shortly. > > > > > > > > Wei. > > > > > > > > [0] > > > > http://www.freedesktop.org/software/systemd/man/sd_listen_fds.html > > > > > > Patch attached. I start cxenstored by hand and it seems to works fine > > > -- > > > now it fails with other errors. > > > > What other errors? Are they blockers for accepting this patch? > > > > "FATAL: Failed to initialize dom0 state: Invalid argument" > > Xenstored tries to initialise domain 0 state once again. That can be > dealt with with a simple -D (--no-domain-init) option to stop it from > doing that. OK, is this just a symptom of having already started xenstored once from the initscript and then trying to do it again? If you disable the initscript/unit file then you should be able to start xenstored manually (perhaps after having done some setup. e.g. mount /proc/xen) without error I think.