-
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
Replace fixed time wait with wait function for docker-env cmd #10021
Replace fixed time wait with wait function for docker-env cmd #10021
Conversation
Hi @azhao155. 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? |
[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 |
fixes #9938
In docker-env, instead of waiting for 5s for api server to be up, wait for api server pid to show up.
Start minikube:
zyanshu@zyanshukvm:~/minikube$ ./out/minikube start -p p1
😄 [p1] minikube v1.16.0-beta.0 on Debian rodete
▪ MINIKUBE_ACTIVE_DOCKERD=p1
✨ Automatically selected the docker driver
👍 Starting control plane node p1 in cluster p1
🚜 Pulling base image ...
💾 Downloading Kubernetes v1.20.0 preload ...
Run docker-env cmd:
zyanshu@zyanshukvm:~/minikube$ ./out/minikube docker-env -p p1 --alsologtostderr
I1216 09:02:56.000487 2711966 out.go:221] Setting OutFile to fd 1 ...
I1216 09:02:56.000826 2711966 out.go:273] isatty.IsTerminal(1) = true
I1216 09:02:56.000848 2711966 out.go:234] Setting ErrFile to fd 2...
I1216 09:02:56.000898 2711966 out.go:273] isatty.IsTerminal(2) = true
I1216 09:02:56.001040 2711966 root.go:279] Updating PATH: /usr/local/google/home/zyanshu/.minikube/bin
I1216 09:02:56.001095 2711966 oci.go:526] shell is pointing to dockerd inside minikube. will unset to use host
I1216 09:02:56.001425 2711966 mustload.go:66] Loading cluster: p1
I1216 09:02:56.002362 2711966 cli_runner.go:111] Run: docker container inspect p1 --format={{.State.Status}}
I1216 09:02:56.063844 2711966 host.go:66] Checking if "p1" exists ...
W1216 09:02:56.064205 2711966 docker-env.go:193] dockerd is not active will try to reload it...
I1216 09:02:56.064821 2711966 ssh_runner.go:148] Run: systemctl --version
I1216 09:02:56.064922 2711966 cli_runner.go:111] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" p1
I1216 09:02:56.123186 2711966 sshutil.go:45] new ssh client: &{IP:127.0.0.1 Port:33563 SSHKeyPath:/usr/local/google/home/zyanshu/.minikube/machines/p1/id_rsa Username:docker}
I1216 09:02:56.225523 2711966 ssh_runner.go:148] Run: sudo systemctl daemon-reload
I1216 09:02:56.399247 2711966 ssh_runner.go:148] Run: sudo systemctl reload docker
W1216 09:02:56.419070 2711966 docker-env.go:195] will try to restart dockerd because reload failed: sudo systemctl reload docker: Process exited with status 1
stdout:
stderr:
Job for docker.service failed.
See "systemctl status docker.service" and "journalctl -xe" for details.
I1216 09:02:56.419193 2711966 ssh_runner.go:148] Run: sudo systemctl daemon-reload
I1216 09:02:56.565812 2711966 ssh_runner.go:148] Run: sudo systemctl restart docker
I1216 09:02:57.949276 2711966 ssh_runner.go:188] Completed: sudo systemctl restart docker: (1.383387846s)
W1216 09:02:57.949350 2711966 docker-env.go:202] waiting to ensure apisever container is up...
I1216 09:02:57.949366 2711966 docker-env.go:209] waiting for apiserver process to appear ...
I1216 09:02:57.949446 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:02:58.467167 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:02:58.967199 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:02:59.467186 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:02:59.967177 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:03:00.467170 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:03:00.967182 2711966 ssh_runner.go:148] Run: sudo pgrep -xnf kube-apiserver.minikube.
I1216 09:03:01.039794 2711966 docker-env.go:229] duration metric: took 3.090415908s to wait for apiserver process to appear ...
I1216 09:03:01.039925 2711966 cli_runner.go:111] Run: docker container inspect -f "'{{(index (index .NetworkSettings.Ports "22/tcp") 0).HostPort}}'" p1
I1216 09:03:01.097569 2711966 docker-env.go:459] Testing Docker connectivity with: /usr/bin/docker version --format={{.Server}}
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.49.2:2376"
export DOCKER_CERT_PATH="/usr/local/google/home/zyanshu/.minikube/certs"
export MINIKUBE_ACTIVE_DOCKERD="p1"
To point your shell to minikube's docker-daemon, run:
eval $(minikube -p p1 docker-env)