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

Update docker env during minikube start if VM has already been created #3387

Merged
merged 2 commits into from
Jan 24, 2019
Merged

Update docker env during minikube start if VM has already been created #3387

merged 2 commits into from
Jan 24, 2019

Conversation

jeffwubj
Copy link
Contributor

@jeffwubj jeffwubj commented Nov 30, 2018

Fixes #3276 - HTTP_PROXY doesn't update when minikube start with different proxy

Update docker env during minikube start if VM has already been created

  • keep original docker env if minikube start without --docker-env parameter
  • overwrite docker env if minikube start with --docker-env parameter

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 30, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Nov 30, 2018
@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. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 30, 2018
@tstromberg tstromberg added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 11, 2019
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.

Looks great, just minor nits about error message formatting.

h.HostOptions.EngineOptions.Env = e.Env
provisioner, err := provision.DetectProvisioner(h.Driver)
if err != nil {
return nil, errors.Wrap(err, "Error detecting OS")
Copy link
Contributor

Choose a reason for hiding this comment

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

Error messages shouldn't start with capital letters, and it's difficult to determine if the error was actually with OS detection here. How about something like:

errors.Wrap(err, "detecting provisioner")

return nil, errors.Wrap(err, "Error detecting OS")
}
if err := provisioner.Provision(*h.HostOptions.SwarmOptions, *h.HostOptions.AuthOptions, *h.HostOptions.EngineOptions); err != nil {
return nil, errors.Wrap(err, "Error running provisioning")
Copy link
Contributor

Choose a reason for hiding this comment

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

No caps here either. Just "provision" will do fine as additional context. Leave the mention about an error to main.When the error is ultimately handled by the program's main function, it should provide a clear causal chain from the root problem to the overall failures reminiscent of a NASA accident investigation:

genesis: crashed: no parachute: G-switch failed: bad relay orientation

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

If they are not already assigned, you can assign the PR to them by writing /assign @tstromberg 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

@tstromberg
Copy link
Contributor

@minikube-bot OK to test

@tstromberg
Copy link
Contributor

NOTE: CI failures appear to be unrelated.

@tstromberg tstromberg changed the title Fix for issue #3276 - HTTP_PROXY doesn't update when minikube start with different proxy Update docker env during minikube start if VM has already been created Jan 23, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Jan 23, 2019

PR looks great. Do you mind addressing the review comments?

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2019
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@jeffwubj
Copy link
Contributor Author

PR looks great. Do you mind addressing the review comments?

sorry for the delay, just pushed the fix for the comments, thanks to take a look

@tstromberg tstromberg merged commit 64640a4 into kubernetes:master Jan 24, 2019
@tstromberg
Copy link
Contributor

Excellent. Thank you for the patch!

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/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.

4 participants