remove 'flush' failure modes
The `flush` failure mode is impossible to use for a multi-host system.
If one of the services or targets fail on one host, it would cause the
pending operations for the other host to be flushed from the systemd
job queue. This leaves the other hosts in an indeterminate state.
We need to use `fail` in order to allow jobs targeting other hosts to
continue operating. This triggers the OnFailure for the target(s),
including ones which are pending awaiting dependencies.
As a result of this change, we may need to tweak some of the existing
services to add correct OnFailures.
Tested: Ran on a yosemite4 image in QEMU, which always fails part of
the boot sequence due to a missing PLDM-based satellite management
controller. After a few host reboot attempts the system settles into a
stable state on all hosts.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I2071219c9c139723785ba05bed18a6ff808ad565
diff --git a/target_files/obmc-chassis-poweron@.target b/target_files/obmc-chassis-poweron@.target
index 74547a2..93c5a31 100644
--- a/target_files/obmc-chassis-poweron@.target
+++ b/target_files/obmc-chassis-poweron@.target
@@ -8,4 +8,4 @@
Wants=obmc-power-start@%i.target
Wants=obmc-power-on@%i.target
OnFailure=obmc-chassis-poweroff@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail
diff --git a/target_files/obmc-host-reboot@.target b/target_files/obmc-host-reboot@.target
index be3522c..b72698d 100644
--- a/target_files/obmc-host-reboot@.target
+++ b/target_files/obmc-host-reboot@.target
@@ -3,4 +3,4 @@
After=multi-user.target
Conflicts=obmc-host-startmin@%i.target
OnFailure=obmc-chassis-poweroff@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail
diff --git a/target_files/obmc-host-shutdown@.target b/target_files/obmc-host-shutdown@.target
index 3689062..e9e4a39 100644
--- a/target_files/obmc-host-shutdown@.target
+++ b/target_files/obmc-host-shutdown@.target
@@ -2,4 +2,4 @@
Description=Power%i Host Off
After=multi-user.target
OnFailure=obmc-chassis-poweroff@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail
diff --git a/target_files/obmc-host-start@.target b/target_files/obmc-host-start@.target
index 6d7a99c..ffe39f8 100644
--- a/target_files/obmc-host-start@.target
+++ b/target_files/obmc-host-start@.target
@@ -3,4 +3,4 @@
After=multi-user.target
Conflicts=obmc-host-stop@%i.target
OnFailure=obmc-host-quiesce@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail
diff --git a/target_files/obmc-host-startmin@.target b/target_files/obmc-host-startmin@.target
index 7324d57..0d59d15 100644
--- a/target_files/obmc-host-startmin@.target
+++ b/target_files/obmc-host-startmin@.target
@@ -6,4 +6,4 @@
Wants=obmc-host-starting@%i.target
Wants=obmc-host-started@%i.target
OnFailure=obmc-host-quiesce@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail
diff --git a/target_files/obmc-host-stop@.target b/target_files/obmc-host-stop@.target
index 10c4456..c644dbc 100644
--- a/target_files/obmc-host-stop@.target
+++ b/target_files/obmc-host-stop@.target
@@ -7,4 +7,4 @@
Wants=obmc-host-stopping@%i.target
Wants=obmc-host-stopped@%i.target
OnFailure=obmc-chassis-poweroff@%i.target
-OnFailureJobMode=flush
+OnFailureJobMode=fail