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 1956989: initialize framework.TestContext.IPFamily correctly #26140
Conversation
/test e2e-metal-ipi-ovn-ipv6 |
1 similar comment
/test e2e-metal-ipi-ovn-ipv6 |
/retest |
/test e2e-metal-ipi-ovn-ipv6 |
/retest |
@fedepaol: An error was encountered searching for bug 26140 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details. Full error message.
code 101: Bug #26140 does not exist.
Please contact an administrator to resolve this issue, then request a bug refresh with In response to this:
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. |
1 similar comment
@fedepaol: An error was encountered searching for bug 26140 on the Bugzilla server at https://bugzilla.redhat.com. No known errors were detected, please see the full error message for details. Full error message.
code 101: Bug #26140 does not exist.
Please contact an administrator to resolve this issue, then request a bug refresh with In response to this:
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. |
test/extended/util/test.go
Outdated
if err != nil { | ||
klog.Fatal("Error loading client: ", err) | ||
} | ||
TestContext.IPFamily = getDefaultClusterIPFamily(c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to call getDefaultClusterIPFamily()
; we already know whether the cluster is ipv4/ipv6/dual-stack based on reading the OCP network config. You can set context.IPFamily
in initializeTestFramework
in cmd/openshift-tests/provider.go
based on config.HasIPv4
/config.HasIPv6
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this will avoid the need of hitting the apis since we are basing this on config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I am not totally sure the way I used hasIPv4 / v6 has the same semantic as checking the ipfamily of the primary clusterip (especially in case of a dual stack cluster).
test/extended/util/test.go
Outdated
@@ -94,6 +101,8 @@ func InitTest(dryRun bool) error { | |||
TestContext.CreateTestingNS = createTestingNS | |||
|
|||
klog.V(2).Infof("Extended test version %s", version.Get().String()) | |||
|
|||
e2e.Logf("Cluster IP family: %s", e2e.TestContext.IPFamily) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the upstream tests do this but it's basically spam. just kill that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it (or the lack of it) helped me triaging the bug :-)
Will remove
test/extended/util/test.go
Outdated
@@ -94,6 +94,7 @@ func InitTest(dryRun bool) error { | |||
TestContext.CreateTestingNS = createTestingNS | |||
|
|||
klog.V(2).Infof("Extended test version %s", version.Get().String()) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedepaol spurious change? might as well just remove this hunk.
context.IPFamily = "ipv4" | ||
if config.HasIPv6 { | ||
context.IPFamily = "ipv6" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm... I think I'd go with if config.HasIPv6 && !config.HasIPv4
also maybe add a comment pointing out that these strings come from kube e2e and are not equal to corev1.IPv4Protocol
/ corev1.IPv6Protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, thanks
/retitle Bug 1956989: initialize framework.TestContext.IPFamily correctly |
@fedepaol: This pull request references Bugzilla bug 1956989, which is invalid:
Comment In response to this:
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. |
/bugzilla refresh |
@fedepaol: This pull request references Bugzilla bug 1956989, 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. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (anusaxen@redhat.com), skipping review request. In response to this:
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. |
/retest |
Some tests rely on the TestContext IPFamily field, that is being initialized in the upstream ginkgo suites but not in origin's one. Here we add the initialization in initializeTestFramework based on config.HasIPV6 / config.HasIPV4. Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, fedepaol, knobunc 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@fedepaol: The following tests failed, say
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. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@fedepaol: All pull requests linked via external trackers have merged: Bugzilla bug 1956989 has been moved to the MODIFIED state. In response to this:
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. |
/cherry-pick release-4.8 |
@fedepaol: #26140 failed to apply on top of branch "release-4.8":
In response to this:
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. |
Some tests rely on the TestContext IPFamily field, that is being initialized in the upstream ginkgo suites but not in origin's one.
Here we add the initialization in InitTest so the test find the right value.