apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

Load balancer counters are reset to 0 if there are load balancer changes #6849

Open weizhouapache opened 1 year ago

weizhouapache commented 1 year ago

CloudStack uses haproxy in VR to implement the load balancer feature. If there are any load balancer changes (add/remove VMs, add/remove rules, etc), the haproxy configuration will be regenerated and haproxy service in VR will be reloaded.

We've found an issue that counters are reset to 0 after haproxy reload, which is incorrect because the existing connections are remain alive.

Before haproxy reload: image

After haproxy reload: image

An issue has been created in haproxy community: https://discourse.haproxy.org/t/stats-are-reset-to-0-after-haproxy-reload/8051

Users who monitor the load balancer connections, please pay attention to it.

ISSUE TYPE
COMPONENT NAME
VR
CLOUDSTACK VERSION
4.17
4.18
CONFIGURATION

Advanced network load balancer

OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
weizhouapache commented 1 year ago

A possible solution for this https://discourse.haproxy.org/t/stats-are-reset-to-0-after-haproxy-reload/8051/9

However, cloudstack VR 4.17.1.0/4.18.0 uses haproxy 2.2.9, which is too old.

(It is verified when haproxy is upgraded to 2.6.6-1, following https://haproxy.debian.net/#distribution=Debian&release=bullseye&version=2.6)

rohityadavcloud commented 1 year ago

Does that impact usage records @weizhouapache ? That may be a blocker/critical issue if our usage records are historically incorrect.

weizhouapache commented 1 year ago

@rohityadavcloud no. Cloudstack does not generate usage records for load balancer connections. It only impacts autoscaling feature.