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

Fix auto-pause on VMs (detect right control-plane IP) #11438

Merged
merged 3 commits into from
May 18, 2021

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented May 18, 2021

Fixes #11414

before this PR

Try kubectl - this time it is trying to reach the auto-sleep proxy port
$ kubectl get po -A
The connection to the server 192.168.99.151:32443 was refused - did you specify the right host or port?

after this PR



$ mk addons enable auto-pause
$ mk status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

18:28:07 medya/workspace/minikube
$ kc get pods -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
auto-pause    auto-pause-proxy-dc6979c79-tgm27   1/1     Running   0          32s
auto-pause    env-inject-846bbd58bc-zg9vs        1/1     Running   0          33s
kube-system   coredns-74ff55c5b-ftpqv            1/1     Running   0          34s
kube-system   etcd-minikube                      0/1     Running   0          48s
kube-system   kube-apiserver-minikube            1/1     Running   0          48s
kube-system   kube-controller-manager-minikube   0/1     Running   0          48s
kube-system   kube-proxy-p6gf8                   1/1     Running   0          33s
kube-system   kube-scheduler-minikube            0/1     Running   0          48s
kube-system   storage-provisioner                1/1     Running   1          48s
18:28:12 medya/workspace/minikube



$ sleep 60

18:29:27 medya/workspace/minikube
autopause-vm •3
$ mk status
minikube
type: Control Plane
host: Running
kubelet: Stopped
apiserver: Paused
kubeconfig: Configured

18:29:30 medya/workspace/minikube
autopause-vm •3
$ kc get pods -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
auto-pause    auto-pause-proxy-dc6979c79-tgm27   1/1     Running   0          119s
auto-pause    env-inject-846bbd58bc-zg9vs        1/1     Running   0          2m
kube-system   coredns-74ff55c5b-ftpqv            1/1     Running   0          2m1s
kube-system   etcd-minikube                      1/1     Running   0          2m15s
kube-system   kube-apiserver-minikube            1/1     Running   0          2m15s
kube-system   kube-controller-manager-minikube   1/1     Running   0          2m15s
kube-system   kube-proxy-p6gf8                   1/1     Running   0          2m
kube-system   kube-scheduler-minikube            1/1     Running   0          2m15s
kube-system   storage-provisioner                1/1     Running   1          2m15s
18:29:39 medya/workspace/minikube
autopause-vm •3
$ mk status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

18:29:44 medya/workspace/minikube

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 18, 2021
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 18, 2021
@medyagh medyagh changed the title Autopause vm Fix auto-pause on VMs (detect right control-plane IP) May 18, 2021
@medyagh
Copy link
Member Author

medyagh commented May 18, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 18, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: azhao155, medyagh

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

@medyagh: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-minikube-build 8ca3d1f link /test pull-minikube-build

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 49.7s    | 49.9s               |
| enable ingress | 36.6s    | 36.6s               |
+----------------+----------+---------------------+

Times for minikube start: 52.1s 51.1s 48.7s 48.3s 48.5s
Times for minikube (PR 11438) start: 52.2s 47.8s 46.8s 51.2s 51.4s

Times for minikube ingress: 34.8s 42.2s 35.4s 34.7s 35.7s
Times for minikube (PR 11438) ingress: 35.7s 36.3s 42.2s 34.3s 34.3s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 21.3s               |
| enable ingress | 30.7s    | 29.6s               |
+----------------+----------+---------------------+

Times for minikube ingress: 32.0s 26.5s 29.5s 35.6s 30.0s
Times for minikube (PR 11438) ingress: 34.0s 30.0s 27.5s 27.5s 29.0s

Times for minikube start: 23.3s 21.7s 21.1s 21.7s 21.4s
Times for minikube (PR 11438) start: 20.6s 22.2s 21.4s 21.0s 21.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 41.8s    | 44.7s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 31.4s 43.1s 43.9s 47.4s 43.0s
Times for minikube (PR 11438) start: 44.0s 46.6s 43.0s 43.0s 46.7s

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 53.3s    | 54.3s               |
| enable ingress | 34.7s    | 35.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 35.0s 33.8s 35.3s 34.3s 34.9s
Times for minikube (PR 11438) ingress: 36.3s 34.8s 35.9s 37.3s 34.9s

Times for minikube start: 55.0s 50.3s 55.9s 53.0s 52.0s
Times for minikube (PR 11438) start: 57.0s 52.8s 53.0s 56.7s 51.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 23.0s    | 22.3s               |
| enable ingress | 28.1s    | 30.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 28.5s 27.5s 29.5s 26.0s 29.0s
Times for minikube (PR 11438) ingress: 29.0s 29.0s 29.5s 35.0s 31.5s

Times for minikube start: 24.1s 22.2s 22.1s 24.2s 22.6s
Times for minikube (PR 11438) start: 21.7s 22.3s 22.0s 23.3s 22.2s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11438) |
+----------------+----------+---------------------+
| minikube start | 42.8s    | 45.1s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube (PR 11438) start: 43.1s 47.8s 43.5s 47.5s 43.6s
Times for minikube start: 32.4s 43.3s 47.4s 47.6s 43.4s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auto-pause on VM Drivers: kubectl can't access cluster to unpause it
4 participants