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

Feature Request: synchronous flag for hab svc <start/stop> #2680

Open
smartb-pair opened this issue Jul 5, 2017 · 9 comments
Open

Feature Request: synchronous flag for hab svc <start/stop> #2680

smartb-pair opened this issue Jul 5, 2017 · 9 comments
Assignees
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature
Milestone

Comments

@smartb-pair
Copy link

smartb-pair commented Jul 5, 2017

Inspiration for this feature comes from a flag used by svcadm on Illumos and Solaris distros, -s, which tells the service state change to be synchronous:

If the -s option is specified, svcadm disables each service instance and then waits for each service instance to enter the disabled state. svcadm will return early if it determines that the service cannot reach this state without administrator intervention.

Such a flag for hab svc <start/stop> would be extremely useful for things like Test Kitchen integration tests, orchestration with tools like Chef, Ansible, etc, and operator intervention.

@chrisortman
Copy link

I think this could also be useful when doing package development inside the studio. I <3 the the supervisor is already running and I can startup a background (database) process to bind to, but would be nice to do hab start see what I did wrong and ctrl+c to be done vs hab start && sup-log .. hab svc unload

@smartb-pair
Copy link
Author

We keep finding more and more reasons we need synchronous start/stop/restart in orchestration and scripting tools - it's even proving difficult to judge when a service is up or down using hab svc status <svcname>.

@eeyun
Copy link
Contributor

eeyun commented Jul 11, 2017

Yeah this is an excellent idea :) we're most definitely going to want a first class cli experience for this kind of thing.

@smartb-pair
Copy link
Author

Upon further thought, we think it actually makes more sense for 'synchronous' mode to be the default, and async to be a flag.

@smartb-pair
Copy link
Author

...aaaand just ran into this again today. Just confirms again that having hab svc start return immediately (when a package may be installing/starting in the background) makes programming with hab quite difficult/annoying :)

@reset reset added E-hard and removed E-less-easy labels Jul 25, 2017
@reset reset modified the milestones: Accepted Major, Help Wanted Aug 3, 2017
@reset reset self-assigned this Oct 17, 2017
@reset reset removed this from the Accepted Major milestone Oct 17, 2017
@christophermaier christophermaier self-assigned this Jun 5, 2018
@christophermaier christophermaier removed their assignment Jun 8, 2018
@baumanj baumanj added the V-sup label Nov 29, 2018
@stale
Copy link

stale bot commented Apr 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Apr 2, 2020
@bixu
Copy link
Contributor

bixu commented Apr 3, 2020

This would still be a big win for CI flows.

@stale stale bot removed the Stale label Apr 3, 2020
@themightychris
Copy link
Contributor

I'm constantly copy-pasting code from my health check hooks into sleep loops in CI flows, we need an easy command that leverages supervisor plumbing for start-service-and-wait-for-health

@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Type: Feature Issues that describe a new desired feature and removed A-supervisor labels Jul 24, 2020
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature
Projects
None yet
Development

No branches or pull requests

10 participants