From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org, ross.lagerwall@citrix.com,
dave@recoil.org
Subject: Re: [PATCH v3 1/4] tools: remove systemd xenstore socket definitions
Date: Mon, 25 Jul 2016 12:05:00 +0100 [thread overview]
Message-ID: <20160725110500.GG27082@citrix.com> (raw)
In-Reply-To: <0a689170-ceb8-b34b-9a33-d0b193d3f11b@suse.com>
On Mon, Jul 25, 2016 at 06:33:35AM +0200, Juergen Gross wrote:
> On 22/07/16 20:51, Wei Liu wrote:
> > On Fri, Jul 22, 2016 at 08:49:17PM +0200, Juergen Gross wrote:
> >> On 22/07/16 18:31, Wei Liu wrote:
> >>> Only skim-read this patch, will do proper review later.
> >>>
> >>> On Fri, Jul 22, 2016 at 05:09:28PM +0200, Juergen Gross wrote:
> >>> [...]
> >>>> CAMLprim value ocaml_launched_by_systemd(value ignore)
> >>>> {
> >>>> - CAMLparam1(ignore);
> >>>> - CAMLlocal1(ret);
> >>>> + CAMLparam1(ignore);
> >>>> + CAMLlocal1(ret);
> >>>>
> >>>> - ret = Val_false;
> >>>> + ret = Val_false;
> >>>>
> >>>> - if (sd_listen_fds(0) > 0)
> >>>> - ret = Val_true;
> >>>> + if (sd_booted() > 0)
> >>>> + ret = Val_true;
> >>>
> >>> I think this may be problematic.
> >>>
> >>> sd_booted returns true if system is booted with systemd, but it has no
> >>> bearing whether this particular process is launched by systemd.
> >>>
> >>> IIRC using sd_booted would cause oxenstored thinks it is launched by
> >>> systemd even if the user launches it by hand in a shell. That caused
> >>> it's initialisation to fail. 81d758afca7c3c1e3ccbd78154b33d64fd7757fb
> >>> was written to address that issue.
> >>>
> >>> So, what would happen if you start oxenstored by hand with your patch
> >>> apply? Maybe we can just remove this launched_by_systemd check all
> >>> together -- i.e. we always call sd_notify?
>
> Sure we could. I'll remove the checks in both xenstored variants if
> nobody objects.
>
> >>
> >> So you are concerned sd_notify() will be called too often, but you are
> >> suggesting to call it always? I don't understand your concerns then.
> >>
> >
> > No, my concern is that you won't be able to start oxenstored from
> > command line manually if you boot with systemd. At least that was the
> > bug that caused me to write that patch.
>
> I believe the main problem was xenstored not calling daemonize() in that
> case, right? This problem is being remove with my patch as daemonize()
> will be called always. The systemd service file is modified to reflect
> this change in behavior.
>
I'm afraid I can't remember all the details. But as long as you can
launch [o/c]xenstored by hand I think we're fine.
Wei.
>
> Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-25 11:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 15:09 [PATCH v3 0/4] tools: make xenstore domain/daemon configurable Juergen Gross
2016-07-22 15:09 ` [PATCH v3 1/4] tools: remove systemd xenstore socket definitions Juergen Gross
2016-07-22 16:31 ` Wei Liu
2016-07-22 18:49 ` Juergen Gross
2016-07-22 18:51 ` Wei Liu
2016-07-25 4:33 ` Juergen Gross
2016-07-25 11:05 ` Wei Liu [this message]
2016-07-25 12:21 ` Juergen Gross
2016-07-22 15:09 ` [PATCH v3 2/4] tools: split out xenstored starting form xencommons Juergen Gross
2016-07-25 13:43 ` Wei Liu
2016-07-22 15:09 ` [PATCH v3 3/4] tools: use pidfile for test if xenstored is running Juergen Gross
2016-08-02 10:23 ` Wei Liu
2016-08-02 10:26 ` Juergen Gross
2016-07-22 15:09 ` [PATCH v3 4/4] tools: make xenstore domain easy configurable Juergen Gross
2016-07-25 13:43 ` Wei Liu
2016-07-25 13:56 ` Juergen Gross
2016-07-25 14:01 ` Wei Liu
2016-07-25 14:06 ` Juergen Gross
2016-07-25 14:11 ` Wei Liu
2016-07-25 14:16 ` Juergen Gross
2016-07-25 14:27 ` Wei Liu
2016-07-25 13:43 ` [PATCH v3 0/4] tools: make xenstore domain/daemon configurable Wei Liu
2016-08-01 8:02 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160725110500.GG27082@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dave@recoil.org \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.com \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).