Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement leave_on_terminate for Consul co-process #27

Open
misterbisson opened this issue Sep 12, 2016 · 3 comments
Open

Implement leave_on_terminate for Consul co-process #27

misterbisson opened this issue Sep 12, 2016 · 3 comments

Comments

@misterbisson
Copy link
Contributor

Following from TritonDataCenter/containerpilot#218: When a Consul agent running as a co-process in a ContainerPiloted application exits, it is not de-registered from the Consul cluster.

@fitz123 suggests the leave_on_terminate Consul option will fix that. This ticket proposes implementing that option in this repo and for others in https://github.com/autopilotpattern.

@fitz123
Copy link
Contributor

fitz123 commented Sep 12, 2016

I'm usually running 1 consul agent per node, using "--net host" in my environment, but I think it should work the same way for consul as a coprocess. You can enable this passing the option as an env variable during container build or creation:
-e 'CONSUL_LOCAL_CONFIG={"leave_on_terminate": true}'

(https://hub.docker.com/_/consul/)
Just a suggestion

@tgross
Copy link
Contributor

tgross commented Feb 9, 2017

In ContainerPilot 2.6.0 we provided support for this via updated Consul bindings, as well as the deregisterCriticalServiceAfter field in the client. We've updated ContainerPilot in #42.

Should we include deregisterCriticalServiceAfter in this issue? If so, what's a reasonable default value?

@gbmeuk
Copy link

gbmeuk commented Mar 10, 2017

Hi guys,

I was just wondering if anyone could quickly answer whether you guys are moving towards only running Consul as a coprocessor dropping the use of the API in the containerpilot code?

EDIT: never mind. I found the answer in TritonDataCenter/containerpilot#162 and will look to update our base images to use coprocesses going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants