Skip to content

Commit

Permalink
mantle/kola/testiso: expose testiso debug via COSA_TESTISO_DEBUG env var
Browse files Browse the repository at this point in the history
This will be useful in the future when trying to debug earlyboot testiso
issues further.
  • Loading branch information
dustymabe committed Aug 17, 2023
1 parent b8500f7 commit 5a6cbe3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mantle/cmd/kola/testiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,14 @@ func testLiveIso(ctx context.Context, inst platform.Install, outdir string, mini
isoKernelArgs = append(isoKernelArgs, liveISOFromRAMKarg)
}

// Sometimes the logs that stream from various virtio streams can be
// incomplete because they depend on services inside the guest.
// When you are debugging earlyboot/initramfs issues this can be
// problematic. Let's add a hook here to enable more debugging.
if _, ok := os.LookupEnv("COSA_TESTISO_DEBUG"); ok {
isoKernelArgs = append(isoKernelArgs, "systemd.log_color=0 systemd.log_level=debug systemd.log_target=console")
}

mach, err := inst.InstallViaISOEmbed(isoKernelArgs, liveConfig, targetConfig, outdir, isOffline, minimal)
if err != nil {
return 0, errors.Wrapf(err, "running iso install")
Expand Down

0 comments on commit 5a6cbe3

Please sign in to comment.