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 kube-proxy to handle aws returning multiple hostnames #3067

Merged
merged 1 commit into from
Aug 4, 2017

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jul 27, 2017

Amazon's dhcp service supports returning a space separated list of hostnames. This patch makes sure to split the domains first before picking the hostname override.

Closes #3060.

Amazon's dhcp service supports returning a space separated list of
hostnames. This patch makes sure to split the domains first before
picking the hostname override.

Closes kubernetes#3060.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 27, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @erickt. 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.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 27, 2017
@chrislovecnm
Copy link
Contributor

@justinsb does it matter which host name we use?

@chrislovecnm
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 28, 2017
@erickt
Copy link
Contributor Author

erickt commented Jul 28, 2017

The other way I suppose is skipping the aws metadata server and Looking up the fully qualified domain name (which kops might already be doing?). I'm not sure how to do a getaddrinfo in go but I did find this stack overflow about how to do it.

@justinsb
Copy link
Member

justinsb commented Aug 1, 2017

So the node name does have to match the privatednsname, but we also override the node name in the aws cloud provider e.g. https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws.go#L1496-L1503

I suggest getting this merged as it fixes a clear issue, and then seeing if picking the first name goes wrong. I don't think it will as I think this name is now mostly not used as a key but rather simply for information / diagnostics. I think.

Out of interest @erickt , what is the use case for multiple hostnames in DHCP? Seems likely to cause problems :-)

@justinsb justinsb self-assigned this Aug 1, 2017
@justinsb justinsb self-requested a review August 1, 2017 05:11
@rmazlumyan
Copy link

@justinsb. In my case, defining multiple domain-name entries in vpc dhcp option set seems to result in not only the /etc/resolv.conf search field getting populated by all the domains (desired behaviour) but also concatenation of entire domain including spaces to hostname in meta-data local-hostname (undesirable).

@justinsb
Copy link
Member

justinsb commented Aug 4, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 4, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erickt, justinsb

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2017
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants