kumahq / kuma

🐻 The multi-zone service mesh for containers, Kubernetes and VMs. Built with Envoy. CNCF Sandbox Project.
https://kuma.io/install
Apache License 2.0
3.64k stars 331 forks source link

MeshMZService status updater seems to update even when there are no changes #11470

Closed lahabana closed 4 weeks ago

lahabana commented 4 weeks ago

What happened?

2024-09-19T11:56:58.744Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app-everywhere-cdzbd69dxz92wf94.kong-mesh-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"east","mesh":"default"},{"name":"demo-app","namespace":"kuma-demo","zone":"west","mesh":"default"}]}
2024-09-19T11:57:03.743Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app-everywhere-cdzbd69dxz92wf94.kong-mesh-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"west","mesh":"default"},{"name":"demo-app","namespace":"kuma-demo","zone":"east","mesh":"default"}]}
2024/09/19 11:57:17 http: TLS handshake error from 10.40.1.2:52408: EOF
2024-09-19T11:57:18.743Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app-everywhere-cdzbd69dxz92wf94.kong-mesh-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"east","mesh":"default"},{"name":"demo-app","namespace":"kuma-demo","zone":"west","mesh":"default"}]}
2024-09-19T11:57:38.744Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app-everywhere-cdzbd69dxz92wf94.kong-mesh-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"west","mesh":"default"},{"name":"demo-app","namespace":"kuma-demo","zone":"east","mesh":"default"}]}
2024-09-19T11:57:48.744Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app-everywhere-cdzbd69dxz92wf94.kong-mesh-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"east","mesh":"default"},{"name":"demo-app","namespace":"kuma-demo","zone":"west","mesh":"default"}]}

Looks like the deepEqual doesn't work as expected:

https://github.com/kumahq/kuma/blob/735321cfb0b4ec7237bf2f8aa84d8d3745fb8ca5/pkg/core/resources/apis/meshmultizoneservice/status_updater.go#L117-L129

jakubdyszkiewicz commented 4 weeks ago

any more info here? I cannot reproduce it :/

❯❯❯ kubectl logs -n kuma-system deployments/kuma-control-plane -f | grep 'meshmultizoneservice.status-updater'
2024-09-19T12:27:31.720Z    INFO    meshmultizoneservice.status-updater starting resilient component ...
2024-09-19T12:27:32.298Z    INFO    meshmultizoneservice.status-updater starting
2024-09-19T12:32:02.305Z    INFO    meshmultizoneservice.status-updater updating matched mesh services  {"meshmultizoneservice": "demo-app.kuma-system", "matchedMeshServices": [{"name":"demo-app","namespace":"kuma-demo","zone":"default","mesh":"default"},{"name":"demo-app-2","namespace":"kuma-demo","zone":"default","mesh":"default"}]}
jakubdyszkiewicz commented 4 weeks ago

ok I see it now in the logs. Sorting is not good enough. It was before when the name was hashed name