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

command line is awkward #4

Open
pitluga opened this issue Sep 17, 2012 · 11 comments
Open

command line is awkward #4

pitluga opened this issue Sep 17, 2012 · 11 comments

Comments

@pitluga
Copy link

pitluga commented Sep 17, 2012

force down application
force down application -d

That doesn't make sense. Think about a better api

@phinze
Copy link

phinze commented Oct 12, 2012

I'm glad I saw this, I was just about to force up to undo a force down

sleepdeprecation added a commit to sleepdeprecation/litmus_paper that referenced this issue Apr 2, 2017
A major complaint from users of litmus are that it's incredibly
non-intuitive to remove a forced health (see issue braintree#4). Most people will
just assume `force up` is the opposite to `force down`, putting their
service's health in the wrong state.

Hopefully, adding a `force remove` will make it easier for users to
perform their expected actions.
@ahayworth
Copy link
Contributor

I agree, the CLI is awkward. I'm not sure what a better one really looks like though... we'd be open to suggestions (and PRs). Maybe something like litmusctl --service foo --health bar and just get rid of the (-d|force|health|up|down) options?

If we did that, I think we'd want to rework the HTTP API, though.

@ssgelm
Copy link
Member

ssgelm commented Feb 4, 2018

I think the best proposal I have seen was in the last comment of #16: force down and unforce down.

@ahayworth
Copy link
Contributor

I had a thought yesterday:

litmusctl --service foo --health 0 --reason bar

We could deprecate the force (health|up|down) [-d] system and remove it in a future release. It'd definitely simplify the interaction model - all up/down/health really does is force a specific return value...

@ssgelm
Copy link
Member

ssgelm commented Feb 5, 2018

That's not entirely true though - force up != force health 100. I think you raise a valid point but I'm not 100% sure it actually ends up producing a less confusing UI.

@lollipopman
Copy link
Contributor

Another option might be:

litmustctl add force-down -s foo -r bar
litmustctl rm force-down -s foo

I am not a huge fan of unforce, as it is an awkward English word

@pitluga
Copy link
Author

pitluga commented Feb 6, 2018

How about this

litmusctl force-up --service foo --reason bar
litmusctl force-down --service foo --reason bar
litmusctl monitor --service foo # removes any existing forces

@lollipopman
Copy link
Contributor

@pitluga I like monitor, though I would prefer to keep the short options, but that is mainly a preference for less typing.

@ssgelm
Copy link
Member

ssgelm commented Feb 6, 2018

What about litmusctl reset?

@tcsalameh
Copy link
Contributor

tcsalameh commented Feb 6, 2018

I think the problem with commands that remove all existing forces is that there are cases where we we need more granularity, like removing a force down but not a force health.

Having a hard time coming up with an elegant interface that retains full functionality, but going off of @ssgelm suggestion something like this might work:

litmusctl force-down -s foo -r bar
litmusctl force-up -s foo -r bar
litmusctl force-health -s foo -r bar
litmusctl reset force-down -s foo
litmusctl reset force-up -s foo
litmusctl reset force-health -s foo

@pitluga
Copy link
Author

pitluga commented Feb 7, 2018

The confusing thing about litmusctl to me was always that ability to layer forces. If you only can have one force in place for a service, you should be able to cover all cases.

litmus-ctl force-down -s foo # forces the service down with health <actual>
litmus-ctl force-heath 10 -s foo # makes the service up with health 10
litmus-ctl force-heath 0 -s foo # makes the service down with health 0
litmus-ctl reset -s foo # makes the service's up|down status respect <actual> health
litmus-ctl force-up -s foo # forces service up with health <acutal>

By removing the side-effects of needing to know the current status of the service, you make the commands more predictable.

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

6 participants