obmc-targets: remove RefuseManualStop
Per freedesktop.org, this option is "mostly a safety feature to ensure
that the user does not accidentally activate units that are not
intended to be activated explicitly".
There have been a few instances when doing some systemd debugging, that
the ability to manually stop these targets would be useful. Given that
the only users logged into the BMC should know what they're doing, this
should not be much of a concern.
IBM has a tool called "istep" which can be used to boot the host
firmware independently from the different openbmc targets and services.
It's primarily used by the chip design and bringup team to have more
fine grained control over the initialization of the host hardware. The
problem with using istep is that it does not start any systemd targets
to boot the host firmware, but it does depend on systemd targets to
power the system off. The issue here is that if you don't start the
targets to boot the system, their "Conflicts" will not stop
the targets used to power down the system. When that doesn't happen,
there is no synchronization provided by those targets because they are
already running.
The solution will be to provide a shell script that istep (or any other
independent boot application) can call to manually stop all the targets
needs to synchronize the power off.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ic3bce98dc7ed2c6f57a78bb8ef590f1b447621ba
diff --git a/target_files/obmc-chassis-hard-poweroff@.target b/target_files/obmc-chassis-hard-poweroff@.target
index e5571dc..70cbf52 100644
--- a/target_files/obmc-chassis-hard-poweroff@.target
+++ b/target_files/obmc-chassis-hard-poweroff@.target
@@ -8,4 +8,3 @@
Conflicts=obmc-host-shutdown@%i.target
Conflicts=xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service
Conflicts=pldmSoftPowerOff.service
-RefuseManualStop=yes
diff --git a/target_files/obmc-chassis-powered-off@.target b/target_files/obmc-chassis-powered-off@.target
index 4744f53..115d369 100644
--- a/target_files/obmc-chassis-powered-off@.target
+++ b/target_files/obmc-chassis-powered-off@.target
@@ -5,4 +5,3 @@
After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service
Conflicts=obmc-chassis-poweron@%i.target
Conflicts=obmc-chassis-powerreset@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-chassis-poweroff@.target b/target_files/obmc-chassis-poweroff@.target
index 6c49764..32e93f5 100644
--- a/target_files/obmc-chassis-poweroff@.target
+++ b/target_files/obmc-chassis-poweroff@.target
@@ -8,4 +8,3 @@
Wants=obmc-power-off@%i.target
Conflicts=obmc-chassis-poweron@%i.target
Conflicts=obmc-chassis-powerreset@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-chassis-poweron@.target b/target_files/obmc-chassis-poweron@.target
index 82bd9ad..74547a2 100644
--- a/target_files/obmc-chassis-poweron@.target
+++ b/target_files/obmc-chassis-poweron@.target
@@ -7,6 +7,5 @@
Wants=obmc-power-start-pre@%i.target
Wants=obmc-power-start@%i.target
Wants=obmc-power-on@%i.target
-RefuseManualStop=yes
OnFailure=obmc-chassis-poweroff@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-chassis-powerreset@.target b/target_files/obmc-chassis-powerreset@.target
index 03036f3..ccfbbf1 100644
--- a/target_files/obmc-chassis-powerreset@.target
+++ b/target_files/obmc-chassis-powerreset@.target
@@ -1,7 +1,6 @@
[Unit]
Description=Chassis%i (Reset Check)
Conflicts=obmc-chassis-poweroff@%i.target
-RefuseManualStop=yes
[Install]
WantedBy=multi-user.target
diff --git a/target_files/obmc-fan-control-ready@.target b/target_files/obmc-fan-control-ready@.target
index e041a55..2bda259 100644
--- a/target_files/obmc-fan-control-ready@.target
+++ b/target_files/obmc-fan-control-ready@.target
@@ -1,4 +1,3 @@
[Unit]
Description=Fan Control Ready
-RefuseManualStop=yes
Conflicts=obmc-chassis-powered-off@%i.target
diff --git a/target_files/obmc-fan-control.target b/target_files/obmc-fan-control.target
index 50665db..190e16f 100644
--- a/target_files/obmc-fan-control.target
+++ b/target_files/obmc-fan-control.target
@@ -1,4 +1,3 @@
[Unit]
Description=Fan Control
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-fans-ready.target b/target_files/obmc-fans-ready.target
index 59e61c6..bd84f77 100644
--- a/target_files/obmc-fans-ready.target
+++ b/target_files/obmc-fans-ready.target
@@ -1,4 +1,3 @@
[Unit]
Description=Fans Ready
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-crash@.target b/target_files/obmc-host-crash@.target
index ea3798b..b46dbfb 100644
--- a/target_files/obmc-host-crash@.target
+++ b/target_files/obmc-host-crash@.target
@@ -1,4 +1,3 @@
[Unit]
Description=Host instance %i crashed
Conflicts=obmc-chassis-poweroff@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-diagnostic-mode@.target b/target_files/obmc-host-diagnostic-mode@.target
index dbd2784..40199ba 100644
--- a/target_files/obmc-host-diagnostic-mode@.target
+++ b/target_files/obmc-host-diagnostic-mode@.target
@@ -5,4 +5,3 @@
Description=Diagnostic Mode Collection for Host%i
After=multi-user.target
Conflicts=obmc-host-startmin@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-force-warm-reboot@.target b/target_files/obmc-host-force-warm-reboot@.target
index 2942397..9c8a8f5 100644
--- a/target_files/obmc-host-force-warm-reboot@.target
+++ b/target_files/obmc-host-force-warm-reboot@.target
@@ -4,4 +4,3 @@
Description=Force Warm Reboot Host%i
After=multi-user.target
Conflicts=obmc-host-startmin@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-quiesce@.target b/target_files/obmc-host-quiesce@.target
index fd050ad..53d32b5 100644
--- a/target_files/obmc-host-quiesce@.target
+++ b/target_files/obmc-host-quiesce@.target
@@ -1,5 +1,4 @@
[Unit]
Description=Quiesce Target
After=multi-user.target
-RefuseManualStop=yes
Conflicts=obmc-chassis-poweroff@%i.target
diff --git a/target_files/obmc-host-reboot@.target b/target_files/obmc-host-reboot@.target
index 2a24bab..be3522c 100644
--- a/target_files/obmc-host-reboot@.target
+++ b/target_files/obmc-host-reboot@.target
@@ -2,6 +2,5 @@
Description=Reboot Host%i
After=multi-user.target
Conflicts=obmc-host-startmin@%i.target
-RefuseManualStop=yes
OnFailure=obmc-chassis-poweroff@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-host-reset-running@.target b/target_files/obmc-host-reset-running@.target
index 94bb2b1..558bbe4 100644
--- a/target_files/obmc-host-reset-running@.target
+++ b/target_files/obmc-host-reset-running@.target
@@ -2,4 +2,3 @@
Description=Host%i running after reset
Conflicts=obmc-host-stop@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-reset@.target b/target_files/obmc-host-reset@.target
index 84d8701..e526448 100644
--- a/target_files/obmc-host-reset@.target
+++ b/target_files/obmc-host-reset@.target
@@ -1,7 +1,6 @@
[Unit]
Description=Host%i (Reset Check)
Conflicts=obmc-host-stop@%i.target
-RefuseManualStop=yes
[Install]
WantedBy=multi-user.target
diff --git a/target_files/obmc-host-shutdown@.target b/target_files/obmc-host-shutdown@.target
index 3a43847..3689062 100644
--- a/target_files/obmc-host-shutdown@.target
+++ b/target_files/obmc-host-shutdown@.target
@@ -1,6 +1,5 @@
[Unit]
Description=Power%i Host Off
After=multi-user.target
-RefuseManualStop=yes
OnFailure=obmc-chassis-poweroff@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-host-start-pre@.target b/target_files/obmc-host-start-pre@.target
index fe38262..0678946 100644
--- a/target_files/obmc-host-start-pre@.target
+++ b/target_files/obmc-host-start-pre@.target
@@ -3,4 +3,3 @@
After=multi-user.target
Conflicts=obmc-host-stop@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-start@.target b/target_files/obmc-host-start@.target
index b8ea24a..6d7a99c 100644
--- a/target_files/obmc-host-start@.target
+++ b/target_files/obmc-host-start@.target
@@ -2,6 +2,5 @@
Description=Start Host%i
After=multi-user.target
Conflicts=obmc-host-stop@%i.target
-RefuseManualStop=yes
OnFailure=obmc-host-quiesce@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-host-started@.target b/target_files/obmc-host-started@.target
index 1db9faa..47a9f8e 100644
--- a/target_files/obmc-host-started@.target
+++ b/target_files/obmc-host-started@.target
@@ -5,4 +5,3 @@
After=obmc-host-starting@%i.target
Conflicts=obmc-host-stop@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-starting@.target b/target_files/obmc-host-starting@.target
index 9da182a..daf917d 100644
--- a/target_files/obmc-host-starting@.target
+++ b/target_files/obmc-host-starting@.target
@@ -5,4 +5,3 @@
After=obmc-host-start-pre@%i.target
Conflicts=obmc-host-stop@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-startmin@.target b/target_files/obmc-host-startmin@.target
index 609a360..7324d57 100644
--- a/target_files/obmc-host-startmin@.target
+++ b/target_files/obmc-host-startmin@.target
@@ -5,6 +5,5 @@
Wants=obmc-host-start-pre@%i.target
Wants=obmc-host-starting@%i.target
Wants=obmc-host-started@%i.target
-RefuseManualStop=yes
OnFailure=obmc-host-quiesce@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-host-stop-pre@.target b/target_files/obmc-host-stop-pre@.target
index 8e9d5c0..ffca1b0 100644
--- a/target_files/obmc-host-stop-pre@.target
+++ b/target_files/obmc-host-stop-pre@.target
@@ -5,4 +5,3 @@
Before=obmc-host-stopping@%i.target
Conflicts=obmc-host-startmin@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-stop@.target b/target_files/obmc-host-stop@.target
index 6fc8730..10c4456 100644
--- a/target_files/obmc-host-stop@.target
+++ b/target_files/obmc-host-stop@.target
@@ -6,6 +6,5 @@
Wants=obmc-host-stop-pre@%i.target
Wants=obmc-host-stopping@%i.target
Wants=obmc-host-stopped@%i.target
-RefuseManualStop=yes
OnFailure=obmc-chassis-poweroff@%i.target
OnFailureJobMode=flush
diff --git a/target_files/obmc-host-stopped@.target b/target_files/obmc-host-stopped@.target
index 4c2a1da..bf93961 100644
--- a/target_files/obmc-host-stopped@.target
+++ b/target_files/obmc-host-stopped@.target
@@ -6,4 +6,3 @@
Before=obmc-power-stop-pre@%i.target
Conflicts=obmc-host-startmin@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-stopping@.target b/target_files/obmc-host-stopping@.target
index f60efb1..04f80ff 100644
--- a/target_files/obmc-host-stopping@.target
+++ b/target_files/obmc-host-stopping@.target
@@ -8,4 +8,3 @@
Conflicts=obmc-host-startmin@%i.target
Conflicts=obmc-host-starting@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-timeout@.target b/target_files/obmc-host-timeout@.target
index b87507b..22d7ffe 100644
--- a/target_files/obmc-host-timeout@.target
+++ b/target_files/obmc-host-timeout@.target
@@ -1,4 +1,3 @@
[Unit]
Description=Host instance %i timed out refreshing Watchdog
Conflicts=obmc-chassis-poweroff@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-host-warm-reboot@.target b/target_files/obmc-host-warm-reboot@.target
index 33b9246..f6ff0bc 100644
--- a/target_files/obmc-host-warm-reboot@.target
+++ b/target_files/obmc-host-warm-reboot@.target
@@ -4,4 +4,3 @@
Description=Graceful Warm Reboot Host%i
After=multi-user.target
Conflicts=obmc-host-startmin@%i.target
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-off@.target b/target_files/obmc-power-off@.target
index feda246..a04c631 100644
--- a/target_files/obmc-power-off@.target
+++ b/target_files/obmc-power-off@.target
@@ -5,4 +5,3 @@
After=obmc-power-stop@%i.target
Conflicts=obmc-chassis-poweron@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-on@.target b/target_files/obmc-power-on@.target
index 89e9bde..be28a57 100644
--- a/target_files/obmc-power-on@.target
+++ b/target_files/obmc-power-on@.target
@@ -5,4 +5,3 @@
After=obmc-power-start@%i.target
Conflicts=obmc-chassis-poweroff@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-reset-on@.target b/target_files/obmc-power-reset-on@.target
index d24d401..10858f1 100644
--- a/target_files/obmc-power-reset-on@.target
+++ b/target_files/obmc-power-reset-on@.target
@@ -2,4 +2,3 @@
Description=Chassis%i power on after reset
Conflicts=obmc-chassis-poweroff@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-start-pre@.target b/target_files/obmc-power-start-pre@.target
index eb1c164..33f6261 100644
--- a/target_files/obmc-power-start-pre@.target
+++ b/target_files/obmc-power-start-pre@.target
@@ -7,4 +7,3 @@
Wants=mapper-subtree-remove@-xyz-openbmc\x5fproject-logging\x3Axyz.openbmc_project.Logging.ErrorBlocksTransition.service
After=mapper-subtree-remove@-xyz-openbmc\x5fproject-logging\x3Axyz.openbmc_project.Logging.ErrorBlocksTransition.service
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-start@.target b/target_files/obmc-power-start@.target
index 46fb34a..a21863e 100644
--- a/target_files/obmc-power-start@.target
+++ b/target_files/obmc-power-start@.target
@@ -5,4 +5,3 @@
After=multi-user.target
Conflicts=obmc-chassis-poweroff@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-stop-pre@.target b/target_files/obmc-power-stop-pre@.target
index 9462a29..4ec9c45 100644
--- a/target_files/obmc-power-stop-pre@.target
+++ b/target_files/obmc-power-stop-pre@.target
@@ -5,4 +5,3 @@
After=obmc-host-stopped@%i.target
Conflicts=obmc-chassis-poweron@%i.target
RefuseManualStart=yes
-RefuseManualStop=yes
diff --git a/target_files/obmc-power-stop@.target b/target_files/obmc-power-stop@.target
index 0072b41..dfdb429 100644
--- a/target_files/obmc-power-stop@.target
+++ b/target_files/obmc-power-stop@.target
@@ -6,4 +6,3 @@
Conflicts=obmc-chassis-poweron@%i.target
Conflicts=fsi-disable.service
RefuseManualStart=yes
-RefuseManualStop=yes