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

Bug 1780376: Exclude IPv6 Registry Locations #52

Merged
merged 1 commit into from Dec 6, 2019

Conversation

adambkaplan
Copy link
Contributor

Exclude IPv6 addresses from the list of registry locations.
These are invalid locations to reference in an image pull spec.
Use IPv4 if IPv6 address is convertable.

Exclude IPv6 addresses from the list of registry locations.
These are invalid locations to reference in an image pull spec.
Use IPv4 if IPv6 address is convertable.
@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 Dec 5, 2019
@openshift-ci-robot
Copy link
Contributor

@adambkaplan: This pull request references Bugzilla bug 1780376, 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.

In response to this:

Bug 1780376: Exclude IPv6 Registry Locations

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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 5, 2019
@adambkaplan
Copy link
Contributor Author

/assign @dmage

/cc @russellb

ipv4 := ip.To4()
if ipv4 != nil {
ret = append(ret, net.JoinHostPort(ipv4.String(), fmt.Sprintf("%d", svcPort)))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the IP address is an IPv6 address, ip.To4() will return nil.

Note that IPv6 addresses that start with ::FFFF: can be converted to IPv4.

@russellb
Copy link
Member

russellb commented Dec 6, 2019

/cc @danwinship

@russellb
Copy link
Member

russellb commented Dec 6, 2019

Do you have any more info about why IPv4 is valid, but IPv6 is not? Is this a feature gap somewhere? Is this gap tracked somewhere? What's the impact for a cluster that only has IPv6?

@adambkaplan
Copy link
Contributor Author

@russellb @danwinship IPv6 addresses are not valid hostnames in an image pull spec. This is not an issue for the internal registry because we have a DNS name for its service within the cluster.

I believe we kept this around because in the early days of OCP 3.x we did not have a service name for the registry, and hence used the ClusterIP address instead. @bparees and @dmage may know more about the history here.

@russellb
Copy link
Member

russellb commented Dec 6, 2019

/lgtm

The change looks right to me if IPv6 addresses are not supported.

I would find it helpful to have links to any relevant references to where this might be discussed or tracked in an appropriate upstream, in case anyone wants to learn more, or go look at how to add support for this in the future.

Thanks again for the fix!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, russellb

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

@openshift-merge-robot openshift-merge-robot merged commit 71c8722 into openshift:master Dec 6, 2019
@openshift-ci-robot
Copy link
Contributor

@adambkaplan: All pull requests linked via external trackers have merged. Bugzilla bug 1780376 has been moved to the MODIFIED state.

In response to this:

Bug 1780376: Exclude IPv6 Registry Locations

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.

@adambkaplan
Copy link
Contributor Author

@russellb I believe the issue is that IPv6 addresses use colons to separate the address blocks, rather than periods. This confuses how upstream pull spec parsers work, which rely on a final ":" to denote a tag name.

@russellb
Copy link
Member

/cherry-pick 4.3

@adambkaplan can you help with the 4.3 backport?

@openshift-cherrypick-robot

@russellb: cannot checkout 4.3: error checking out 4.3: exit status 1. output: error: pathspec '4.3' did not match any file(s) known to git.

In response to this:

/cherry-pick 4.3

@adambkaplan can you help with the 4.3 backport?

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.

@russellb
Copy link
Member

/cherry-pick release-4.3

@openshift-cherrypick-robot

@russellb: new pull request created: #57

In response to this:

/cherry-pick release-4.3

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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants