Closed cescoffier closed 8 years ago
So, I realized it using the REST endpoint provided by the service discovery. When a pod is replaced, the service is not removed.
For instance I get this:
vertx-http-server UP 597ebb31-a33e-4fc8-918b-f8458c1c40e2
vertx-http-server UP 7afc9462-4b12-4af0-93ac-bf273a72c7e1
While it should see only one. One of the pod has been destroyed, while the service is still there. The issue is (I would guess) around https://github.com/vert-x3/vertx-service-discovery/blob/master/vertx-service-discovery-bridge-kubernetes/src/main/java/io/vertx/servicediscovery/kubernetes/KubernetesServiceImporter.java#L279. Either we don't get the notification, or we can't find the matching record.
To reproduce it, just take an application exposing a HTTP server. Check that it is discovered, then update it (or redeploy whatever you prefer), I've the service twice.
OK.. thx... I'll take a look
Shame on me.... It was duplicated because the Kubernetes importer was instantiated twice. So not a bug.
Sorry for the noise.
I can take a look at it if you want... do you have some additional informations? Andy