Skip to content

Commit

Permalink
Revert "qemu: drop supportsIsoKargs check cause now all platfroms sup…
Browse files Browse the repository at this point in the history
…port it"

This reverts commit 3d0c115.
  • Loading branch information
dustymabe committed Aug 22, 2023
1 parent a191716 commit 0c97893
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 0 additions & 3 deletions mantle/cmd/kola/testiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ var (
// "iso-offline-install.4k.s390fw",
"pxe-online-install.s390fw",
"pxe-offline-install.s390fw",
"miniso-install.s390fw",
"miniso-install.nm.s390fw",
"miniso-install.4k.nm.s390fw",
}
tests_ppc64le = []string{
"iso-live-login.ppcfw",
Expand Down
15 changes: 12 additions & 3 deletions mantle/platform/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,13 @@ func coreosInstallerSupportsISOKargs() (bool, error) {
return strings.Contains(out, "kargs"), nil
}

// supportsIsoKargs returns true if we support modifying ISO kargs on the
// current arch. We could also auto-detect this, but would probably still want
// some assertions that we detected as supported on !s390x.
func (builder *QemuBuilder) supportsIsoKargs() bool {
return builder.architecture != "s390x"
}

func (builder *QemuBuilder) setupIso() error {
if err := builder.ensureTempdir(); err != nil {
return err
Expand Down Expand Up @@ -1440,9 +1447,11 @@ func (builder *QemuBuilder) setupIso() error {
return errors.Wrapf(err, "running `coreos-installer iso kargs modify`; old CoreOS ISO?")
}
// Only actually emit a warning if we expected it to be supported
stderr := stderrb.String()
plog.Warningf("running coreos-installer iso kargs modify: %v: %q", err, stderr)
plog.Warning("likely targeting an old CoreOS ISO; ignoring...")
if builder.supportsIsoKargs() {
stderr := stderrb.String()
plog.Warningf("running coreos-installer iso kargs modify: %v: %q", err, stderr)
plog.Warning("likely targeting an old CoreOS ISO; ignoring...")
}
}
} else if len(builder.AppendKernelArgs) > 0 {
return fmt.Errorf("coreos-installer does not support appending kernel args")
Expand Down

0 comments on commit 0c97893

Please sign in to comment.