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

Fix HostAlias to validate against DNS1123 hostname instead of just labels #46809

Conversation

evie404
Copy link
Contributor

@evie404 evie404 commented Jun 1, 2017

What this PR does / why we need it: the validation for HostAlias was validating the hostnames against DNS labels instead of hostnames. This means hostnames like foo.bar would fail. I did not catch this because unit test cases only had hostnames like foo.

Which issue this PR fixes: fixes issue introduced in #44641

Release note:

fixed HostAlias in PodSpec to allow `foo.bar` hostnames instead of just `foo` DNS labels.

@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 Jun 1, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @rickypai. 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 @k8s-bot 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-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 1, 2017
@evie404 evie404 force-pushed the rpai/properly_validate_hostalias_hostnames branch 2 times, most recently from 4a0e16b to 80240f4 Compare June 2, 2017 17:22
@evie404 evie404 changed the title Properly validate HostAlias hostnames to validate against DNS1123 hostname instead of just labels Fix HostAlias to validate against DNS1123 hostname instead of just labels Jun 2, 2017
@piosz piosz assigned bowei and unassigned vishh and piosz Jun 2, 2017
@piosz
Copy link
Member

piosz commented Jun 2, 2017

@bowei could you please take a look or find an owner?

@cmluciano
Copy link

@k8s-bot 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 Jun 5, 2017
@cmluciano
Copy link

Not sure if that unit test is a flake or not. I have been hitting frequently today.

@evie404
Copy link
Contributor Author

evie404 commented Jun 5, 2017

listen tcp 127.0.0.1:42436: bind: address already in use

seems to be problems related to the test setup :(

@evie404 evie404 force-pushed the rpai/properly_validate_hostalias_hostnames branch from 80240f4 to 0e5c84e Compare June 5, 2017 18:52
Copy link
Member

@bowei bowei left a comment

Choose a reason for hiding this comment

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

/lgtm

@bowei
Copy link
Member

bowei commented Jun 5, 2017

Should be a bugfix for 1.7?

@evie404
Copy link
Contributor Author

evie404 commented Jun 5, 2017

yes this is a fix for a 1.7 feature and should be backported.

@evie404
Copy link
Contributor Author

evie404 commented Jun 5, 2017

so all tests passed. submit queue is not taking it because "Milestone is for a future release and cannot be merged". should a milestone tag be added?

@bowei
Copy link
Member

bowei commented Jun 5, 2017

@kubernetes/kubernetes-release-managers

@cmluciano
Copy link

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 6, 2017
@evie404
Copy link
Contributor Author

evie404 commented Jun 6, 2017

does this need to be added to v1.7 milestone? i'm not very familiar with the project structure

@dchen1107
Copy link
Member

/approve no-issue

@dchen1107
Copy link
Member

cc/ @kubernetes/kubernetes-release-managers

@bowei
Copy link
Member

bowei commented Jun 6, 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 Jun 6, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, dchen1107, rickypai

Associated issue: 44641

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 Jun 6, 2017
@dchen1107 dchen1107 added this to the v1.7 milestone Jun 6, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 46977, 47005, 47018, 47061, 46809)

@k8s-github-robot k8s-github-robot merged commit 4154191 into kubernetes:master Jun 7, 2017
@evie404 evie404 deleted the rpai/properly_validate_hostalias_hostnames branch June 7, 2017 18:22
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants