You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prometheus integration returns inconsistent capacity values when a host is in "maintenance" and cloudstack-management service is restarted.
STEPS TO REPRODUCE
1. Set "maintenance" status for a host
2. In database, the capacity rows are deleted in the op_host_capacity table, for the said host
3. Prometheus integration returns capacities with value=0
4. Restart cloudstack-management service while the host is still in maintenance
5. In database, table op_host_capacity is populated, with capacity_state = Disabled
6. Prometheus integration now returns capacity values from used/total_capacity columns, ignoring the capacity_state
EXPECTED RESULTS
Prometheus integration returns capacity values=0 when the capacity is missing (eg. host is in maintenance) or when the capacity_state is set at Disabled (eg. host in maintenance and service is restarted)
ACTUAL RESULTS
Prometheus integration returns capacity values all the time as long as the used/total_capacity columns exist, ignoring when the capacity_state is Disabled.
Activity
boring-cyborg commentedon Dec 20, 2022
Thanks for opening your first issue here! Be sure to follow the issue template!
DaanHoogland commentedon Dec 20, 2022
@benj-n can you look at #5773 it might do what you need (for 4.18 hopefully)
benj-n commentedon Dec 20, 2022
I am under the impression that #4438 has superseded #5773
And that none of them adds anything related to capacity states.
DaanHoogland commentedon Dec 21, 2022
ok, I'll have a look at your PR and try to find some others to do the same.