Skip to content

Commit 6488b2a

Browse files
committed
kola/testiso: make volume ID test arch-independent
The actual backing device used for the live ISO is arch-dependent. For example on aarch64, it actually just looks like another virtio disk (e.g. `/dev/vdb`). But we know that it must be mounted at `/run/media/iso`, so key off of that instead to find the backing device. Fixes 06da492 ("kola/testiso: test volume ID has OS name prefix").
1 parent 3b5f710 commit 6488b2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mantle/cmd/kola/testiso.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,12 @@ var verifyIsoVolumeId = `[Unit]
272272
Description=Verify ISO Volume ID
273273
OnFailure=emergency.target
274274
OnFailureJobMode=isolate
275+
RequiresMountsFor=/run/media/iso
275276
[Service]
276277
Type=oneshot
277278
RemainAfterExit=yes
278-
ExecStart=bash -c "[[ $(lsblk -no LABEL /dev/sr0) == %s-* ]]"
279+
# the backing device name is arch-dependent, but we know it's mounted on /run/media/iso
280+
ExecStart=bash -c "[[ $(lsblk -no LABEL $(findmnt -no SOURCE /run/media/iso)) == %s-* ]]"
279281
[Install]
280282
RequiredBy=coreos-installer.target`
281283

0 commit comments

Comments
 (0)