8000 Allow minikube to function with misconfigured NO_PROXY value by medyagh · Pull Request #4229 · kubernetes/minikube · GitHub
[go: up one dir, main page]

Skip to content

Allow minikube to function with misconfigured NO_PROXY value - #4229

Merged
tstromberg merged 28 commits into
kubernetes:masterfrom
medyagh:no_proxy_for_self
May 20, 2019
Merged

tstromberg merged 28 commits into
kubernetes:masterfrom
medyagh:no_proxy_for_self

Conversation

@medyagh
@medyagh medyagh commented May 8, 2019 •
Copy link
Copy Markdown
Member

fixes #4130 as well as #3844

@minikube-bot
Copy link
Copy Markdown
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
Copy Markdown
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.

Details

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 requested review from balopat and dlorenc May 8, 2019 22:06
@medyagh
medyagh force-pushed the no_proxy_for_self branch from 446a0e7 to 80163d2 Compare May 8, 2019 22:09
@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
medyagh force-pushed the no_proxy_for_self branch from 80163d2 to 581b63a Compare May 8, 2019 22:10
@medyagh
medyagh requested a review from tstromberg May 8, 2019 22:11
@medyagh
medyagh commented May 8, 2019
Copy link
Copy Markdown
Member Author

unit tests to be added soon.

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

@minikube-bot OK to test

8000

@tstromberg tstromberg left a comment
Copy link
Copy Markdown
Contributor

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

Comment thread cmd/minikube/cmd/start.go Resolved
Comment thread cmd/minikube/cmd/start.go Resolved
Comment thread cmd/minikube/cmd/start.go 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
Comment thread pkg/minikube/proxy/noproxy.go Resolved
Comment thread pkg/minikube/proxy/env.go Resolved
Comment thread pkg/minikube/proxy/noproxy.go Resolved
Comment thread pkg/minikube/proxy/noproxy.go Resolved
Comment thread cmd/minikube/cmd/dashboard.go Resolved
Comment thread pkg/minikube/proxy/cidir.go Resolved
Comment thread pkg/minikube/proxy/cidir.go Resolved
Comment thread pkg/minikube/proxy/cidir_test.go Resolved
Comment thread pkg/minikube/proxy/cidir_test.go Resolved
Comment thread pkg/minikube/proxy/cidir_test.go Resolved
@tstromberg
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
medyagh commented May 16, 2019
Copy link
Copy Markdown
Member Author

@minikube-bot OK to test

@tstromberg
tstromberg commented May 17, 2019 •
Copy link
Copy Markdown
Contributor

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.

Comment thread test/integration/proxy_test.go Resolved
@medyagh
medyagh commented May 17, 2019
Copy link
Copy Markdown
Member Author

@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
medyagh commented May 18, 2019
Copy link
Copy Markdown
Member Author

@minikube-bot OK to test

@k8s-ci-robot
Copy link
Copy Markdown
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

Details 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
medyagh commented May 19, 2019
Copy link
Copy Markdown
Member Author

@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
medyagh commented May 19, 2019
Copy link
Copy Markdown
Member Author

@minikube-bot OK to test

@tstromberg
Copy link
Copy Markdown
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

0