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

Allow minikube to function with misconfigured NO_PROXY value #4229

Merged
merged 28 commits into from
May 20, 2019

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented May 8, 2019

fixes #4130 as well as #3844

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 8, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @medyagh. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@medyagh medyagh added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 8, 2019
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 8, 2019
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 8, 2019
@medyagh
Copy link
Member Author

medyagh commented May 8, 2019

unit tests to be added soon.

@medyagh medyagh requested a review from sharifelgamal May 8, 2019 22:18
@tstromberg
Copy link
Contributor

@minikube-bot OK to test

Copy link
Contributor

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tricky, but we should also add an integration test for proxies, something like test/integration/proxy_test.go.

To test it in a way that works for users who don't currently have a proxy, it might perhaps start one up using something like https://github.com/elazarl/goproxy

cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/start.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 10, 2019
pkg/minikube/proxy/noproxy.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/env.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/noproxy.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/noproxy.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/dashboard.go Show resolved Hide resolved
pkg/minikube/proxy/cidir.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/cidir.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/cidir_test.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/cidir_test.go Outdated Show resolved Hide resolved
pkg/minikube/proxy/cidir_test.go Outdated Show resolved Hide resolved
@tstromberg
Copy link
Contributor

Code looks great. Just minor nits.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 14, 2019
@codecov-io
Copy link

Codecov Report

Merging #4229 into master will increase coverage by 0.05%.
The diff coverage is 31.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4229      +/-   ##
==========================================
+ Coverage   32.78%   32.83%   +0.05%     
==========================================
  Files          93       94       +1     
  Lines        6031     6113      +82     
==========================================
+ Hits         1977     2007      +30     
- Misses       3784     3835      +51     
- Partials      270      271       +1
Impacted Files Coverage Δ
pkg/minikube/cluster/cluster.go 36.29% <0%> (-1.16%) ⬇️
pkg/minikube/bootstrapper/kubeadm/kubeadm.go 20.19% <0%> (-0.07%) ⬇️
pkg/util/kubernetes.go 0% <0%> (ø) ⬆️
cmd/minikube/cmd/dashboard.go 3.03% <0%> (-0.2%) ⬇️
cmd/minikube/cmd/start.go 11.26% <0%> (-0.22%) ⬇️
pkg/minikube/service/service.go 34.1% <12.5%> (-0.2%) ⬇️
pkg/minikube/proxy/proxy.go 49.12% <49.12%> (ø)
pkg/util/kubeconfig.go 46.05% <0%> (+1.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a4270c...f38efb9. Read the comment docs.

@tstromberg
Copy link
Contributor

The "None" failure seems a bit strange to me, but not altogether unheard of. Go ahead and resolve the merge conflicts and we'll see if it comes up again.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2019
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2019
@medyagh
Copy link
Member Author

medyagh commented May 16, 2019

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

tstromberg commented May 17, 2019

Looks like the test is failing because it's not possible to download kubelet / kubeadm with the proxy.

 00:53:58 | > @   Downloading kubelet v1.10.13
 00:53:58 | ! W0517 00:53:58.460580   25562 exit.go:99] Failed to update cluster: downloading binaries: downloading kubelet: Error downloading kubelet v1.10.13: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! !   Failed to update cluster: downloading binaries: downloading kubelet: Error downloading kubelet v1.10.13: failed to download: failed to download to temp file: download failed: 5 error(s) occurred:
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! * Temporary download error: Get https://storage.googleapis.com/kubernetes-release/release/v1.10.13/bin/linux/amd64/kubelet: proxyconnect tcp: dial tcp [::1]:37345: connect: connection refused
 00:53:58 | ! *   Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
 00:53:58 | ! -   https://github.com/kubernetes/minikube/issues/new

Interestingly, it seems to affect more than just the proxy test:

--- FAIL: TestVersionUpgrade (55.97s)

My suggestion: check that the HTTP_PROXY environment variable isn't leaking, and ensure that all of the dependencies are downloaded by calling "minikube start --download-only" before setting up the HTTP_PROXY - or make sure that the proxy routes packets to the internet.

@medyagh
Copy link
Member Author

medyagh commented May 17, 2019

@minikube-bot OK to test

@medyagh medyagh added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 17, 2019
@medyagh
Copy link
Member Author

medyagh commented May 18, 2019

@minikube-bot OK to test

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: medyagh
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: luxas

If they are not already assigned, you can assign the PR to them by writing /assign @luxas in a comment when ready.

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

@medyagh
Copy link
Member Author

medyagh commented May 19, 2019

@tstromberg I wonder if that error was because the testDashboard runs in parallel. I removed the parallel to see if it works. on my machine the integration test passes for osx hyperkit

@medyagh
Copy link
Member Author

medyagh commented May 19, 2019

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

@minikube-bot OK test

@tstromberg tstromberg merged commit 9d09ff0 into kubernetes:master May 20, 2019
@medyagh medyagh deleted the no_proxy_for_self branch May 31, 2019 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add minikube IP to NO_PROXY if HTTPS_PROXY is set
6 participants