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

OCPBUGS-10695: Ignore IPv4-mapped-on-IPv6 addresses from bind test #3627

Closed
wants to merge 1 commit into from

Conversation

mkowalski
Copy link
Contributor

When dealing with IPv6 addresses we need to make sure they are bindable before we report network as ready. The check has been introduced in #3362 and works by trying to simply bind to a specified IPv6 address.

The check however doesn't account for the fact that we may have addresses in the form of IPv4-mapped-on-IPv6. In such a scenario ncat is returning an "Invalid argument" error because it tries to open a socket of type AF_INET6 whereas this type of address requires additional IPV6_ADDRFORM option which ncat is not setting. Another possibility is to create a socket of type AF_INET what could be done by

nc -4 -l ::ffff:192.168.0.14 53604

In order to workaround this behaviour of netcat, we are ignoring the bind tests for IPv4-mapped-on-IPv6 address, as due to its nature it will never be stuck in tentative state even when rest of the infrastrucure is performing Duplicate Address Detection. As this address belongs to a special class of addresses, we can afford its special handling.

Closes: OCPBUGS-10695

When dealing with IPv6 addresses we need to make sure they are bindable
before we report network as ready. The check has been introduced in
openshift#3362 and works
by trying to simply bind to a specified IPv6 address.

The check however doesn't account for the fact that we may have
addresses in the form of IPv4-mapped-on-IPv6. In such a scenario ncat is
returning an "Invalid argument" error because it tries to open a socket
of type `AF_INET6` whereas this type of address requires additional
`IPV6_ADDRFORM` option which ncat is not setting. Another possibility is
to create a socket of type `AF_INET` what could be done by

```
nc -4 -l ::ffff:192.168.0.14 53604
```

In order to workaround this behaviour of netcat, we are ignoring the
bind tests for IPv4-mapped-on-IPv6 address, as due to its nature it will
never be stuck in tentative state even when rest of the infrastrucure is
performing Duplicate Address Detection. As this address belongs to a
special class of addresses, we can afford its special handling.

Closes: OCPBUGS-10695
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 23, 2023
@openshift-ci-robot
Copy link
Contributor

@mkowalski: This pull request references Jira Issue OCPBUGS-10695, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

When dealing with IPv6 addresses we need to make sure they are bindable before we report network as ready. The check has been introduced in #3362 and works by trying to simply bind to a specified IPv6 address.

The check however doesn't account for the fact that we may have addresses in the form of IPv4-mapped-on-IPv6. In such a scenario ncat is returning an "Invalid argument" error because it tries to open a socket of type AF_INET6 whereas this type of address requires additional IPV6_ADDRFORM option which ncat is not setting. Another possibility is to create a socket of type AF_INET what could be done by

nc -4 -l ::ffff:192.168.0.14 53604

In order to workaround this behaviour of netcat, we are ignoring the bind tests for IPv4-mapped-on-IPv6 address, as due to its nature it will never be stuck in tentative state even when rest of the infrastrucure is performing Duplicate Address Detection. As this address belongs to a special class of addresses, we can afford its special handling.

Closes: OCPBUGS-10695

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 openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 23, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mkowalski
Once this PR has been reviewed and has the lgtm label, please assign cgwalters for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@mkowalski
Copy link
Contributor Author

/test all
/jira refresh
/cc @cybertron
/cherry-pick 4.13
/cherry-pick 4.12

@openshift-cherrypick-robot

@mkowalski: once the present PR merges, I will cherry-pick it on top of 4.13 in a new PR and assign it to you.

In response to this:

/test all
/jira refresh
/cc @cybertron
/cherry-pick 4.13
/cherry-pick 4.12

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 openshift-ci bot requested a review from cybertron March 23, 2023 12:33
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 23, 2023
@openshift-ci-robot
Copy link
Contributor

@mkowalski: This pull request references Jira Issue OCPBUGS-10695, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jhajyahy@redhat.com), skipping review request.

In response to this:

/test all
/jira refresh
/cc @cybertron
/cherry-pick 4.13
/cherry-pick 4.12

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.

@mkowalski mkowalski marked this pull request as ready for review March 23, 2023 12:56
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 23, 2023
@openshift-ci openshift-ci bot requested review from cgwalters and jkyros March 23, 2023 12:56
@mkowalski
Copy link
Contributor Author

/test e2e-metal-ipi

@mkowalski
Copy link
Contributor Author

/test e2e-metal-ipi-ovn-ipv6

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 23, 2023

@mkowalski: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 2c466c2 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-alibabacloud-ovn 2c466c2 link false /test e2e-alibabacloud-ovn
ci/prow/e2e-hypershift 2c466c2 link false /test e2e-hypershift
ci/prow/okd-scos-e2e-gcp-ovn-upgrade 2c466c2 link false /test okd-scos-e2e-gcp-ovn-upgrade

Full PR test history. Your PR dashboard.

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.

@cybertron
Copy link
Member

I think this may be fixing an invalid configuration. A mapped v4 address was provided as the v6 address, and I'm not sure that's either valid or makes sense. If the address they gave us for ipv6 doesn't work as an ipv6 address then everything is going to break anyway.

@mkowalski
Copy link
Contributor Author

/close

Ultimately openshift/baremetal-runtimecfg#227 fixes the bug. It is indeed true that if we managed to get mapped address at this stage here, something went wrong. This PR would only defer the failure to some other place so it makes not much sense to push it further

@openshift-ci openshift-ci bot closed this Apr 20, 2023
@openshift-ci-robot
Copy link
Contributor

@mkowalski: This pull request references Jira Issue OCPBUGS-10695. The bug has been updated to no longer refer to the pull request using the external bug tracker.

In response to this:

When dealing with IPv6 addresses we need to make sure they are bindable before we report network as ready. The check has been introduced in #3362 and works by trying to simply bind to a specified IPv6 address.

The check however doesn't account for the fact that we may have addresses in the form of IPv4-mapped-on-IPv6. In such a scenario ncat is returning an "Invalid argument" error because it tries to open a socket of type AF_INET6 whereas this type of address requires additional IPV6_ADDRFORM option which ncat is not setting. Another possibility is to create a socket of type AF_INET what could be done by

nc -4 -l ::ffff:192.168.0.14 53604

In order to workaround this behaviour of netcat, we are ignoring the bind tests for IPv4-mapped-on-IPv6 address, as due to its nature it will never be stuck in tentative state even when rest of the infrastrucure is performing Duplicate Address Detection. As this address belongs to a special class of addresses, we can afford its special handling.

Closes: OCPBUGS-10695

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
Copy link
Contributor

openshift-ci bot commented Apr 20, 2023

@mkowalski: Closed this PR.

In response to this:

/close

Ultimately openshift/baremetal-runtimecfg#227 fixes the bug. It is indeed true that if we managed to get mapped address at this stage here, something went wrong. This PR would only defer the failure to some other place so it makes not much sense to push it further

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.

@mkowalski mkowalski deleted the OCPBUGS-10695 branch June 6, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants