-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Ran into an architecture'ish type problem recently. There is a service, that is a part of the power off, but is also a part of the host quiesce. This service utlizes a power off synchronization target:
Wants=obmc-host-stop-pre@%i.target
Before=obmc-host-stop-pre@%i.targe
So say you power on your system, and just run this service on it's own. You actually end up starting all of the synchronization targets!
May 27 19:55:24 p10bmc systemd[1]: Reached target Stop Host0 (Pre).
May 27 19:55:24 p10bmc systemd[1]: Reached target Host0 (Stopping).
May 27 19:55:24 p10bmc systemd[1]: Reached target Host0 (Stopped).
And then, if you issue an actual power off, all of the synchronization targets have started so you have no synchronization!
The real world example we (IBM) hit this on was with the [email protected]. This service is called when the host goes to the Quiesce state. After Quiesce, the host-state-manager initiates a reboot of the host firmware, which starts the power off process. That power off process no longer has the synchronization targets to coordinate the power down.
I see a few potential solutions:
- Don't allow a service that is not run in the power on or power off targets to use synchronization targets (make them explicitly set their service dependencies) (probably the best short term solution)
- Ensure that when the power on or off targets are started, they stop all of the synchronization targets (not real sure how we'd do this, some service that runs first?)
- Get rid of synchronization targets and just do explicit service to service dependencies