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

Raise usage errors if inappropriate hab svc load options are given in hab sup run #7646

Open
christophermaier opened this issue Apr 28, 2020 · 1 comment
Labels
Focus: CLI Related to the Habitat CLI (core/hab) component Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Bug Issues that describe broken functionality

Comments

@christophermaier
Copy link
Contributor

hab sup run is used to start a Supervisor, and hab svc load is used to instruct a running Supervisor to load a new service.

However, as a way to have allow Habitat containers to start-and-load a service in a single ENTRYPOINT, hab sup run takes options and arguments of hab svc load to effectively perform both operations at once.

However, this has led to confusion, in that it is currently possible to provide hab svc load options to hab sup run commands that have no effect, but are not marked as errors.

For example, hab sup run --topology=leader is legal, and a Supervisor starts up, but it makes no sense, as --topology concerns how services run, not how Supervisors run. As a result, some users talk about "running a Supervisor in a leader topology". This is wrong, and needlessly confusing.

(A more correct invocation would be hab sup run core/redis --topology=leader, which says "Start a Supervisor, and then load and run core/redis as a service in a leader topology".)

Other scenarios can be presented for all the other hab svc load options that are provided to hab sup run without also providing the package identifier of the service they should apply to.

While it would be nice to ultimately tease these two commands apart more completely, for the near term we should adjust our CLI code to better document such instances, as well as catch them as errors when they are invoked. This will help to make it more clear what the distinction between Supervisors and Services is.

@christophermaier christophermaier changed the title Raise usage errors if hab svc load options are given in hab sup run Raise usage errors if inappropriate hab svc load options are given in hab sup run Apr 28, 2020
@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Focus: CLI Related to the Habitat CLI (core/hab) component Type: Bug Issues that describe broken functionality and removed A-supervisor labels Jul 24, 2020
@stale
Copy link

stale bot commented Jul 31, 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 Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus: CLI Related to the Habitat CLI (core/hab) component Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Bug Issues that describe broken functionality
Projects
None yet
Development

No branches or pull requests

2 participants