bluechi icon indicating copy to clipboard operation
bluechi copied to clipboard

Optimize BlueChi's systemd units on boot

Open engelmi opened this issue 10 months ago • 0 comments

Please describe what you would like to see

Currently, the bluechi-agent and bluechi-controller are started After=network.target. This special target is only weakly defined and there is

no guarantee that hardware-based devices have shown up by the time this target is reached, or even acquired complete IP configuration

As an alternative, network-online.target is mentioned. However, it states there:

What precisely this requires is left to the implementation of the network managing service.

As well as:

Note that networking daemons that simply provide functionality to other hosts (as opposed to consume functionality of other hosts) generally do not need to pull this in.

Since both BlueChi components, controller and agent, require only the DBus to be up and running locally, the ordering on boot can be optimized to After=dbus.service.

Please describe the solution you'd like

The systemd units of bluechi-agent and bluechi-controller are changed to:

[Unit]
# ...
DefaultDependencies=no
Before=basic.target shutdown.target
After=dbus.service
Conflicts=shutdown.target
# ...

engelmi avatar Apr 02 '24 09:04 engelmi