-
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
Stop K8s if running, when '--no-kubernetes' flag used #13072
Conversation
Hi @klaases. 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.
lets add before and after this PR in the description for easier PR review
@@ -801,6 +801,30 @@ func (k *Bootstrapper) GenerateToken(cc config.ClusterConfig) (string, error) { | |||
return joinCmd, nil | |||
} | |||
|
|||
// StopKubernetes stops existing kubernetes. | |||
func StopKubernetes(stop bool, cr cruntime.Manager, k8s config.KubernetesConfig, runner command.Runner) { |
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 suggest we still return the error and the caller should log the error with klog.Warn that only shows up in verbose logs
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.
Hi, I have updated this function. In this case the function does not return a value, and we are retaining the logging of the original error:
klog.Warningf("stop kubelet: %v", err)
Have added additional out.Infof to indicate the Kubernetes status a the end of the function as well.
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.
Have updated description and resolved lint errors, including resolving the cyclomatic complexity.
@@ -801,6 +801,30 @@ func (k *Bootstrapper) GenerateToken(cc config.ClusterConfig) (string, error) { | |||
return joinCmd, nil | |||
} | |||
|
|||
// StopKubernetes stops existing kubernetes. | |||
func StopKubernetes(stop bool, cr cruntime.Manager, k8s config.KubernetesConfig, runner command.Runner) { |
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.
Hi, I have updated this function. In this case the function does not return a value, and we are retaining the logging of the original error:
klog.Warningf("stop kubelet: %v", err)
Have added additional out.Infof to indicate the Kubernetes status a the end of the function as well.
} | ||
} | ||
|
||
// validateStartWithStopK8s starts a minikube cluster while stopping Kubernetes. |
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.
Add more comment of all the thing this test does
Since it's used in auto generated docs.
This test also deletes . So comment should say all things it does in the test and maybe rename subtest to include delete in it too
Refactor of |
/ok-to-test |
kvm2 driver with docker runtime
Times for minikube ingress: 30.8s 31.7s 30.2s 31.3s 30.3s Times for minikube start: 47.0s 45.5s 45.7s 45.5s 47.1s docker driver with docker runtime
Times for minikube start: 22.0s 21.0s 20.6s 20.8s 20.9s Times for minikube (PR 13072) ingress: 81.9s 26.4s 34.9s 26.4s 26.4s docker driver with containerd runtime
Times for minikube start: 40.8s 41.3s 40.1s 40.9s 42.5s Times for minikube ingress: 18.5s 32.4s 17.4s 32.4s 19.4s |
These are the flake rates of all failed tests.
Too many tests failed - See test logs for more details. To see the flake rates of all tests by environment, click here. |
/assign |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: klaases, sharifelgamal 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 #12989
If the user starts minikube with Kubernetes, and then later starts minikube with "--no-kubernetes" flag, stop Kubernetes.
Before:
minikube start
minikube status
minikube start --no-kubernetes
minikube status
After:
minikube start
minikube status
minikube start --no-kubernetes
minikube status