-
Notifications
You must be signed in to change notification settings - Fork 20
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
sl-runctl stop
returns success before the supervisor is stopped
#137
Comments
@sam-github thoughts on enhancements to strong-supervisor? |
I feel your pain, synchronous CLI commands are handy for scripting, but its not worth enhancing supervisor, it is increasingly just a component of strong-pm, I don't even know how long the runctl channel will continue to be supported (we're moving to websockets). I suggest you look at http://strong-pm.io! That said, pm has the same issue of "when should a command return". Problem is that stop can take a while, a soft-stop can take a few minutes (up to 5: https://github.com/strongloop/strong-cluster-control/blob/master/lib/master.js#L34), with no sign of progress, as it waits for any open connections to that worker to go away, there will be no sign of anything in the CLI... which would call for some kind of explicit option, For start, its not even clear what start means:
I'd suggest that the low-friction way to do this is write a loop around If you wanted to modify https://github.com/strongloop/strong-mesh-models/blob/master/bin/sl-meshctl.js to support a REST API poller that could wait for various state, that would be interesting, and possibly easier than writing your own loop, maybe something like: |
The problem with At least in the meantime, a status check loop will probably suffice. I'll have to give it some more thought, since it's nice to get these problems fixed at the root. |
Do you need an rpm-per-app, or can you put strong-pm in an rpm? The latter should be easy. The former is an interesting use-case, I'd like to know if that's a requirement, because we can address it. Also, note that pm deals with a lot of deployment complexity: it accepts git pushes, or you can push updates with slc deploy. slc deploy works well with slc build. slc build can pack up an app and its deps into either an npm tarball, or a git deploy branch (not master). Those deps can be just javascript, or can be pre-built to include compiled addons. The latter is a good choice for deploying to an environment that doesn't have compilers or outbound network access. pm also allows remote control and debugging using arc, and supports password-based auth, as well as tunneling its control channel over ssh. But in summary, it sounds like the two features that would help you are:
Is this it? |
I think you're right probably right. Packaging and deploying One-shot runs might also work, but perhaps less of a requirement if there were more ways to add applications to the process manager. |
If you want the app and its runner packaged together, you'd need something like You have a heavily rpm-based deploy, you need the app to be packaged in the rpm, using |
The fundamental problem behind issue #136 was the use of
stop
andstart
in quick succession, where a running supervisor was seen as a successful start.It would be easier to script against if the
stop
CLI command only returns once the master is actually stopped.To reproduce (assuming a running process):
If the problem exists, then the supervisor information is returned. For example:
If the problem is resolved, then there should be an indication that the master is stopped. For example:
A fix didn't seem trivial, so I might not get a chance to fix this in the near future, so suggestions would be welcome.
The text was updated successfully, but these errors were encountered: