From: Ian Campbell <Ian.Campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Olaf Hering <olaf@aepfle.de>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH for-xen-4.5] tools/hotplug: fix systemd service files for dom0
Date: Fri, 24 Oct 2014 10:22:04 +0100 [thread overview]
Message-ID: <1414142524.15687.21.camel@citrix.com> (raw)
In-Reply-To: <20141023171745.GG8718@perard.uk.xensource.com>
On Thu, 2014-10-23 at 18:17 +0100, Anthony PERARD wrote:
> On Wed, Oct 15, 2014 at 11:11:58AM +0200, Olaf Hering wrote:
> > ConditionVirtualization= checks if systemd runs in some sort of guest.
> > It is not supposed to detect host capabilities. The current
> > implementation happens to work because systemd-detect-virt from v208
> > returns also 'xen' in a dom0. In v210 and later 'none' is returned and
> > all service files are not started.
> >
> > Adjust the checks to detect a dom0 vs. native boot. Mounting xenfs
> > depends on /proc/xen, but should only be done for pvops because xenfs
> > exists only there. All other service files should not be started in
> > domU. The file /proc/xen/capabilities exists in both dom0 and domU in a
> > pvops kernel, but only in dom0 it contains 'control_d'. The existing
> > ExecStartPre= check will prevent starting in a domU.
> >
> > ConditionVirtualization=!xen is true in a dom0. But this check is broken
> > in systemd v208, so its not used.
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > Cc: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > ---
> >
> > I'm having a hard time to get a pvops dom0, so this is only tested with SUSE dom0.
>
> I've tested this patch in both dom0 and bare metal (with Linux 3.17.1
> and systemd v216) and it mostly works, only one unit does not work,
> var-lib-xenstored.mount.
>
> (for some reason, ConditionVirtualization=xen, is still true on dom0
> with systemd v216, even so systemd-detect-virt is returning 'none' ...)
Based on a comment I saw on either an earlier version of this series or
one of Olaf's fixes this is expected, the behaviour changed (to exclude
dom0) in a more recent version.
prev parent reply other threads:[~2014-10-24 9:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 9:11 [PATCH for-xen-4.5] tools/hotplug: fix systemd service files for dom0 Olaf Hering
2014-10-23 17:17 ` Anthony PERARD
2014-10-24 6:48 ` Olaf Hering
2014-10-24 9:22 ` Ian Campbell [this message]
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=1414142524.15687.21.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=olaf@aepfle.de \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@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 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.