automatic power restart should have wants relationship
This service was introduced before it was fully understood what the
difference was between a Wanted and Required relationship in systemd.
This service failing should not cause the multi-user.target to fail
(RequiredBy) so change it to a WantedBy. The service itself has the
correct dependency but this recipe overrides it.
This issue was found while working on a new function that will run the
APR service when the CurrentPowerStatus transitions from bad to good.
The point being to run the customers APR request once power has been
restored to the system. Restarting a service that is RequiredBy
multi-user.target causes the target to go active and restart any other
service that are oneshot in the target. This is not desired behavior.
Changing to a WantedBy relationship ensures only the one service is
restarted.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I62541c876dbdc6eb10deb0b64005bb978babbc96
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
index 718d06d..2a3f044 100644
--- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
+++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc
@@ -1,6 +1,6 @@
DEFAULT_TARGETS = " \
multi-user.target.requires/obmc-host-reset@{}.target \
- multi-user.target.requires/phosphor-discover-system-state@{}.service \
+ multi-user.target.wants/phosphor-discover-system-state@{}.service \
obmc-chassis-poweron@{}.target.wants/phosphor-reset-host-recovery@{}.service \
obmc-host-start@{}.target.requires/obmc-host-startmin@{}.target \
obmc-host-start@{}.target.requires/phosphor-reset-host-reboot-attempts@{}.service \