Skip to content

OCPBUGS-85148, NE-2395: Fix e2e tests to work on platforms with unmanaged DNS#1342

Merged
openshift-merge-bot[bot] merged 3 commits intoopenshift:masterfrom
rikatz:fix-gwapi-e2e-vsphere
Jan 27, 2026
Merged

OCPBUGS-85148, NE-2395: Fix e2e tests to work on platforms with unmanaged DNS#1342
openshift-merge-bot[bot] merged 3 commits intoopenshift:masterfrom
rikatz:fix-gwapi-e2e-vsphere

Conversation

@rikatz
Copy link
Copy Markdown
Member

@rikatz rikatz commented Jan 15, 2026

On on-prem platforms we cannot assure that the DNS record will always work. On some platforms the DNS controller is created with a fake controller, and DNSRecords never gets ready. In these cases, what we need is that the tests rely on the Gateway status address as a name and connect to it directly instead of trying to resolve the DNS.

This change creates a new function to verify if the test is running on a platform with unmanaged DNS, and in this case it skips verifying DNSRecord and makes the resolution of DNS records be hardcoded to use the gateway address on the http client

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 15, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Jan 15, 2026

@rikatz: This pull request references NE-2395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

On on-prem platforms we cannot assure that the DNS record will always work. On some platforms the DNS controller is created with a fake controller, and DNSRecords never gets ready. In these cases, what we need is that the tests rely on the Gateway status address as a name and connect to it directly instead of trying to resolve the DNS.

This change creates a new function to verify if the test is running on a platform with unmanaged DNS, and in this case it skips verifying DNSRecord and makes the resolution of DNS records be hardcoded to use the gateway address on the http client

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from Miciah and bentito January 15, 2026 13:23
@rikatz rikatz force-pushed the fix-gwapi-e2e-vsphere branch from 6de938d to 956bba7 Compare January 15, 2026 16:37
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Jan 15, 2026

Executed test on a vsphere cluster:

kubectl exec -it launch-clusterbot-wait -c test -- /tmp/e2e -test.run TestGatewayAPI -test.v
--- PASS: TestGatewayAPI (381.23s)
    --- PASS: TestGatewayAPI/testGatewayAPIResources (46.41s)
    --- PASS: TestGatewayAPI/testGatewayAPIObjects (53.42s)
    --- PASS: TestGatewayAPI/testGatewayAPIManualDeployment (10.07s)
    --- PASS: TestGatewayAPI/testGatewayAPIIstioInstallation (14.15s)
    --- SKIP: TestGatewayAPI/testGatewayAPIDNS (1.01s)
    --- SKIP: TestGatewayAPI/testGatewayAPIDNSListenerUpdate (1.01s)
    --- PASS: TestGatewayAPI/testGatewayAPIDNSListenerWithNoHostname (96.05s)
    --- PASS: TestGatewayAPI/testGatewayAPIResourcesProtection (87.86s)
        --- PASS: TestGatewayAPI/testGatewayAPIResourcesProtection/Ingress_operator_service_account_required (10.33s)
        --- PASS: TestGatewayAPI/testGatewayAPIResourcesProtection/Pod_binding_required (10.37s)
    --- PASS: TestGatewayAPI/testGatewayAPIRBAC (0.05s)
    --- PASS: TestGatewayAPI/testOperatorDegradedCondition (67.17s)

