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

Return non-zero on "microk8s status" when service is stopped #3975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rsalinas
Copy link

@rsalinas rsalinas commented May 17, 2023

Summary

microk8s status returns 0 when the server is down.

$ microk8s status --yaml ; echo $?
microk8s is not running, try microk8s start
0

What Should Happen Instead?
I would expect it to return non-zero, so that I don't need to search for text in the output.

This also complicates my life when trying to directly parse its output as yaml.
Closes #3974

Changes

It returns 1 instead of 0 when the server is down.

Testing

I DID NOT TEST MY CHANGES.
Please someone adopt this tiny change and test it for me :)

Possible Regressions

Checklist

  • Read the contributions page.
  • Submitted the CLA form, if you are a first time contributor.
  • The introduced changes are covered by unit and/or integration tests.

Notes

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

Successfully merging this pull request may close these issues.

"microk8s status" exits with zero return code when server is down
1 participant