@@ -123,7 +123,8 @@ func (inst *Install) PXE(kargs []string, liveIgnition, ignition conf.Conf, offli
123123 }
124124
125125 installerConfig := installerConfig {
126- Console : []string {consoleKernelArgument [coreosarch .CurrentRpmArch ()]},
126+ Console : []string {consoleKernelArgument [coreosarch .CurrentRpmArch ()]},
127+ AppendKargs : renderCosaTestIsoDebugKargs (),
127128 }
128129 installerConfigData , err := yaml .Marshal (installerConfig )
129130 if err != nil {
@@ -136,7 +137,7 @@ func (inst *Install) PXE(kargs []string, liveIgnition, ignition conf.Conf, offli
136137 liveIgnition .AddFile ("/etc/coreos/installer.d/mantle.yaml" , string (installerConfigData ), mode )
137138 }
138139
139- inst .kargs = kargs
140+ inst .kargs = append ( renderCosaTestIsoDebugKargs (), kargs ... )
140141 inst .ignition = ignition
141142 inst .liveIgnition = liveIgnition
142143
@@ -363,6 +364,18 @@ func renderInstallKargs(t *installerRun, offline bool) []string {
363364 return args
364365}
365366
367+ // Sometimes the logs that stream from various virtio streams can be
368+ // incomplete because they depend on services inside the guest.
369+ // When you are debugging earlyboot/initramfs issues this can be
370+ // problematic. Let's add a hook here to enable more debugging.
371+ func renderCosaTestIsoDebugKargs () []string {
372+ if _ , ok := os .LookupEnv ("COSA_TESTISO_DEBUG" ); ok {
373+ return []string {"systemd.log_color=0" , "systemd.log_level=debug" , "systemd.journald.forward_to_console=1" }
374+ } else {
375+ return []string {}
376+ }
377+ }
378+
366379func (t * installerRun ) destroy () error {
367380 t .builder .Close ()
368381 if t .tempdir != "" {
@@ -602,6 +615,7 @@ func (inst *Install) InstallViaISOEmbed(kargs []string, liveIgnition, targetIgni
602615 installerConfig := installerConfig {
603616 IgnitionFile : "/var/opt/pointer.ign" ,
604617 DestDevice : "/dev/vda" ,
618+ AppendKargs : renderCosaTestIsoDebugKargs (),
605619 }
606620
607621 // XXX: https://github.com/coreos/coreos-installer/issues/1171
@@ -615,7 +629,7 @@ func (inst *Install) InstallViaISOEmbed(kargs []string, liveIgnition, targetIgni
615629 installerConfig .AppendKargs = append (installerConfig .AppendKargs , "rd.multipath=default" , "root=/dev/disk/by-label/dm-mpath-root" , "rw" )
616630 }
617631
618- inst .kargs = kargs
632+ inst .kargs = append ( renderCosaTestIsoDebugKargs (), kargs ... )
619633 inst .ignition = targetIgnition
620634 inst .liveIgnition = liveIgnition
621635
0 commit comments