How to execute the test:

  • Compile the e2e test with go test -c -o e2e -tags e2e ./test/e2e/
  • Get a cluster of type vsphere, static and get the IPs (as per Add e2e-vsphere-static-metallb-operator release#73349)
  • Install MetalLB with the static IPs on this cluster (still check the pipeline above)
  • Get the kubeconfig of the build cluster
  • With that kubeconfig, copy the e2e and run:
kubectl cp e2e launch-clusterbot-wait:/tmp/ -c test
kubectl exec -it launch-clusterbot-wait -c test -- /tmp/e2e -test.run TestGatewayAPI -test.v

@gcs278
Copy link
Copy Markdown
Contributor

gcs278 commented Jan 15, 2026

I'd like to take a look
/assign

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Jan 15, 2026

failing tests do not seem related to my changes. BTW my changes are working on all of "*-operator" pipelines (that are the ones covered by test/e2e here)

@lihongan
Copy link
Copy Markdown

/retest-required

Copy link
Copy Markdown
Contributor

@gcs278 gcs278 left a comment

Choose a reason for hiding this comment

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

Looks good! All of my comments are mostly nits about style, feel free to take or leave them. I agree with the approach overall.

Comment thread test/e2e/util_test.go Outdated
Comment thread test/e2e/util_test.go Outdated
Comment thread test/e2e/util_test.go Outdated
Comment thread test/e2e/util_gatewayapi_test.go
@lihongan
Copy link
Copy Markdown

The TestGatewayAPI passed in the e2e-aws-operator job , the failing test is TestAWSLBTypeChange and might be related to #1142

         --- FAIL: TestAll/parallel/TestAWSLBTypeChange (381.82s) 
--- PASS: TestAll/serial/TestGatewayAPI (810.88s)

Comment thread test/e2e/util_test.go Outdated
@gcs278
Copy link
Copy Markdown
Contributor

gcs278 commented Jan 16, 2026

Thanks for the updates! Yea @lihongan is right, the TestAWSLBTypeChange failure is due to openshift/cluster-cloud-controller-manager-operator#362 merging, and our fix needs to merge: #1142. Though, I'm not sure about the TestCanaryRoute, that seems unrelated.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2026
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Jan 16, 2026

is the canary one related to #1334 ?

@candita
Copy link
Copy Markdown
Contributor

candita commented Jan 21, 2026

/assign @grzpiotrowski

Copy link
Copy Markdown
Contributor

@grzpiotrowski grzpiotrowski left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 22, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grzpiotrowski

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2026
@melvinjoseph86
Copy link
Copy Markdown

/retest

On on-prem platforms we cannot assure that the DNS record will always work. On some
platforms the DNS controller is created with a fake controller, and DNSRecords never
gets ready. In these cases, what we need is that the tests rely on the Gateway status
address as a name and connect to it directly instead of trying to resolve the DNS.

This change creates a new function to verify if the test is running on a platform with
unmanaged DNS, and in this case it skips verifying DNSRecord and makes the resolution of
DNS records be hardcoded to use the gateway address on the http client
This commit fixes some validation on Azure verification for
managed DNS and also on some logging messages
AWS managed DNS can rely on tags instead of IDs to define if a zone is managed. This change
adds the validation of a tag being also defined
@rikatz rikatz force-pushed the fix-gwapi-e2e-vsphere branch from 0677b21 to 0c08ea1 Compare January 26, 2026 20:23
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2026
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Jan 26, 2026

@gcs278 if possible I need a new lgtm, the only change was rebasing over master to get your fixes on the TestLBChange

/cc @lihongan @ShudiLi @rhamini3 @melvinjoseph86
for QE verified label

thanks folks!

@openshift-ci openshift-ci Bot requested review from ShudiLi and rhamini3 January 26, 2026 20:24
@gcs278
Copy link
Copy Markdown
Contributor

gcs278 commented Jan 26, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2026
@rhamini3
Copy link
Copy Markdown
Contributor

rebased over master to get Grant's fix
/verified by e2e

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 26, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rhamini3: This PR has been marked as verified by e2e.

Details

In response to this:

rebased over master to get Grant's fix
/verified by e2e

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6ea8127 and 2 for PR HEAD 0c08ea1 in total

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ea67a8c and 1 for PR HEAD 0c08ea1 in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 27, 2026

@rikatz: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot Bot merged commit 9963c95 into openshift:master Jan 27, 2026
16 checks passed
@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented Jan 27, 2026

/cherry-pick release-4.21

@openshift-cherrypick-robot
Copy link
Copy Markdown

@rikatz: new pull request created: #1352

Details

In response to this:

/cherry-pick release-4.21

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-sigs/prow repository.

@rikatz rikatz changed the title NE-2395: Fix e2e tests to work on platforms with unmanaged DNS OCPBUGS-85148, NE-2395: Fix e2e tests to work on platforms with unmanaged DNS May 6, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: Jira Issue Verification Checks: Jira Issue OCPBUGS-85148
✔️ This pull request was pre-merge verified.
✔️ All associated pull requests have merged.
✔️ All associated, merged pull requests were pre-merge verified.

Jira Issue OCPBUGS-85148 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓

Details

In response to this:

On on-prem platforms we cannot assure that the DNS record will always work. On some platforms the DNS controller is created with a fake controller, and DNSRecords never gets ready. In these cases, what we need is that the tests rely on the Gateway status address as a name and connect to it directly instead of trying to resolve the DNS.

This change creates a new function to verify if the test is running on a platform with unmanaged DNS, and in this case it skips verifying DNSRecord and makes the resolution of DNS records be hardcoded to use the gateway address on the http client

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 openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented May 6, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: Jira Issue OCPBUGS-85148 is in an unrecognized state (MODIFIED) and will not be moved to the MODIFIED state.

Details

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented May 6, 2026

/cherry-pick release-4.21

@openshift-cherrypick-robot
Copy link
Copy Markdown

@rikatz: new pull request created: #1437

Details

In response to this:

/cherry-pick release-4.21

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-sigs/prow repository.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented May 6, 2026

/cherry-pick release-4.20

@openshift-cherrypick-robot
Copy link
Copy Markdown

@rikatz: #1342 failed to apply on top of branch "release-4.20":

Applying: NE-2395: Fix e2e tests to work on platforms with unmanaged DNS
Using index info to reconstruct a base tree...
M	test/e2e/gateway_api_test.go
M	test/e2e/util_gatewayapi_test.go
M	test/e2e/util_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/e2e/util_test.go
Auto-merging test/e2e/util_gatewayapi_test.go
Auto-merging test/e2e/gateway_api_test.go
CONFLICT (content): Merge conflict in test/e2e/gateway_api_test.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 NE-2395: Fix e2e tests to work on platforms with unmanaged DNS

Details

In response to this:

/cherry-pick release-4.20

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-sigs/prow repository.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented May 6, 2026

/jira backport release-4.22,release-4.20

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: Missing required branches for backport chain:

  • openshift-4.21 OR release-4.21,
Details

In response to this:

/jira backport release-4.22,release-4.20

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 openshift-eng/jira-lifecycle-plugin repository.

@rikatz
Copy link
Copy Markdown
Member Author

rikatz commented May 6, 2026

/jira backport release-4.20

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rikatz: Missing required branches for backport chain:

  • release-4.21 OR openshift-4.21,
Details

In response to this:

/jira backport release-4.20

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 openshift-eng/jira-lifecycle-plugin 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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants