test: cross arch build/boot smoke test for ppc64le,s390x#2069
test: cross arch build/boot smoke test for ppc64le,s390x#2069supakeen merged 3 commits intoosbuild:mainfrom
Conversation
f05edae to
b85084f
Compare
b85084f to
f07486e
Compare
f07486e to
456beba
Compare
0f50022 to
f27edc2
Compare
af57b3a to
52e8aba
Compare
52e8aba to
099532d
Compare
bcl
left a comment
There was a problem hiding this comment.
Other than that one question this looks good.
thozza
left a comment
There was a problem hiding this comment.
Thanks for this; I think that it makes sense.
That said, the default behavior of some of the scripts changes AFAICT, and I am not convinced that it is necessarily intentional. Requesting changes until this is sorted out.
099532d to
f5418be
Compare
This is useful to do basic testing for architectures like s390x or ppc64le that are not available easily (or even for a quick local aarch64 test).
This adds basic support to boot ppc64le/s390x machine. This allows to do: ``` $ ./test/scripts/build-image --arch ppc64le centos-10 qcow2 cfgpath $ ./test/scripts/boot-image ./build/centos_10-ppc64le-qcow2-empty ``` to easily boot test machines that are not easily available otherwise.
718ed8e to
c57a64e
Compare
433584b to
8aa85f8
Compare
This commit adds a minimal smoke test for centos-10/qcow2 that will create a qcow2 and boot it. It demos how we could do more cross arch testing and keeps the qemu code tested. We need to decide if we want to do more tests like this, its a trade-off. OTOH its nice to have (some) assurance that our images boot (we did break s390/ppc64 partition tables in the past by accident). OTOH its a bit of a pain when something fails to figure out of it is failing because of some qemu incompatibilites or because there is a real issue in the image. Having this at least for local testing/validation is probably useful though. Note that the s390x test needs qemu-user >= 7.2-rc2 so this will not run currently (I did run it on my local machine and it works but the kdump service takes > 5min to startup).
8aa85f8 to
63263ad
Compare
| if archName == "" { | ||
| archName = arch.Current().String() | ||
| } | ||
| archi, err := distribution.GetArch(archName) |
There was a problem hiding this comment.
Nitpick: I don't have any problem with the rename of arch -> archi, just wanted to point it out in case this was not intentional.
There was a problem hiding this comment.
Its needed because we also import arch so if we have arch there the arch module is shadowed (and a few lines below iirc this code access the arch module now).
|
Somehow, in my PR I rebased on top of this commit CICD started erroring out with: My theory is that an environmental variable GOFLAGS is set for that test, but then in my PR I actually override that variable with some other value (tags) so I shadow it. Therefore I only see the problem in my own PR. I guess you can disregard this comment then :-) |
| "-device", "e1000,netdev=net.0", | ||
| "-qmp", f"unix:{self._qmp_socket},server,nowait", | ||
| # boot | ||
| "-drive", f"file={self._img},if=none,id=disk0,format=qcow2", |
There was a problem hiding this comment.
This hunk sneaked into main somehow and this does not appear to be correct. It renders as:
['qemu-system-x86_64', '-M', 'accel=kvm', '-cpu', 'host', '-device', 'virtio-scsi-pci,id=scsi', '-device', 'scsi-hd,drive=disk0', '-bios', '/usr/share/OVMF/OVMF_CODE.fd', '-m', '2048', '-serial', 'stdio', '-monitor', 'none', '-device', 'virtio-net-pci,netdev=net.0,id=net.0', '-netdev', 'user,id=net.0,hostfwd=tcp::49925-:22', '-qmp', 'unix:/tmp/vmtest-v614uhg7-disk.img/qmp.socket,server,nowait', '-drive', 'file=/var/tmp/tmpp40bxujp/disk.img,if=none,id=disk0,format=qcow2', '-nographic', '-cdrom', PosixPath('/var/tmp/tmpdk5gg6b6/netinst.iso'), PosixPath('/var/tmp/tmpp40bxujp/disk.img')]
Which ends with QEMU complaining about raw image not being qcow2. That can be fixed, but then the issue is the image is passed twice on the command line - once via -device and once via argument. When I remove the argument, then QEMU does not boot there is some problem with SCSI setup.
Another problem is few lines below when -cdrom is appended with Path object, but that is an easy fix with str.
I will look into this later next week. Actually, let me try to do a quick fix and see how many tests are fixed: #2103
Changes with 0.231.0 ---------------- - Drop iommu.strict=0 from aarch64 EC2 images (osbuild/images#2090) - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - bootc: Fix selinux labeling when using separate build container (osbuild/images#2092) - Author: Alexander Larsson, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - ci: resolve dubious ownership for git (osbuild/images#2100) - Author: Lukáš Zapletal, Reviewers: Achilleas Koutsou, Michael Vogt - data: import RH v4 key on rhel-10.1+ only (osbuild/images#2097) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger - distrodefs: drop `use_syslinux` as it has no effect (osbuild/images#2088) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger - fedora: /boot on btrfs for Fedora Cloud 44 (HMS-9737) (osbuild/images#1960) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Neal Gompa (ニール・ゴンパ), Tomáš Hozza - fedora: add `server-network-installer` (osbuild/images#2094) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - installer: only install `syslinux` when needed (osbuild/images#2089) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - manifest: add `set -e` to `bootc switch...` kickstart %post (osbuild/images#2093) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - many: include legal and license files in ISO (osbuild/images#2099) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - osbuild: drop `valueIn` helper (osbuild/images#2086) - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger - readme: update link to image definitions (osbuild/images#2070) - Author: Anna Vítová, Reviewers: Achilleas Koutsou, Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - test: cross arch build/boot smoke test for ppc64le,s390x (osbuild/images#2069) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
Changes with 0.231.0 ---------------- - Drop iommu.strict=0 from aarch64 EC2 images (osbuild/images#2090) - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - bootc: Fix selinux labeling when using separate build container (osbuild/images#2092) - Author: Alexander Larsson, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - ci: resolve dubious ownership for git (osbuild/images#2100) - Author: Lukáš Zapletal, Reviewers: Achilleas Koutsou, Michael Vogt - data: import RH v4 key on rhel-10.1+ only (osbuild/images#2097) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger - distrodefs: drop `use_syslinux` as it has no effect (osbuild/images#2088) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger - fedora: /boot on btrfs for Fedora Cloud 44 (HMS-9737) (osbuild/images#1960) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Neal Gompa (ニール・ゴンパ), Tomáš Hozza - fedora: add `server-network-installer` (osbuild/images#2094) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - installer: only install `syslinux` when needed (osbuild/images#2089) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - manifest: add `set -e` to `bootc switch...` kickstart %post (osbuild/images#2093) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - many: include legal and license files in ISO (osbuild/images#2099) - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza - osbuild: drop `valueIn` helper (osbuild/images#2086) - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger - readme: update link to image definitions (osbuild/images#2070) - Author: Anna Vítová, Reviewers: Achilleas Koutsou, Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza - test: cross arch build/boot smoke test for ppc64le,s390x (osbuild/images#2069) - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
test: run cross arch smoke test on ppc64le, s390x
This commit adds a minimal smoke test for centos-10/qcow2 that
will create a qcow2 and boot it. It demos how we could do more
cross arch testing and keeps the qemu code tested.
We need to decide if we want to do more tests like this, its
a trade-off. OTOH its nice to have (some) assurance that our
images boot (we did break s390/ppc64 partition tables in the
past by accident). OTOH its a bit of a pain when something fails
to figure out of it is failing because of some qemu incompatibilites
or because there is a real issue in the image.
Having this at least for local testing/validation is probably
useful though.
Note that the s390x test needs qemu-user >= 7.2-rc2 so this will
not run currently (I did run it on my local machine and it works
but the kdump service takes > 5min to startup).
vmtest: add cross arch boot support for s390x/ppc64le
This adds basic support to boot ppc64le/s390x machine. This
allows to do:
to easily boot test machines that are not easily available otherwise.
build-image: add support for (optional) --arch to build
This is useful to do basic testing for architectures like s390x
or ppc64le that are not available easily (or even for a quick
local aarch64 test).