-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
configure Docker daemon to use proxy #322
configure Docker daemon to use proxy #322
Conversation
Docker fails to pull images if running behind the proxy. It causes weave-net pods to stuck in ImagePullBackOff state. Configured proxy as explained in docker documentation: https://docs.docker.com/config/daemon/systemd/#http-proxy This should solve the issue. Fixes: #306 Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
/cc @BenTheElder |
/test pull-kind-conformance-parallel |
@BenTheElder looks like failing test is not related to my changes. It's rather related to kubeadm changes. What should I do with this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @bart0sh
mostly SGTM
@@ -146,6 +146,12 @@ func (cc *Context) ProvisionNodes() (nodeList map[string]*nodes.Node, err error) | |||
return nodeList, err | |||
} | |||
|
|||
cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had to view this RAW and search the U+... in google as none of my Windows fonts support this glyph.
i think we need a different icon for the proxy and not a "whale".
also my suggestion to move these to constants was not accepted. :grumble:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked just fine fine for me in Mac Terminal. As for another icon, so far the code configures proxy for Docker, so I decided to use "whale" glyph.
Can you suggest where can I see a list of supported glyphs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess the whale also makes sense. i'm going to leave this topic to @BenTheElder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now and on par with the rest. I'll probably revisit this UX late next week. Output needs cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need a status for this step given how quick it should be, but like I said we need to look at cleaning this up anyhow.
Aside: what windows are you using Lubomir? Windows should have emoji fonts and even has some custom nonstandard emoji.
|
||
// WriteFile writes temporary file on the host | ||
// and copies it to the node | ||
func (n *Node) WriteFile(dest, content string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't we have a method for this already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no as far as I can see. I'm planning to use this to refactor a couple of places in a separate PR.
/priority important-longterm
yes, nothing for now. |
/test pull-kind-conformance-parallel |
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Thank you!
} | ||
|
||
// copy the temp file from the host to the node | ||
if err := n.CopyTo(path, dest); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a neat trick to avoid this tempfile but we can do it in a follow up:
node.Command("cp", "/dev/stdin", dest).SetInput(strings.NewReader(contents)).Run()
Will probably refactor to do this in other places to deal with docker installed via snap not having access to $TMPDIR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks nice :)
@@ -146,6 +146,12 @@ func (cc *Context) ProvisionNodes() (nodeList map[string]*nodes.Node, err error) | |||
return nodeList, err | |||
} | |||
|
|||
cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we need a status for this step given how quick it should be, but like I said we need to look at cleaning this up anyhow.
Aside: what windows are you using Lubomir? Windows should have emoji fonts and even has some custom nonstandard emoji.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bart0sh, BenTheElder 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 |
cc.Status.Start(fmt.Sprintf("[%s] Configuring proxy 🐋", configNode.Name)) | ||
if err := node.SetProxy(); err != nil { | ||
// TODO: logging here | ||
return nodeList, errors.Wrapf(err, "failed to set proxy for %s", configNode.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also slightly iffy on this being a creation failure rather than a warning, but we can revisit this.
* Add iam permissions * Add iam permissions * Add iam permissions * Fix Files checks * Fix eks-custom-links fix * Fix eks-custom-links fix * Fix eks-custom-links fix * Fix eks-custom-links fix * Fix eks-custom-links fix * Fix eks-custom-links fix * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines * Fix [Docs Checks] Empty lines
This is a second fix for the proxy issues (see #306 for details)
Docker fails to pull images if running behind the proxy.
It causes weave-net pods to stuck in ImagePullBackOff state.
Configured proxy as explained in docker documentation:
https://docs.docker.com/config/daemon/systemd/#http-proxy
This should solve the issue.
Fixes: #306