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

BMO e2e cleanup potentially leaving VMs? #1531

Closed
lentzi90 opened this issue Jan 24, 2024 · 2 comments · Fixed by #1537
Closed

BMO e2e cleanup potentially leaving VMs? #1531

lentzi90 opened this issue Jan 24, 2024 · 2 comments · Fixed by #1537
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue is ready to be actively worked on.

Comments

@lentzi90
Copy link
Member

lentzi90 commented Jan 24, 2024

What steps did you take and what happened:

See https://jenkins.nordix.org/view/Metal3/job/metal3-bmo-e2e-test-pull/214/

[2024-01-24T11:43:09.124Z] + virt-install --connect qemu:///system --name bmo-e2e-0 --description 'Virtualized BareMetalHost' --osinfo=ubuntu-lts-latest --ram=4096 --vcpus=2 --disk size=20 --graphics=none --console pty,target_type=serial --serial file,path=/var/log/libvirt/qemu/bmo-e2e-0-serial0.log --xml ./devices/serial/@type=pty --xml ./devices/serial/log/@file=/var/log/libvirt/qemu/bmo-e2e-0-serial0.log --xml ./devices/serial/log/@append=on --pxe --network network=baremetal-e2e,mac=00:60:2f:31:81:01 --noautoconsole

[2024-01-24T11:43:09.124Z] ERROR    The MAC address '00:60:2f:31:81:01' is in use by another virtual machine. (Use --check mac_in_use=off or --check all=off to override)

script returned exit code 1

Anything else you would like to add:

My suspicion is that there is an issue with the cleanup script that somehow left a VM behind from the previous job. Then when this job started we got the conflict.
I could easily be mistaken though. Perhaps minikube somehow happened to get exactly the same MAC as we are giving the BMH VM? 🤯

Edit:
I think I found the issue now!

virsh_vms=$(virsh list --name --all)

This is not using the qemu:///system socket so it will not find the VMs.
I don't think we should select all VMs either. Somehow I missed that while reviewing.
We should instead do as here. In fact we should probably reuse that script and just take the prefix for what VMs to delete from a variable.

/kind bug

@metal3-io-bot metal3-io-bot added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue lacks a `triage/foo` label and requires one. labels Jan 24, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Feb 1, 2024

/triage accepted

@metal3-io-bot metal3-io-bot added triage/accepted Indicates an issue is ready to be actively worked on. and removed needs-triage Indicates an issue lacks a `triage/foo` label and requires one. labels Feb 1, 2024
@lentzi90
Copy link
Member Author

lentzi90 commented Feb 1, 2024

/assign @mquhuy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants