While working on T283660, @MMandere discovered the systemd setting BindsTo, documented here:
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.
We currently use Requires for quite a few units, including many services depending on varnish such as varnishfetcherr, varnishmtail, varnishospital, and various others. For all those services, the stricter guarantees of BindsTo seem to be more appropriate than Requires: if varnish is stopped, all those services stop operating correctly.
The list of services currently using Requires is:
- codesearch-frontend
- hound
- fifo-log-demux
- keyholder-proxy
- atsmtail
- docker-service-shim
- varnishfetcherr
- varnishmtail
- varnishospital
- varnishslowlog
- varnishtlsinspector
- varnishkafka
For each service, we need to understand if Requires is the appropriate choice, or if BindsTo would be better instead.