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
So if only VM IP changes, we end up reusing the same target but keep probing the old IP.
One simple fix is to modify endpoint.Key() to use the endpoint IP too. I will do some digging to see if that causes other complications. If so, another quickfix is to modify http.go to append IP to endpoint.Key().
The text was updated successfully, but these errors were encountered:
Great find. I think this bug must have existed since Oct, 2022, when we started switching to the model of storing IPs in the endpoint struct itself, instead of asking the "targets" to resolve it.
I think modifying endpoint.Key() to include IP should be okay.
HTTP probes use endpoint key as identifier to decide when to recreate
probes. During VM recreations, it is possible for VM name to stay the
same but VM IP changes. By adding IP to key, we ensure that in such
cases, HTTP probes are recreated.
HTTP probes use endpoint key as identifier to decide when to recreate
probes. During VM recreations, it is possible for VM name to stay the
same but VM IP changes. By adding IP to key, we ensure that in such
cases, HTTP probes are recreated.
Describe the bug
If a probe target VM is recreated quickly enough and ends up with a new probe IP, HTTP probe still uses the old IP.
Cloudprober Version
All versions of cloudprober are affected.
Context
HTTP probes use endpoint.Key() to determine targets that are active and ones need to be recreated
https://github.com/cloudprober/cloudprober/blob/master/probes/http/http.go#L524
endpoint,Key() is defined as Name + labels, excluding IP. https://github.com/cloudprober/cloudprober/blob/master/targets/endpoint/endpoint.go#L41
So if only VM IP changes, we end up reusing the same target but keep probing the old IP.
One simple fix is to modify endpoint.Key() to use the endpoint IP too. I will do some digging to see if that causes other complications. If so, another quickfix is to modify http.go to append IP to endpoint.Key().
The text was updated successfully, but these errors were encountered: