-
Notifications
You must be signed in to change notification settings - Fork 183
[rhcos-4.18] mantle/kola/tests: adapt mpath verification #4354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -51,7 +51,7 @@ systemd: | |||||
|
|
||||||
| [Service] | ||||||
| Type=oneshot | ||||||
| ExecStart=/usr/sbin/mpathconf --enable | ||||||
| ExecStart=/usr/sbin/mpathconf --enable --user_friendly_names n | ||||||
|
|
||||||
| [Install] | ||||||
| WantedBy=multi-user.target | ||||||
|
|
@@ -61,8 +61,8 @@ systemd: | |||||
| [Unit] | ||||||
| Description=Set Up Multipath On /var/lib/containers | ||||||
| ConditionFirstBoot=true | ||||||
| Requires=dev-mapper-mpatha.device | ||||||
| After=dev-mapper-mpatha.device | ||||||
| Requires=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device | ||||||
| After=dev-disk-by\x2did-dm\x2duuid\x2dmpath\x2d0x0000000000000001.device | ||||||
| # See https://github.com/coreos/coreos-assembler/pull/2457 | ||||||
| # and https://github.com/openshift/os/issues/743 | ||||||
| After=ostree-remount.service | ||||||
|
|
@@ -71,7 +71,7 @@ systemd: | |||||
|
|
||||||
| [Service] | ||||||
| Type=oneshot | ||||||
| ExecStart=/usr/sbin/mkfs.xfs -L containers -m reflink=1 /dev/mapper/mpatha | ||||||
| ExecStart=/usr/sbin/mkfs.xfs -L containers -m reflink=1 /dev/disk/by-id/dm-uuid-mpath-0x0000000000000001 | ||||||
| # This is usually created by tmpfiles.d, but we run earlier than that. | ||||||
| ExecStart=/usr/bin/mkdir -p /var/lib/containers | ||||||
|
|
||||||
|
|
@@ -119,7 +119,7 @@ func init() { | |||||
| ClusterSize: 1, | ||||||
| Platforms: []string{"qemu"}, | ||||||
| UserData: mpath_on_var_lib_containers, | ||||||
| AdditionalDisks: []string{"1G:mpath"}, | ||||||
| AdditionalDisks: []string{"1G:mpath,wwn=1"}, | ||||||
| }) | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -151,7 +151,8 @@ func verifyBootDropins(c cluster.TestCluster, m platform.Machine, checkBootuuid | |||||
|
|
||||||
| func verifyMultipath(c cluster.TestCluster, m platform.Machine, path string) { | ||||||
| srcdev := string(c.MustSSHf(m, "findmnt -nvr %s -o SOURCE", path)) | ||||||
| if !strings.HasPrefix(srcdev, "/dev/mapper/mpath") { | ||||||
| udevinfo := string(c.MustSSHf(m, "udevadm info %s", srcdev)) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||
| if !strings.Contains(udevinfo, "/dev/disk/by-id/dm-uuid-mpath-") && !strings.Contains(udevinfo, "DM_MPATH") { | ||||||
| c.Fatalf("mount %s has non-multipath source %s", path, srcdev) | ||||||
| } | ||||||
| } | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output of
c.MustSSHfincludes the raw standard output of the command, which might include trailing whitespace or newlines. This could cause the subsequentudevadm infocommand to fail or behave unexpectedly. It's safer to trim the whitespace from thesrcdevstring before using it in the next command.