Skip to content

Conversation

@danehans
Copy link
Contributor

Previously a domain name with a trailing dot would be considered invalid. This PR adds support for noProxy domain names that end with a trailing dot.

/cc @sdodson @bparees

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 25, 2019
@openshift-ci-robot
Copy link
Contributor

@danehans: This pull request references Bugzilla bug 1753930, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1753930: Adds support for trailing dot in noProxy domain names

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.

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 25, 2019
@danehans
Copy link
Contributor Author

I need to get further verification on the bz. It does not appear that a trailing dot is required to no_proxy google metadata.

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2019
@sdodson
Copy link
Member

sdodson commented Sep 25, 2019

/approve
The testing that QE did shows at the very least libcurl based clients differentiate between no_proxy with and without a trailing dot, so it seems valuable to allow a trailing dot even if we don't feel that QE's testing shows it's necessary for GCP metadata requests from the kubelet. I also believe their testing shows that particular case to require it as well but this is at least a step towards providing a workaround.

What was the original motivation to not accept a trailing dot?

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 25, 2019
{"1.2.3.4", true},
{"1.2.3.4.", false},
{"abc.", false},
{"1.2.3.4.", true},
Copy link
Member

Choose a reason for hiding this comment

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

Is everything a string or do IPs have special handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1.2.3.4. is a valid hostname if we allow a trailing dot. rfc 1123 is being used as the basis for domain name validation:

One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.

Previously the proceeding dot was stripped prior to rfc 1123 validation, so .1.2.3.4 was and is still considered a valid name. Now the trailing dot will be stripped prior to rfc 1123 validation, so .1.2.3.4, 1.2.3.4. and .1.2.3.4. are also considered valid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The values are also run against net.ParseCIDR, but since .1.2.3.4, 1.2.3.4. and .1.2.3.4. are considered valid by rfc 1123 after stripping proceeding/trailing dots, they are considered valid.

@bparees
Copy link
Contributor

bparees commented Sep 25, 2019

is this code reused by the proxy controller? if not, does that validation logic also have to change?

@danehans danehans requested a review from sdodson September 25, 2019 15:47
@sdodson
Copy link
Member

sdodson commented Sep 25, 2019

/retest

@danehans
Copy link
Contributor Author

@bparees openshift/cluster-network-operator#325 adds GCP metadata hostnames to default noProxy.

@danehans
Copy link
Contributor Author

@sdodson ptal at https://bugzilla.redhat.com/show_bug.cgi?id=1753930#c10 for responses to your PR comments.

@bparees
Copy link
Contributor

bparees commented Sep 25, 2019

@bparees openshift/cluster-network-operator#325 adds GCP metadata hostnames to default noProxy.

what does that have to do w/ supporting/tolerating trailing dots during validation?

@danehans
Copy link
Contributor Author

danehans commented Sep 25, 2019

what does that have to do w/ supporting/tolerating trailing dots during validation?

@bparees ptal at https://bugzilla.redhat.com/show_bug.cgi?id=1753930#c10 regarding trailing dot support.

@danehans
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 25, 2019
@danehans
Copy link
Contributor Author

/test e2e-aws-upgrade

@danehans
Copy link
Contributor Author

could not wait for build: the build baremetal-installer failed after 32s with reason DockerBuildFailed: Docker build strategy has failed.

/test e2e-aws-upgrade

@sdodson
Copy link
Member

sdodson commented Sep 27, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 27, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danehans, sdodson

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit c440d57 into openshift:master Sep 27, 2019
@danehans
Copy link
Contributor Author

danehans commented Oct 7, 2019

/cherry-pick release-4.2

@openshift-cherrypick-robot

@danehans: new pull request created: #2464

Details

In response to this:

/cherry-pick release-4.2

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. 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.

7 participants