Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions mantle/cmd/kola/testiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,28 @@ func newBaseQemuBuilder() *platform.QemuBuilder {
return builder
}

func newQemuBuilder() *platform.QemuBuilder {
func newQemuBuilder(isPXE bool) *platform.QemuBuilder {
builder := newBaseQemuBuilder()
sectorSize := 0
if kola.QEMUOptions.Native4k {
sectorSize = 4096
}
builder.AddPrimaryDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
if system.RpmArch() == "s390x" && isPXE {
// For s390x PXE installs the network device has the bootindex of 1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm...like this is something hardcoded into qemu or the firmware or something?

I am trying to get my head around how this works; is it basically that the s390x firmware has builtin logic around "use the disk first if it's bootable, otherwise network" and our adjusting the bootorder breaks it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am sure it is something like that..i try without the bootindex and it looks for a bootable disk. I have been tried to get a hold of someone from the s390x world to confirm but no one seems to know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Do not use a primary disk in case of net-booting for this test
builder.AddDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
} else {
builder.AddPrimaryDisk(&platform.Disk{
Size: "12G", // Arbitrary

SectorSize: sectorSize,
})
}

return builder
}
Expand Down Expand Up @@ -319,7 +330,7 @@ func testPXE(inst platform.Install) error {
configStr = string(buf)
}

inst.Builder = newQemuBuilder()
inst.Builder = newQemuBuilder(true)
completionChannel, err := inst.Builder.VirtioChannelRead("testisocompletion")
if err != nil {
return err
Expand All @@ -335,7 +346,7 @@ func testPXE(inst platform.Install) error {
}

func testLiveIso(inst platform.Install, completionfile string) error {
inst.Builder = newQemuBuilder()
inst.Builder = newQemuBuilder(false)
completionChannel, err := inst.Builder.VirtioChannelRead("testisocompletion")
if err != nil {
return err
Expand Down