mesos-executor icon indicating copy to clipboard operation
mesos-executor copied to clipboard

Delay consul.Hook registration return

Open chemicL opened this issue 6 years ago • 0 comments

RegisterIntoConsul method should wait until the service instance is resolvable via local Consul agent.

Currently the method exits as soon as the registration call is done and proceeds. When this process is part of a redeployment Mesos will then issue deregistration of previous instances.

It seems deregistration in Consul can be quicker than registration and this creates a race condition in which the previous instances can be removed from Consul catalog before adding new ones are propagated to client agents.

The "best effort" solution would be to at least check at the local agent whether the registered instance is among the ones in the catalog (consul doesn't cache the state, it always reaches the masters for catalog queries).

chemicL avatar Nov 21 '19 13:11 chemicL