[Spice-devel] [vdagent-linux v2] systemd: Remove unneded virtio-port dependencies

Christophe Fergeau cfergeau at redhat.com
Wed Dec 19 15:22:50 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20181219/95be4262/attachment.sig>


More information about the Spice-devel mailing list