openshift / origin

Conformance test suite for OpenShift
http://www.openshift.org
Apache License 2.0
8.49k stars 4.7k forks source link

OCPBUGS-26603: e2e: Fix IPv6 handling in router tests. #29224

Open rfredette opened 4 weeks ago

rfredette commented 4 weeks ago

curl requires that ipv6 addresses are in brackets. This change adds the IPUrl function to handle adding those brackets when necessary.

Several tests also create router pods directly, and thus require that the environment variable ROUTER_IP_V4_V6_MODE is set. Setting it to "v4v6" should allow the router to work in all environments.

This is part of the fix for OCPBUGS-26603.

openshift-ci-robot commented 4 weeks ago

@rfredette: This pull request references Jira Issue OCPBUGS-26603, which is invalid:

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](https://github.com/openshift/origin/pull/29224): >curl requires that ipv6 addresses are in brackets. This change adds the IPUrl function to handle adding those brackets when necessary. > >Several tests also create router pods directly, and thus require that the environment variable ROUTER_IP_V4_V6_MODE is set. Setting it to "v4v6" should allow the router to work in all environments. > >This is part of the fix for OCPBUGS-26603. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Forigin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rfredette commented 4 weeks ago

/jira refresh

openshift-ci-robot commented 4 weeks ago

@rfredette: This pull request references Jira Issue OCPBUGS-26603, 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.18.0) matches configured target version for branch (4.18.0) * bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @ShudiLi

In response to [this](https://github.com/openshift/origin/pull/29224#issuecomment-2432973800): >/jira refresh Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Forigin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rfredette commented 4 weeks ago

/test e2e-vsphere-ovn-dualstack-primaryv6

rfredette commented 4 weeks ago

This includes the changes in #28579.

rfredette commented 4 weeks ago

[sig-network][Feature:Router][apigroup:image.openshift.io] The HAProxy router should serve a route that points to two services and respect weights [Skipped:Disconnected] [Suite:openshift/conformance/parallel] failed in the e2e-vsphere-ovn-dualstack-primaryv6 run, but I believe that's the one that is fixed by openshift/router#633, which merged after that test run.

/test e2e-vsphere-ovn-dualstack-primaryv6

openshift-ci[bot] commented 4 weeks ago

@rfredette: 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/e2e-aws-ovn-single-node-upgrade 507f35f684ded064637d05d77c893ac1ef664e16 link false /test e2e-aws-ovn-single-node-upgrade
ci/prow/e2e-aws-ovn-kube-apiserver-rollout 507f35f684ded064637d05d77c893ac1ef664e16 link false /test e2e-aws-ovn-kube-apiserver-rollout
ci/prow/e2e-agnostic-ovn-cmd 507f35f684ded064637d05d77c893ac1ef664e16 link false /test e2e-agnostic-ovn-cmd
ci/prow/e2e-vsphere-ovn-dualstack-primaryv6 507f35f684ded064637d05d77c893ac1ef664e16 link false /test e2e-vsphere-ovn-dualstack-primaryv6

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
ShudiLi commented 4 weeks ago

tested it with 4.17.0-0.ci.test-2024-10-25-075202-ci-ln-rd1j15k-latest

1.
% oc get clusterversion
NAME      VERSION                                                   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.17.0-0.ci.test-2024-10-25-075202-ci-ln-rd1j15k-latest   True        False         59m     Cluster version is 4.17.0-0.ci.test-2024-10-25-075202-ci-ln-rd1j15k-latest

2.
% oc -n openshift-ingress get pods -owide
NAME                              READY   STATUS    RESTARTS   AGE   IP                        NODE                                       NOMINATED NODE   READINESS GATES
router-default-59984959b7-8smsv   1/1     Running   0          81m   fd65:a1a8:60ad:1207::13   ci-ln-rd1j15k-c1627-gtk2x-worker-0-s5cdr   <none>           <none>
router-default-59984959b7-kn2hb   1/1     Running   0          81m   fd65:a1a8:60ad:1207::19   ci-ln-rd1j15k-c1627-gtk2x-worker-0-2sdpr   <none>           <none>

3.
% oc -n openshift-ingress rsh router-default-59984959b7-8smsv
sh-5.1$ curl -k -s -m 5 -o /dev/null -w '%{http_code}'  --header 'Host: [fd65:a1a8:60ad:1207::13]' http://[fd65:a1a8:60ad:1207::13]:1936/healthz
200sh-5.1$

/label qe-approved thanks

openshift-ci-robot commented 4 weeks ago

@rfredette: This pull request references Jira Issue OCPBUGS-26603, which is valid.

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

Requesting review from QA contact: /cc @ShudiLi

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

In response to [this](https://github.com/openshift/origin/pull/29224): >curl requires that ipv6 addresses are in brackets. This change adds the IPUrl function to handle adding those brackets when necessary. > >Several tests also create router pods directly, and thus require that the environment variable ROUTER_IP_V4_V6_MODE is set. Setting it to "v4v6" should allow the router to work in all environments. > >This is part of the fix for OCPBUGS-26603. Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Forigin). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rbbratta commented 2 weeks ago

/lgtm

openshift-ci[bot] commented 2 weeks ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rbbratta, rfredette Once this PR has been reviewed and has the lgtm label, please assign sosiouxme 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: - **[OWNERS](https://github.com/openshift/origin/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
rfredette commented 1 week ago

There are still failing tests in the e2e-vsphere-ovn-dualstack-primaryv6, but the tests that this PR is addressing pass. The relevant tests are:

[sig-network][Feature:Router][apigroup:image.openshift.io] The HAProxy router should serve a route that points to two services and respect weights [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:operator.openshift.io] The HAProxy router should respond with 503 to unrecognized hosts [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:operator.openshift.io] The HAProxy router should serve routes that were created from an ingress [apigroup:route.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io][apigroup:operator.openshift.io] The HAProxy router should support reencrypt to services backed by a serving certificate automatically [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host for overridden domains with a custom value [apigroup:image.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should override the route host with a custom value [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should run even if it has no access to update status [apigroup:image.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io] The HAProxy router should serve the correct routes when scoped to a single namespace and label set [Skipped:Disconnected] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router][apigroup:route.openshift.io] when FIPS is disabled the HAProxy router should serve routes when configured with a 1024-bit RSA key [Feature:Networking-IPv4] [Suite:openshift/conformance/parallel]

[sig-network][Feature:Router] The HAProxy router should expose prometheus metrics for a route [apigroup:route.openshift.io] [Skipped:Disconnected] [Suite:openshift/conformance/parallel]
rbbratta commented 2 days ago

@sosiouxme PTAL.