Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix virt-customize issue in vmtests #3232

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

tpapagian
Copy link
Member

@tpapagian tpapagian commented Dec 16, 2024

Fixes broken vmtests in main branch (i.e. https://github.com/cilium/tetragon/actions/runs/12370210256/job/34524136468).

Details in the commit message.

@tpapagian tpapagian force-pushed the pr/apapag/test-vmtests branch from 76e9cf9 to 7c416c1 Compare December 16, 2024 16:59
@tpapagian tpapagian added the release-note/ci This PR makes changes to the CI. label Dec 16, 2024
@tpapagian tpapagian force-pushed the pr/apapag/test-vmtests branch 6 times, most recently from f33e6bf to 49d0a76 Compare December 17, 2024 06:46
Copy link

netlify bot commented Dec 17, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 49d0a76
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/67611e3b48f66a00089aa0d8
😎 Deploy Preview https://deploy-preview-3232--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tpapagian tpapagian force-pushed the pr/apapag/test-vmtests branch 13 times, most recently from cae6fb6 to 4f6a3af Compare December 17, 2024 12:51
In main branch vmtests seems broken with the following error:
Using: kernel:tests/vmtests/test-data/kernels/6.6/boot/vmlinuz-6.6.65
time="2024-12-16T16:25:58Z" level=info msg="starting to build images" queue=tetragon.qcow2
time="2024-12-16T16:25:58Z" level=info msg="starting command" args="[qemu-img convert -f qcow2 -O qcow2 tests/vmtests/test-data/images/base.qcow2 tests/vmtests/test-data/images/tetragon.qcow2]" cwd=/home/runner/work/tetragon/tetragon/go/src/github.com/cilium/tetragon path=/usr/bin/qemu-img
time="2024-12-16T16:25:58Z" level=info msg="set current working dir to 'tests/vmtests/test-data/images/'"
time="2024-12-16T16:25:58Z" level=info msg="starting command" args="[virt-customize -a tetragon.qcow2 --hostname tetragon --append-line /etc/sysctl.d/local.conf:kernel.panic_on_rcu_stall=1 --mkdir /home/runner/work/tetragon/tetragon/go/src/github.com/cilium/tetragon --copy-in /tmp/tetragon-vmtests-1313171169/fstab:/etc --copy-in /home/runner/work/tetragon/tetragon/go/src/github.com/cilium/tetragon/tests/vmtests/tetragon-tester:/sbin/ --copy-in /tmp/tetragon-vmtests-1313171169/tetragon-tester.json:/etc --copy-in /tmp/tetragon-vmtests-1313171169/tetragon-tester.service:/etc/systemd/system --run-command systemctl enable tetragon-tester.service --append-line /etc/ssh/sshd_config:PermitRootLogin yes --append-line /etc/ssh/sshd_config:PermitEmptyPasswords yes --copy-in /tmp/tetragon-vmtests-1313171169/20-interfaces.network:/etc/systemd/network --chmod 0644:/etc/systemd/network/20-interfaces.network --run-command systemctl enable systemd-networkd.service]" cwd=/home/runner/work/tetragon/tetragon/go/src/github.com/cilium/tetragon/tests/vmtests/test-data/images path=/usr/bin/virt-customize
time="2024-12-16T16:25:58Z" level=info msg="stdout> [   0.0] Examining the guest ...\n"
time="2024-12-16T16:26:09Z" level=warning msg="stderr> virt-customize: error: libguestfs error: passt exited with status 1\n"
time="2024-12-16T16:26:09Z" level=warning msg="stderr> \n"
time="2024-12-16T16:26:09Z" level=warning msg="stderr> If reporting bugs, run virt-customize with debugging enabled and include the complete output:\n"
time="2024-12-16T16:26:09Z" level=warning msg="stderr> \n"
time="2024-12-16T16:26:09Z" level=warning msg="stderr>   virt-customize -v -x [...]\n"
time="2024-12-16T16:26:09Z" level=error msg="error executing command" error="exit status 1" image=tetragon.qcow2
time="2024-12-16T16:26:09Z" level=warning msg="image file 'tests/vmtests/test-data/images/tetragon.qcow2' not deleted so that it can be inspected"
time="2024-12-16T16:26:09Z" level=warning msg="image build failed" image=tetragon.qcow2 queue= result="{Error:exit status 1 CachedImageUsed:false CachedImageDeleted:}"
Error: images errors:tetragon.qcow2: exit status 1

This happens from a recent update of libguestfs-tools from 1.46.2-10ubuntu3
to 1.52.0-5ubuntu3.

After enabling debug arguments in virt-customize we can see (full logs https://gist.github.com/tpapagian/e71fdd5f09e4eaa03d79e521a63bf435):
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: passt\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --one-off\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --socket /tmp/libguestfsGDkZz0/passt.sock\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --pid /tmp/libguestfsGDkZz0/passt3.pid\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --address 169.254.2.15\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --netmask 16\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --mac-addr 52:56:00:00:00:02\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: command: run: \\ --gateway 169.254.2.2\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> Don't run as root. Changing to nobody...\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> No routable interface for IPv6: IPv6 is disabled\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> Template interface: eth0 (IPv4)\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> MAC:\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     host: 52:56:00:00:00:02\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> DHCP:\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     assign: 169.254.2.15\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     mask: 255.255.0.0\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     router: 169.254.2.2\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> DNS:\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     169.254.2.2\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> DNS search list:\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     vfauej4skqkeff2vnl2tg2wrza.cx.internal.cloudapp.net\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> UNIX domain socket bound at /tmp/libguestfsGDkZz0/passt.sock\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> \n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> You can now start qemu (>= 7.2):\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     kvm ... -device virtio-net-pci,netdev=s -netdev stream,id=s,server=off,addr.type=unix,addr.path=/tmp/libguestfsGDkZz0/passt.sock\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> or qrap, for earlier qemu versions:\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr>     ./qrap 5 kvm ... -net socket,fd=5 -net nic,model=virtio\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> PID file open: Permission denied\n"
time="2024-12-17T07:44:12Z" level=warning msg="stderr> libguestfs: trace: launch = -1 (error)\n"

This is related to passt (https://passt.top/passt/) which for networking.
As we don't need networking in that step (i.e. no --install args in virt-customize)
we can disable that for now to unblock things.

We can revisit that in the future if needed.

Signed-off-by: Anastasios Papagiannis <anastasios.papagiannis@isovalent.com>
@tpapagian tpapagian force-pushed the pr/apapag/test-vmtests branch from 4f6a3af to 7578807 Compare December 17, 2024 12:53
@tpapagian tpapagian changed the title Test [CI] Fix virt-customize issue in vmtests Dec 17, 2024
@tpapagian tpapagian marked this pull request as ready for review December 17, 2024 13:27
@tpapagian tpapagian requested a review from a team as a code owner December 17, 2024 13:27
@tpapagian tpapagian requested a review from olsajiri December 17, 2024 13:27
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

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

lgtm

@tpapagian tpapagian merged commit 42f725c into main Dec 17, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants