[Spice-devel] [vdagent-linux v2] systemd: Remove unneded virtio-port dependencies
Frediano Ziglio
fziglio at redhat.com
Thu Dec 20 08:04:00 UTC 2018
> On Wed, Dec 19, 2018 at 09:52:57AM -0500, Frediano Ziglio wrote:
> > The "Requisite" still prevents the socket to be activated with a
> > "systemctl enable spice-vdagentd.socket" launched manually.
> > You can obviously complaint that users should not do that but
> > I don't think that if the system says "you don't have the device
> > needed" when effectively don't have the needed device is a bad
> > approach. So personally I would like to keep the "Requisite".
> > About the "After" I have no idea of the difference that it can
> > make.
>
> If you want some strong relationship like this, maybe we should change
> it to BindsTo:
> BindsTo=
> Configures requirement dependencies, very similar in style to Requires=.
> However, this dependency type is stronger: in addition to the effect of
> Requires= it declares that if the unit bound to
> is stopped, this unit will be stopped too. This means a unit bound to
> another unit that suddenly enters inactive state will be stopped too.
> Units can suddenly, unexpectedly enter inactive state
> for different reasons: the main process of a service unit might terminate
> on its own choice, the backing device of a device unit might be unplugged
> or the mount point of a mount unit might be
> unmounted without involvement of the system and service manager.
>
> When used in conjunction with After= on the same unit the behaviour of
> BindsTo= is even stronger. In this case, the unit bound to strictly has
> to be in active state for this unit to also be in
> active state. This not only means a unit bound to another unit that
> suddenly enters inactive state, but also one that is bound to another
> unit that gets skipped due to a failed condition check
> (such as ConditionPathExists=, ConditionPathIsSymbolicLink=, ... — see
> below) will be stopped, should it be running. Hence, in many cases it is
> best to combine BindsTo= with After=.
>
> Christophe
>
Looking at vdagent options you can specify also the device so in theory you
could configure the agent to use a different device or a socket so would
make sense to have the socket active.
As the user would have to manually enable/activate the socket giving
error or not is just an opinion.
Frediano
More information about the Spice-devel
mailing list