[Spice-devel] [PATCH linux vdagent 1/2] systemd: use "After" with "Requisite"

Lukáš Hrázký lhrazky at redhat.com
Thu Nov 1 10:14:39 UTC 2018


Hello,

On Wed, 2018-10-31 at 15:31 -0500, Jonathon Jongsma wrote:
> So, I just discovered this year-old patch that (as far as I can tell)
> was never reviewed or pushed upstream. Is anybody willing to review it?
> 
> Jonathon
> 
> 
> On Wed, 2017-11-29 at 10:44 -0600, Jonathon Jongsma wrote:
> > The "Requisite" directive is intended to require that the virtio port
> > device exists before starting the vdagent socket unit. If the device
> > does not exist, the socket should fail to start. However, without
> > using
> > "After", the socket will still start even when the device is not
> > present.
> > 
> > See https://github.com/systemd/systemd/issues/4756 for further
> > details
> > (particularly the following comment:
> > https://github.com/systemd/systemd/issues/4756#issuecomment-267005324
> > )

Seems correct to me. You could also refer to the man page itself, man
systemd.unit, documentation of Requisite=:

"Similar to Requires=. However, if the units listed here are not
started already, they will not be started and the starting of this unit
will fail immediately. Requisite= does not imply an ordering
dependency, even if both units are started in the same transaction.
Hence this setting should usually be combined with After=, to ensure
this unit is not started before the other unit."

Acked-by: Lukáš Hrázký <lhrazky at redhat.com>

> > Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
> > ---
> >  data/spice-vdagentd.socket | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/data/spice-vdagentd.socket b/data/spice-vdagentd.socket
> > index e34a188..613c7ed 100644
> > --- a/data/spice-vdagentd.socket
> > +++ b/data/spice-vdagentd.socket
> > @@ -2,6 +2,7 @@
> >  Description=Activation socket for spice guest agent daemon
> >  # only start the socket if the virtio port device exists
> >  Requisite=dev-virtio\x2dports-com.redhat.spice.0.device
> > +After=dev-virtio\x2dports-com.redhat.spice.0.device
> >  
> >  [Socket]
> >  ListenStream=/var/run/spice-vdagentd/spice-vdagent-sock
> 
> 
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list