From: Wei Liu Subject: Re: [PATCH v7 2/8] cxenstored: add support for systemd active sockets Date: Thu, 6 Aug 2015 10:36:47 +0100 Message-ID: <20150806093647.GI15719@zion.uk.xensource.com> References: <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> <1438853399.9747.126.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZNHcP-000511-QH for xen-devel@lists.xenproject.org; Thu, 06 Aug 2015 09:37:45 +0000 Content-Disposition: inline In-Reply-To: <1438853399.9747.126.camel@citrix.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: Ian Campbell Cc: George Dunlap , xen-devel , "Luis R. Rodriguez" , Wei Liu , "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org On Thu, Aug 06, 2015 at 10:29:59AM +0100, Ian Campbell wrote: > 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? > Yes. > 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. I tried that and xenstored works as expected. Wei.