From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacek Konieczny Subject: Re: [TestDay] xen 4.4 FC3 xl create error Date: Wed, 05 Feb 2014 14:32:50 +0100 Message-ID: <52F23D82.2060306@jajcus.net> References: <1391527619.2441.16.camel@astar.houby.net> <1391530374.6497.55.camel@kazak.uk.xensource.com> <1391592517.6497.76.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1391592517.6497.76.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , M A Young Cc: ehouby@yahoo.com, xen@lists.fedoraproject.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 02/05/14 10:28, Ian Campbell wrote: > On Tue, 2014-02-04 at 18:41 +0000, M A Young wrote: >>> We should probably consider taking some unit files into the xen tree, if >>> someone wants to submit a set? >> >> I can submit a set, which start services individually rather than a = >> unified xencommons style start file. I didn't find a good way to reprodu= ce = >> the xendomains script, so I ended running an edited version of the = >> sysvinit script with a systemd wrapper file. > = > I don't know what is conventional in systemd land but I have no problem > with that approach. For systemd the much more natural way is to start and monitor each daemon with a separate systemd unit. If some extra scripting is needed (like the setting xenstore values for dom0), that should be coded in a separate script and one of the two: =96 Called via ExecStartPre or ExecStartPost in the unit of the daemon the scripting is for (e.g. filling xenstore would go to ExecStartPost of xenstored.service) =96 Called via ExecStart in its own service unit. Writing extra scripts may be not necessary when just a few commands have to be started. e.g. the xenstored.service from PLD Linux (based on some unit for xenstored found on the Internet): [Unit] Description=3DXenstored - daemon managing xenstore file system Requires=3Dproc-xen.mount var-lib-xenstored.mount After=3Dproc-xen.mount var-lib-xenstored.mount Before=3Dlibvirtd.service libvirt-guests.service xendomains.service xend.service RefuseManualStop=3Dtrue ConditionPathExists=3D/proc/xen [Service] Type=3Dforking Environment=3DXENSTORED_ARGS=3D Environment=3DXENSTORED_ROOTDIR=3D/var/lib/xenstored EnvironmentFile=3D-/etc/sysconfig/xenstored PIDFile=3D/var/run/xenstored.pid ExecStartPre=3D/bin/grep -q control_d /proc/xen/capabilities ExecStartPre=3D-/bin/rm -f "$XENSTORED_ROOTDIR"/tdb* ExecStart=3D/usr/sbin/xenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS ExecStartPost=3D/usr/bin/xenstore-write "/local/domain/0/name" "Domain-0" [Install] WantedBy=3Dmulti-user.target -- = Greets, Jacek