Skip to content

Commit abd0c18

Browse files
committed
kola/multipath: don't race with first-boot-complete.target
Anything using ConditionFirstBoot=true really wants Before=first-boot-complete.target too. Otherwise they run the risk of running again on reboot. Likely fixes coreos/rhel-coreos-config#66.
1 parent 71d63d6 commit abd0c18

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mantle/kola/tests/misc/multipath.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ systemd:
4545
[Unit]
4646
Description=Configure Multipath
4747
ConditionFirstBoot=true
48+
# Services with ConditionFirstBoot=true should use both
49+
# Before= and Wants= on first-boot-complete.target
50+
Before=first-boot-complete.target
51+
Wants=first-boot-complete.target
4852
ConditionPathExists=!/etc/multipath.conf
4953
Before=multipathd.service
5054
DefaultDependencies=no
@@ -61,6 +65,10 @@ systemd:
6165
[Unit]
6266
Description=Set Up Multipath On /var/lib/containers
6367
ConditionFirstBoot=true
68+
# Services with ConditionFirstBoot=true should use both
69+
# Before= and Wants= on first-boot-complete.target
70+
Before=first-boot-complete.target
71+
Wants=first-boot-complete.target
6472
Requires=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device
6573
After=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device
6674
# See https://github.com/coreos/coreos-assembler/pull/2457

0 commit comments

Comments
 (0)