Skip to content

Commit

Permalink
testiso: check that /boot/ignition was nuked
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon authored and ravanelli committed Aug 25, 2021
1 parent f22730e commit 6bece17
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mantle/cmd/kola/testiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,20 @@ ExecStart=/bin/sh -c '/usr/bin/echo %s >/dev/virtio-ports/testisocompletion && s
RequiredBy=multi-user.target
`, signalCompleteString)

var checkNoIgnition = fmt.Sprintf(`[Unit]
Description=TestISO Verify No Ignition Config
OnFailure=emergency.target
OnFailureJobMode=isolate
Before=coreos-test-installer.service
After=coreos-ignition-firstboot-complete.service
RequiresMountsFor=/boot
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c '[ ! -e /boot/ignition ]'
[Install]
RequiredBy=multi-user.target`)

var multipathedRoot = fmt.Sprintf(`[Unit]
Description=TestISO Verify Multipathed Root
OnFailure=emergency.target
Expand Down Expand Up @@ -470,6 +484,7 @@ func testPXE(ctx context.Context, inst platform.Install, outdir string, offline

targetConfig := *virtioJournalConfig
targetConfig.AddSystemdUnit("coreos-test-installer.service", signalCompletionUnit, conf.Enable)
targetConfig.AddSystemdUnit("coreos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable)

mach, err := inst.PXE(pxeKernelArgs, liveConfig, targetConfig, offline)
if err != nil {
Expand Down Expand Up @@ -515,6 +530,7 @@ func testLiveIso(ctx context.Context, inst platform.Install, outdir string, offl

targetConfig := *virtioJournalConfig
targetConfig.AddSystemdUnit("coreos-test-installer.service", signalCompletionUnit, conf.Enable)
targetConfig.AddSystemdUnit("coreos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable)
if inst.MultiPathDisk {
targetConfig.AddSystemdUnit("coreos-test-installer-multipathed.service", multipathedRoot, conf.Enable)
}
Expand Down

0 comments on commit 6bece17

Please sign in to comment.