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

Co-processes feature request #296

Closed
yellowmegaman opened this issue Mar 20, 2017 · 2 comments
Closed

Co-processes feature request #296

yellowmegaman opened this issue Mar 20, 2017 · 2 comments

Comments

@yellowmegaman
Copy link

yellowmegaman commented Mar 20, 2017

I'd like to put this idea up for discussion.

I would be great if a co-process could be tweaked so it starts right away, not waiting for preStart to complete.

Use case:

  1. I don't want to run supervisord/runit/s6
  2. i want to run consul agent as a co-process
  3. preStart has leader election based on consul sessions/keys
  4. i want to register sessions against local consul agent so when it leaves, sessions get expired

If i create new session against some consul agent that won't be terminated when container is terminated, session will remain. I don't like all this renew stuff, consul agent leave event is just more efficient.

Is it hard/ok by design to implement?
Something like:

"coprocesses": [
    {
      "name": "consul_agent",
      "command": ["consul", "agent", "etcetera", "etcetera"],
      "restarts": "unlimited",
      "start_after": "init"
    }
  ]

Thanks a lot in advance!

@tgross
Copy link
Contributor

tgross commented Mar 20, 2017

Co-processes are being removed in ContainerPilot v3 in lieu of supporting multiple first-class processes. That is, all the processes will be co-processes. This will allow you to specify dependency chains explicitly (or just start immediately!) just as you're asking for here.

See https://github.com/joyent/rfd/blob/master/rfd/0086/multiprocess.md for the design doc for this and keep an eye on #290 and #283 for progress.

@tgross tgross closed this as completed Mar 20, 2017
@yellowmegaman
Copy link
Author

yellowmegaman commented Mar 20, 2017

Awesome! So i'll have to rewrite all my configs 😃
Thanks a lot for info and links!
Hope this feature will land in releases anytime soon)

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

2 participants