@@ -123,7 +123,8 @@ func (inst *Install) PXE(kargs []string, liveIgnition, ignition conf.Conf, offli
123
123
}
124
124
125
125
installerConfig := installerConfig {
126
- Console : []string {consoleKernelArgument [coreosarch .CurrentRpmArch ()]},
126
+ Console : []string {consoleKernelArgument [coreosarch .CurrentRpmArch ()]},
127
+ AppendKargs : renderCosaTestIsoDebugKargs (),
127
128
}
128
129
installerConfigData , err := yaml .Marshal (installerConfig )
129
130
if err != nil {
@@ -136,7 +137,7 @@ func (inst *Install) PXE(kargs []string, liveIgnition, ignition conf.Conf, offli
136
137
liveIgnition .AddFile ("/etc/coreos/installer.d/mantle.yaml" , string (installerConfigData ), mode )
137
138
}
138
139
139
- inst .kargs = kargs
140
+ inst .kargs = append ( renderCosaTestIsoDebugKargs (), kargs ... )
140
141
inst .ignition = ignition
141
142
inst .liveIgnition = liveIgnition
142
143
@@ -363,6 +364,18 @@ func renderInstallKargs(t *installerRun, offline bool) []string {
363
364
return args
364
365
}
365
366
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
+
366
379
func (t * installerRun ) destroy () error {
367
380
t .builder .Close ()
368
381
if t .tempdir != "" {
@@ -602,6 +615,7 @@ func (inst *Install) InstallViaISOEmbed(kargs []string, liveIgnition, targetIgni
602
615
installerConfig := installerConfig {
603
616
IgnitionFile : "/var/opt/pointer.ign" ,
604
617
DestDevice : "/dev/vda" ,
618
+ AppendKargs : renderCosaTestIsoDebugKargs (),
605
619
}
606
620
607
621
// XXX: https://github.com/coreos/coreos-installer/issues/1171
@@ -615,7 +629,7 @@ func (inst *Install) InstallViaISOEmbed(kargs []string, liveIgnition, targetIgni
615
629
installerConfig .AppendKargs = append (installerConfig .AppendKargs , "rd.multipath=default" , "root=/dev/disk/by-label/dm-mpath-root" , "rw" )
616
630
}
617
631
618
- inst .kargs = kargs
632
+ inst .kargs = append ( renderCosaTestIsoDebugKargs (), kargs ... )
619
633
inst .ignition = targetIgnition
620
634
inst .liveIgnition = liveIgnition
621
635
0 commit comments