Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: only refuse Type=dbus service enqueue if dbus has pending stop job
Follow-up for systemd#27579 In systemd#27579 we refused all StartUnit requests for Type=dbus units if dbus is not running, which means if dbus is manually stopped, user can't use systemctl to start Type=dbus units again, which is incorrect. The only culprit that leads to the cancellation of the whole transaction mentioned in systemd#26799 is job type conflict on dbus. In other words, if the stop job is already running, or dbus is already inactive, everything should be fine. So let's relax the restriction and only refuse job enqueuing if dbus has a *pending* stop job. To summarize, the case we want to avoid is: 1. dbus has a pending stop job 2. StartUnit/ActivationRequest is received 3. Type=dbus service gets started, which has Requires=dbus.socket 4. dbus is pulled in again, resulting in job type conflict What we can support is: 1. dbus is already stopping (in UNIT_DEACTIVATING) 2. StartUnit is received (possibly through systemctl, i.e. on private bus) 3. Type=dbus service gets started, and will wait for running jobs for dbus to complete 4. dbus is started again, thus the Type=dbus service Fixes systemd#27588
- Loading branch information