Closed gkeishin closed 4 years ago
I can't find what changed upstream in systemd but it appears as if a target has the following in it now:
Wants=multi-user.target
After=multi-user.target
Systemd will try and start multi-user.target again. This is fine for service that are either not oneshot (i.e. keep running) or are oneshot and have RemainAfterExit=yes.
But, if you have a service that is oneshot but does not have RemainAfterExit=yes set and that service is required by multi-user.target, it appears it will now get restarted when a target has a Wants=multi-user.target!
Thinking about this, the Wants=multi-user.target really doesn't make sense. That target will always be run, so just the After= is really needed in this case for targets that want to ensure it has completed before their target can run.
And, it also highlights that if you have a oneshot service that should only be run once per boot of the BMC, the RemainAfterExit=yes really should be set.
Fix is up over here - https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/32004