All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Konieczny <jajcus@jajcus.net>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: "Ian Campbell" <ian.campbell@citrix.com>,
	"Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
	"Luis R. Rodriguez" <mcgrof@suse.com>,
	"Jan Rękorajski" <baggins@pld-linux.org>,
	"M A Young" <m.a.young@durham.ac.uk>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4 13/15] systemd: add xen systemd service and module files
Date: Mon, 12 May 2014 16:32:18 +0200	[thread overview]
Message-ID: <5370DB72.3070609@jajcus.net> (raw)
In-Reply-To: <21360.54905.861745.375007@mariner.uk.xensource.com>

On 05/12/14 16:11, Ian Jackson wrote:
> Thanks for pursuing this.  I have some comments:
> 
> Luis R. Rodriguez writes ("[PATCH v4 13/15] systemd: add xen systemd service and module files"):
> ...
>> diff --git a/tools/hotplug/Linux/systemd/proc-xen.mount.in b/tools/hotplug/Linux/systemd/proc-xen.mount.in
>> new file mode 100644
>> index 0000000..6eb61b2
>> --- /dev/null
>> +++ b/tools/hotplug/Linux/systemd/proc-xen.mount.in
>> @@ -0,0 +1,9 @@
>> +[Unit]
>> +Description=Mount /proc/xen files
>> +ConditionPathIsDirectory=/proc/xen
>> +RefuseManualStop=true
>> +
>> +[Mount]
>> +What=xenfs
>> +Where=/proc/xen
>> +Type=xenfs
> 
> Blimey.  All of this to replace one line in a shell script.
> 
> Can you explain why this needs to be broken out into a separate
> systemd service ?

Because that is how mount points are configured in systemd.

One could drop /etc/fstab all together and use a shell script to mount
every file system. Would that be better?

In fact mounting /proc/xen from within a script instead of using fstab
entry is hack required because /etc/fstab cannot be reliably updated on
Xen install or activation.

The systemd mount units seem verbose, but they contain not much more
than an /etc/fstab line and allow more flexibility (conditions and
ordering).

> Could it be bundled into some script which is already being run ?

No. Scripts are bad way for configuring mounts. Doing it in the script
is the necessary evil in systems without drop-in configuration like
systemd provides.

>> diff --git a/tools/hotplug/Linux/systemd/xenconsoled.service.in b/tools/hotplug/Linux/systemd/xenconsoled.service.in
>> +[Service]
>> +Type=simple
>> +Environment=XENCONSOLED_ARGS=
>> +Environment=XENCONSOLED_LOG=none
>> +Environment=XENCONSOLED_LOG_DIR=@XEN_LOG_DIR@/console
>> +EnvironmentFile=-/etc/default/xenconsoled
>> +EnvironmentFile=-/etc/sysconfig/xenconsoled
>> +PIDFile=@XEN_RUN_DIR@/xenconsoled.pid
>> +ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
>> +ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@> +ExecStart=@SBINDIR@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
> 
> This should use a non-forking startup protocol, rather than pid files.

I would say more: it seems weird to use both 'Type=simple' and
'PIDFile=' – PIDFile seems unnecessary here. sd_notify support
(Type=notify) would be the best option here, but it must be implemented
in the daemon.

> xenstore isn't a file system.  The /var/run area it uses is just
> something it needs for its private data.
> 
>> diff --git a/tools/hotplug/Linux/systemd/xenstored.socket.in b/tools/hotplug/Linux/systemd/xenstored.socket.in
>> +[Socket]
>> +ListenStream=/var/run/xenstored/socket
>> +ListenStream=/var/run/xenstored/socket_ro
> 
> AIUI the systemd socket activation protocol requires the systemd
> config and the daemon code/configuration to correspond.

The daemon may have no own configuration when the systemd-provided
sockets are used – the daemon does not need to know the paths, just that
the first socked is read-write, and the other is read-only.

> There should be a comment explaining where the corresponding
> configuration in xenstored is (ie referring to the code in both
> daemons listing the sockets).

Comment about the expected sockets would not hurt, I guess.

