starbops / kubevirtbmc

Power management for KubeVirt virtual machines through IPMI
Apache License 2.0
18 stars 3 forks source link

[BUG] The virtbmc agent pod keeps crashing due to the "bind permission denied" error #34

Closed starbops closed 4 days ago

starbops commented 4 days ago

Describe the bug

When a virtual machine is created, the corresponding virtbmc pod is created but unable to transition to a ready state. Instead, it keeps crashing with the following error message:

time="2024-11-11T03:15:04Z" level=info msg="Starting virtbmc"
time="2024-11-11T03:15:04Z" level=info msg="Initializing the simulator..."
time="2024-11-11T03:15:04Z" level=fatal msg="unable to run the ipmi simulator"

Note that the exact error was not exposed in the original main branch codebase, so I made a couple of changes to let it show the hidden error message. It turned out it was a bind: permission denied error.

To Reproduce Steps to reproduce the behavior:

  1. Create a Kind cluster
  2. Apply KubeVirt's VirtualMachine CRD
  3. Deploy cert-manager
  4. Deploy KubeVirtBMC
  5. Create a dummy VirtualMachine object
  6. Observe the virtbmc agent pod crashing with the error message bind: permission denied

Expected behavior

The agent can bind the network socket and works normally.

Screenshots

image

Environment (please complete the following information):

Additional context

This was first found when I was developing the e2e testing. My environment was on Apple Silicon macOS but it can also be reproduced in a linux/amd64 virtual machine.

However, the same issue does not seem to be happening on Harvester clusters. I can't find the difference that caused the issue.

starbops commented 4 days ago

Close as #35 was merged.