[CentOS-virt] Report on Xen-4.6rc2 from virt7-xen-46-candidate

Wed Sep 9 09:40:26 UTC 2015
George Dunlap <dunlapg at umich.edu>

On Tue, Sep 8, 2015 at 11:25 PM, T.Weyergraf <T.Weyergraf at virtfinity.de> wrote:
> Hi
>
> I gave the new Xen-4.6rc2 a spin on a CentOS 7 virtualisation guest
> (nested-xen). I haven't yet started testing guests, but rather looked at the
> install itself.
>
> One issue, I found, was with xenstored.service and the corresponding
> unit-file:
>
> [root at xencen7ws ~]# systemctl status xenstored
> xenstored.service - The Xen xenstore
>    Loaded: loaded (/usr/lib/systemd/system/xenstored.service; disabled)
>    Active: active (running) since Tue 2015-09-08 23:13:43 CEST; 13min ago
>   Process: 757 ExecStartPre=/bin/mkdir -p /var/run/xen (code=exited,
> status=0/SUCCESS)
>   Process: 753 ExecStartPre=/bin/rm -f /var/lib/xenstored/tdb* (code=exited,
> status=0/SUCCESS)
>   Process: 740 ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
> (code=exited, status=0/SUCCESS)
>  Main PID: 760 (xenstored)
>    CGroup: /system.slice/xenstored.service
>            └─760 /usr/sbin/xenstored
>
> Sep 08 23:13:43 xencen7ws.virtfinity.local xenstored[760]: TDB: tdb_open_ex:
> could not open file /var/lib/xenstored/tdb: No such file or directory
> Sep 08 23:13:43 xencen7ws.virtfinity.local xenstored[760]: Checking store
> ...
> Sep 08 23:13:43 xencen7ws.virtfinity.local xenstored[760]: Checking store
> complete.
> Sep 08 23:13:43 xencen7ws.virtfinity.local xenstored[760]: xenstored is
> ready
> Sep 08 23:13:43 xencen7ws.virtfinity.local systemd[1]: Started The Xen
> xenstore.
>
> As you can see, xenstored.service is running, but disabled by the package
> installation. This is, because xenstored.service apparently got overseen in
> the source-rpm's spec-file's post runtime/preun runtime. See diff [1] for
> details.

The Xen documentation (in INSTALL) recommends enabing
xen-init-dom0.service, xenconsoled.service, and
xen-qemu-dom0-disk-backend.service.  I didn't specifically enable
xenstored, because I figured that was the "systemd way" -- specify the
dependencies, specify what you actually want (i.e., a xen dom0), and
let it sort out what actually needs to be started.

Is there a good reason to specifically enable xenstored, even though
it will start automatically because of dependencies?

(I really am asking here -- this whole systemd thing is really new to me.)

> Also, I think xenstored should write a pidfile. You might consider adding to
> /usr/lib/systemd/system/xenstored.service:
> PIDFile=/var/run/xenstored.pid
> and change
> ExecStart=/usr/sbin/xenstored
> to
> ExecStart=/usr/sbin/xenstored --pid-file /var/run/xenstored.pid
> $XENSTORED_ARGS
>
> Hope this helps, this is just a quick start. I'll continue checking and
> reporting during the next days.

I think because systemd doesn't do forking, that it doesn't need a
pidfile.  In fact, if xenstored detects that it's running under
systemd, it will actually ignore the --pid-file directive.

 -George