Skip to content

Commit 0444f22

Browse files
committed
mantle/kola/tests: use WWID in multipath.partition
In order to have a more generic test, let's not use user-friendly names while configuring multipath and specify instead a World Wide ID to the stub device. We also adapt the systemd units accordingly.
1 parent 2c70b17 commit 0444f22

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mantle/kola/tests/misc/multipath.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ systemd:
5151
5252
[Service]
5353
Type=oneshot
54-
ExecStart=/usr/sbin/mpathconf --enable
54+
ExecStart=/usr/sbin/mpathconf --enable --user_friendly_names n
5555
5656
[Install]
5757
WantedBy=multi-user.target
@@ -61,8 +61,8 @@ systemd:
6161
[Unit]
6262
Description=Set Up Multipath On /var/lib/containers
6363
ConditionFirstBoot=true
64-
Requires=dev-mapper-mpatha.device
65-
After=dev-mapper-mpatha.device
64+
Requires=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device
65+
After=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device
6666
# See https://github.com/coreos/coreos-assembler/pull/2457
6767
# and https://github.com/openshift/os/issues/743
6868
After=ostree-remount.service
@@ -71,7 +71,7 @@ systemd:
7171
7272
[Service]
7373
Type=oneshot
74-
ExecStart=/usr/sbin/mkfs.xfs -L containers -m reflink=1 /dev/mapper/mpatha
74+
ExecStart=/usr/sbin/mkfs.xfs -L containers -m reflink=1 /dev/disk/by-id/dm-uuid-mpath-0x0000000000000001
7575
# This is usually created by tmpfiles.d, but we run earlier than that.
7676
ExecStart=/usr/bin/mkdir -p /var/lib/containers
7777
@@ -119,7 +119,7 @@ func init() {
119119
ClusterSize: 1,
120120
Platforms: []string{"qemu"},
121121
UserData: mpath_on_var_lib_containers,
122-
AdditionalDisks: []string{"1G:mpath"},
122+
AdditionalDisks: []string{"1G:mpath,wwn=1"},
123123
})
124124
}
125125

0 commit comments

Comments
 (0)