Enable kola on arm64 machines#661
Conversation
| ` | ||
| ) | ||
|
|
||
| var plog = capnslog.NewPackageLogger("github.com/coreos/mantle", "local") |
There was a problem hiding this comment.
The second argument should be platform/local.
| // architecture returns the machine architecture of the given platform. | ||
| func architecture(pltfrm string) string { | ||
| nativeArch := "amd64" | ||
| nativeArch := system.PortageArch() |
There was a problem hiding this comment.
If kola is running on arm64 but pltfrm is e.g. aws, architecture should still return amd64. It looks like the right place to fix the default selection is in sdk.DefaultBoard(). That will fix QEMUOptions.Board via defaultTargetBoard in cmd/kola/options.go.
There was a problem hiding this comment.
OK, please check what I have in the updated patch.
| "qemu-system-aarch64", | ||
| "-machine", "virt", | ||
| "-cpu", "cortex-a57", | ||
| "-m", "2048", |
There was a problem hiding this comment.
Just to double-check, this is necessary with images built with ./build_image prod? On amd64, dev images seem to need more than 1024 MB (coreos/bugs#1594) but prod images don't.
There was a problem hiding this comment.
Yes, the prod image will run out of memory. Strange behavior and unexpected errors start to occur.
cc5f601 to
acdff44
Compare
|
Rebased to latest, addressed comments above. |
acdff44 to
edce199
Compare
|
Rebase to latest. |
| nativeArch := "amd64" | ||
| if pltfrm == "qemu" && QEMUOptions.Board != "" { | ||
| nativeArch = strings.SplitN(QEMUOptions.Board, "-", 2)[0] | ||
| if pltfrm == "qemu" { |
There was a problem hiding this comment.
Why does this drop QEMUOptions.Board != ""?
| return boardToArch(QEMUOptions.Board) | ||
| } | ||
| return nativeArch | ||
| return boardToArch(sdk.DefaultBoard()) |
There was a problem hiding this comment.
This will still return arm64 on an ARM host if pltfrm is e.g. aws, which is incorrect. My point in #661 (comment) was that the sdk.DefaultBoard() change should be sufficient without altering kola.architecture(), since kola running on ARM will then default QEMUOptions.Board to arm64-usr. That will fix the default on qemu without affecting platforms which are amd64-only.
Though, come to think of it, architecture() should also special-case packet to look at PacketOptions.Board.
To aid in debugging dnsmasq problems configure dnsmasq to use verbose logging when the command line option '--log-level=DEBUG' is passed (plog level is at capnslog.DEBUG). The previous dnsmasq logging verbosity (quiet) is retained for lower plog levels. Signed-off-by: Geoff Levand <geoff@infradead.org>
In preparation for running kola on other architectures. Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
arm64 guest machines seem to run out of memory with 1024 MiB of RAM, so increase to 2048 MiB. Signed-off-by: Geoff Levand <geoff@infradead.org>
To allow kola to run on arm64 machines. Signed-off-by: Geoff Levand <geoff@infradead.org>
edce199 to
b8a4579
Compare
|
In the current patch set the only change I've made is for sdk.DefaultBoard() to use system.PortageArch() for its default value, which will be the host machine's arch (from runtime.GOARCH). QEMUOptions.Board should now be set to either a user specified kola.architecture() should now return amd64 for gce, aws, and esx, and either the With my new patch |
I think it's fine to default Packet to the host platform. We should arguably switch the default |
Allows kola to run on arm64 hosts. Also includes a patch that increases the debug output of dnsmasq.