-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Don't allow enabling addon on a paused cluster #15868
Conversation
Welcome @norshtein! |
Hi @norshtein. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rather we exit before showing the information about the addon, since it is useless for the users and makes it harder to read the error message
Thanks for reviewing! The information about the addon is shown at the very first when enabling addon https://github.com/kubernetes/minikube/blob/master/cmd/minikube/cmd/config/enable.go#L54, should we put the code for checking runtime status before that? |
I rather it be like this
we should also create a new Exit Error Code something unique that summaries the problem |
Hi @medyagh , I've updated the code, now the output becomes:
|
Hi @spowelljr , I've rebased on main branch and updated the code based on your code review, could you please take a look? |
norshtein this PR is close to be finihsed, please let me know when you update, we could merge it |
@medyagh sorry I was busy with some affairs last week, will update this PR soon. |
/ok-to-test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Looks like this is causing some failures on |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem looks like it's not checking if the cluster is stopped before trying to check if the pods are paused. If the cluster is stopped have VerifyNotPaused
return nil, otherwise then check if kube-system is paused or not. Trying to check the pods on a stopped cluster will result in errors.
@norshtein are you still working on this PR? |
Co-authored-by: Steven Powell <[email protected]>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fixed throwing an error on a stopped cluster Before:
After:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kvm2 driver with docker runtime
Times for minikube (PR 15868) ingress: 28.8s 28.3s 27.4s 28.3s 28.3s Times for minikube start: 52.1s 53.8s 52.4s 51.9s 52.6s docker driver with docker runtime
Times for minikube start: 22.7s 25.3s 23.4s 23.5s 22.8s Times for minikube ingress: 48.9s 49.4s 48.9s 48.4s 48.4s docker driver with containerd runtime
Times for minikube start: 24.1s 23.4s 20.9s 24.0s 20.4s Times for minikube ingress: 31.4s 31.4s 31.4s 31.4s 31.4s |
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: norshtein, spowelljr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fixes #15857
Tested in my local environment, when trying to enable
auto-pause
on a paused cluster, it gives following output and exit immediately: