VR HealthCheck fails when there are no VMs deployed
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 1.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 32
Description
### problem
A VR HA pair or single VR report the health check as failed when there are no VMs deployed to that VR. This causes alerts in the logs, triggering investigations.
Under the VR health check:
"dhcp_check.py" reports "No VMs running data available, skipping" (which is good)
"webserver.service" reports "warning" "service down at last check xxxxxxx" (which is bad)
This issue goes away if a VM is deployed and returns if it is deleted. If there is an VR HA pair, the failure report bounces back and forth between the 2 VR in the HA pair.
The attached screenshot has r-517/r518 in an HA pair as well as r-519/r-520.
### versions
This is on CloudStack 4.22.
### The steps to reproduce the bug
1. Create a VR Router (HA or not) and an isolated network
2. Deploy a VM to that isolated network
3. Delete the VM
4. The next health check will then report as failed
### What to do about it?
The VR healthcheck should not fail if there are no VMs deployed.
Contributor guide
Research direction
Start with dhcp_check.py and the webserver.service health-check path, then reproduce the issue on a VR with an isolated network after deleting its VM. Done means a VR with no deployed VMs remains healthy and does not emit the reported failure alert, including for an HA pair.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud, infrastructure, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 56/100