Skip to content

Commit

Permalink
tests: fix /var race in multipath.partition part 2
Browse files Browse the repository at this point in the history
This fixes the same race condition in a previous PR coreos#2457 [0]. The
difference is that in PR coreos#2758 [1], `mpath-var-lib-containers.service`
uses mkdir to create `/var/lib/containers` and in some cases it will race
against `ostree-remount.service` during the short window `/var` is
read-only. Have `mpath-var-lib-containers.service` run after
`ostree-remount.service` to resolve this.

[0] coreos#2457
[1] coreos#2758
  • Loading branch information
mike-nguyen committed May 25, 2022
1 parent 5f11e76 commit 46e7d0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mantle/kola/tests/misc/multipath.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ systemd:
ConditionFirstBoot=true
Requires=dev-mapper-mpatha.device
After=dev-mapper-mpatha.device
# See https://github.com/coreos/coreos-assembler/pull/2457
# and https://github.com/openshift/os/issues/743
After=ostree-remount.service
Before=kubelet.service
DefaultDependencies=no
Expand All @@ -78,8 +81,6 @@ systemd:
contents: |
[Unit]
Description=Mount /var/lib/containers
# See https://github.com/coreos/coreos-assembler/pull/2457
After=ostree-remount.service
After=mpath-var-lib-containers.service
Before=kubelet.service
Expand Down

0 comments on commit 46e7d0c

Please sign in to comment.