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

Depend on other services getting started #65

Open
shysteph opened this issue Feb 11, 2015 · 6 comments
Open

Depend on other services getting started #65

shysteph opened this issue Feb 11, 2015 · 6 comments

Comments

@shysteph
Copy link

Allow specifying a list of other names that this thing depends on in the pleasestart comment. Uses are things like applications that will not start without their database or chains of linked docker containers.

Possibly infer dependencies in the case of linked docker containers.

@jordansissel
Copy link
Owner

(Waxing poetic about operations...)
Operationally, I am against order-dependent software. Practically speaking, "app" requires "db" could just have the startup procedure of "app" wait until "db" is available. This puts the burden on the app itself and not the initialization system - this line of thinking comes mostly from working with dependent systems spread across machines/networks/datacenters where there is no local state of "db is up" because "db" runs on a system 4 racks away. :P

However, despite my hopes and opinions above, some init systems have dependency/ordering. lsb init, freebsd rcng, systemd, et al. Further, not all humans think like me - and that's awesome because a world full of same-thinkers would be really boring!

I'm not sure how this feature should be exposed in pleaserun, but I am definitely open to supporting it.

@shysteph
Copy link
Author

The big issue, at least for small systems, is linked docker containers. To my knowledge they won't even start if the container they are --link ed to is not up.

I won't argue that order-dependency, especially in init scripts is right or good. But it is a thing. And I would like software to help with solving stupid computer problems. I think you have somewhat of the same philosophy there.

My thoughts from a command line perspective is to add a --depends that takes the same sort of names that --name takes, though in a comma separated list. For systems that easily do dependency just add the depend when generating the config and for things like init just inc the counter on the init script.

@jordansissel
Copy link
Owner

+1

Should we limit --depends to programs[1] that are run on the same platform[2]?

  1. "program" - what pleaserun calls the thing you're running, like apache or nginx or redis.
  2. "platform" - what pleaserun calls the service manager (sysv init, systemd, launchd, upstart, etc)

For example, would you need a docker container to have order-dependence on something outside of docker?

@shysteph
Copy link
Author

I think it is very reasonable to limit --depends to only other programs that pleaserun has created on the platform. I could see wanting a flag that does request all pleaserun programs get run near the end of things (network and filesystems are up?).

@jordansissel
Copy link
Owner

I still want to do this, and might get to this soon.

@shysteph
Copy link
Author

Woo. I know clustered environments that handle various service being unavailable are preferred but this would be totally awesome. <3

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

No branches or pull requests

2 participants