Skip to content

Commit

Permalink
tests/boot-mirror: bump memory request to 8G on ppc64le and aarch64
Browse files Browse the repository at this point in the history
All our other root reprovisioning tests double the memory request on
ppc64le and aarch64 due to the larger page size. Do this for the boot
mirroring tests too and increase the memory request to 8G. With the
current 4G, the tests would sometimes panic during the reboot right
after the primary block device detach.

Even with 8G, the panic still happens, albeit much more rarely. Rather
than bumping the memory even more, I've found that sleeping a bit before
rebooting does the trick.

Partially fixes: #2725
Partially fixes: #3360
  • Loading branch information
jlebon committed Sep 13, 2023
1 parent e016eef commit c31d0d4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mantle/kola/tests/misc/boot-mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func runBootMirrorTest(c cluster.TestCluster) {
MinMemory: 4096,
},
}
// ppc64le and aarch64 use 64K pages
switch coreosarch.CurrentRpmArch() {
case "ppc64le", "aarch64":
options.MinMemory = 8192
}
// FIXME: for QEMU tests kola currently assumes the host CPU architecture
// matches the one under test
userdata := bootmirror.Subst("LAYOUT", coreosarch.CurrentRpmArch())
Expand Down Expand Up @@ -147,6 +152,11 @@ func runBootMirrorLUKSTest(c cluster.TestCluster) {
MinMemory: 4096,
},
}
// ppc64le and aarch64 use 64K pages
switch coreosarch.CurrentRpmArch() {
case "ppc64le", "aarch64":
options.MinMemory = 8192
}
// FIXME: for QEMU tests kola currently assumes the host CPU architecture
// matches the one under test
userdata := bootmirrorluks.Subst("LAYOUT", coreosarch.CurrentRpmArch())
Expand Down Expand Up @@ -230,6 +240,10 @@ func detachPrimaryBlockDevice(c cluster.TestCluster, m platform.Machine) {
}); err != nil {
c.Fatalf("Failed to retrieve boot ID: %v", err)
}

// Give some time to the host before doing the reboot to avoid panic.
time.Sleep(30 * time.Second)

err := m.Reboot()
if err != nil {
c.Fatalf("Failed to reboot the machine: %v", err)
Expand Down

0 comments on commit c31d0d4

Please sign in to comment.