[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for-xen-4.5] tools/hotplug: fix systemd service files for dom0



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@xxxxxxxxx>
> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> > Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> > ---
> > 
> > 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.



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.