Jacek

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-05-12 14:32 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30  1:11 [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 01/15] xenstore: add support for a retry open limit on xenstored Luis R. Rodriguez
2014-05-07 15:03   ` Ian Campbell
2014-05-12 13:50   ` Ian Jackson
2014-05-12 14:18     ` Ian Campbell
2014-05-12 14:40       ` Jacek Konieczny
2014-05-12 15:37         ` Ian Jackson
2014-05-12 18:59           ` Luis R. Rodriguez
2014-05-13 21:33           ` Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 02/15] xencommons: use the retry limit instead of implementing our own timeout Luis R. Rodriguez
2014-04-30  9:33   ` Andrew Cooper
2014-04-30 16:36     ` Luis R. Rodriguez
2014-05-07 15:05   ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 03/15] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-05-07 15:06   ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 04/15] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-05-07 15:18   ` Ian Campbell
2014-05-07 15:46   ` Ian Campbell
2014-05-13 22:17     ` Luis R. Rodriguez
2014-05-14  8:44       ` Ian Campbell
2014-05-15  1:50         ` Luis R. Rodriguez
2014-04-30  1:11 ` [PATCH v4 05/15] oxenstored: " Luis R. Rodriguez
2014-04-30  8:35   ` Dave Scott
2014-04-30 17:30     ` Luis R. Rodriguez
2014-05-01 10:21       ` Dave Scott
2014-04-30  9:27   ` Anil Madhavapeddy
2014-04-30 17:35     ` Luis R. Rodriguez
2014-05-01  9:16       ` Anil Madhavapeddy
2014-05-07 15:20   ` Ian Campbell
2014-05-12 19:09     ` Luis R. Rodriguez
2014-05-12 13:57   ` Ian Jackson
2014-05-12 18:11     ` Luis R. Rodriguez
2014-05-13  8:53       ` Ian Campbell
2014-04-30  1:11 ` [PATCH v4 06/15] tools/xendomains: make xl the default Luis R. Rodriguez
2014-04-30  7:02   ` Olaf Hering
2014-04-30 17:43     ` Luis R. Rodriguez
2014-05-07 15:21       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 07/15] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 08/15] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-05-07 15:24   ` Ian Campbell
2014-05-13 22:21     ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 09/15] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-05-07 15:25   ` Ian Campbell
2014-05-07 16:12   ` Roger Pau Monné
2014-05-07 16:21     ` Ian Campbell
2014-05-07 16:44       ` Roger Pau Monné
2014-05-07 18:28         ` Luis R. Rodriguez
2014-05-12 14:00           ` Ian Jackson
2014-05-12 18:14             ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 10/15] autoconf: update m4/pkg.m4 Luis R. Rodriguez
2014-05-07 15:28   ` Ian Campbell
2014-05-13 22:32     ` Luis R. Rodriguez
2014-05-07 16:17   ` Roger Pau Monné
2014-04-30  1:12 ` [PATCH v4 11/15] autoconf: xen: move standard variables to a generic place Luis R. Rodriguez
2014-04-30  6:52   ` Jan Beulich
     [not found]   ` <5360B9CB020000780000D9BB@suse.com>
2014-04-30 17:53     ` Luis R. Rodriguez
2014-05-02  8:12       ` Jan Beulich
2014-05-13 23:03         ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 12/15] autoconf: xen: peg the xenstored preference onto the top level config Luis R. Rodriguez
2014-05-07 15:32   ` Ian Campbell
2014-05-13 23:05     ` Luis R. Rodriguez
2014-04-30  1:12 ` [PATCH v4 13/15] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-05-07 15:46   ` Ian Campbell
2014-05-12 18:22     ` Luis R. Rodriguez
2014-05-13 23:28     ` Luis R. Rodriguez
2014-05-12 14:11   ` Ian Jackson
2014-05-12 14:32     ` Jacek Konieczny [this message]
2014-05-12 15:36       ` Ian Jackson
2014-05-12 18:55         ` Luis R. Rodriguez
2014-05-12 18:46     ` Luis R. Rodriguez
2014-05-13  8:57       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 14/15] autoconf: xen: add systemd support into the build system Luis R. Rodriguez
2014-05-07 16:40   ` Roger Pau Monné
2014-05-15  1:58     ` Luis R. Rodriguez
2014-05-15  9:02       ` Ian Campbell
2014-04-30  1:12 ` [PATCH v4 15/15] autoconf: xen: trigger an update with autogen.sh Luis R. Rodriguez
2014-05-07 15:47   ` Ian Campbell
2014-05-07 18:34     ` Luis R. Rodriguez
2014-05-08  8:42       ` Ian Campbell
2014-04-30  1:15 ` [PATCH v4 00/15] xen: add systemd support Luis R. Rodriguez
2014-05-07 15:18   ` Ian Campbell
2014-05-08 11:28 ` Anthony PERARD
2014-05-15  2:12   ` Luis R. Rodriguez
2014-05-15  6:14   ` Luis R. Rodriguez

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=5370DB72.3070609@jajcus.net \
    --to=jajcus@jajcus.net \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=baggins@pld-linux.org \
    --cc=ian.campbell@citrix.com \
    --cc=m.a.young@durham.ac.uk \
    --cc=mcgrof@do-not-panic.com \
    --cc=mcgrof@suse.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.