Skip to content

no-jira: test/monitoring: increase load balancer readiness and curl connection timeout#30994

Merged
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
tthvo:lb-timeout
Apr 17, 2026
Merged

no-jira: test/monitoring: increase load balancer readiness and curl connection timeout#30994
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
tthvo:lb-timeout

Conversation

@tthvo
Copy link
Copy Markdown
Member

@tthvo tthvo commented Apr 10, 2026

This PR increases the timeout for load balancer readiness and curl connection to address slow DNS propagation on cloud provider, for example, AWS EU Sovereign Cloud.

Background

AWS Load balancer DNS SOA records for AWS ELB in EUSC region show a 900s (15-minute) retry interval, which can cause the load balancer hostname resolution (if first hit NXDOMAIN) to take longer than the previous 10-minute timeout. Additionally, it can take a few more minutes for DNS to fully propagate to its nameserver.

$ nslookup -q=SOA eusc-de-east-1.elb.amazonaws.eu
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
eusc-de-east-1.elb.amazonaws.eu
	origin = ns-501.awsdns-eusc-62.fr
	mail addr = awsdns-hostmaster.amazon.com
	serial = 1
	refresh = 7200
	retry = 900
	expire = 1209600
	minimum = 86400

References

We are seeing a similar issue in CCM hairpin tests: openshift/cluster-cloud-controller-manager-operator#449.

Summary by CodeRabbit

  • New Features

    • Added configurable timeout settings for backend network sampling.
  • Improvements

    • Extended HTTP readiness timeouts for AWS eusc- regions to enhance reliability.
    • Optimized connection timeout handling for improved performance in specific AWS regions.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot
Copy link
Copy Markdown

@tthvo: This pull request explicitly references no jira issue.

Details

In response to this:

The service-type-load-balancer-availability monitor test was timing out during preparation when waiting for the load balancer to become reachable.

DNS SOA records for AWS ELB in EUSC region show a 900s (15-minute) retry interval, which can cause the load balancer hostname resolution to take longer than the previous 10-minute timeout.

Increase the timeout from 10 to 20 minutes to accommodate slow DNS propagation in regions with high TTL values.

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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 10, 2026
@openshift-ci openshift-ci bot requested review from deads2k and p0lyn0mial April 10, 2026 02:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Walkthrough

Conditionally extend the HTTP readiness timeout to 20 minutes for AWS regions with prefix "eusc-"; add WithTimeout(time.Duration) to BackendSampler and apply a 120s connection timeout to the backend samplers used in the load-balancer disruption test.

Changes

Cohort / File(s) Summary
Network Disruption Service Load Balancer Test
pkg/monitortests/network/disruptionserviceloadbalancer/monitortest.go
Conditionally keep testReachableHTTPWithMinSuccessCount timeout at 10*time.Minute by default but set to 20*time.Minute when infra.Status.PlatformStatus.AWS.Region has prefix "eusc-". Introduced connectionTimeout := 120*time.Second for those regions and applied it to the backend samplers via .WithTimeout(connectionTimeout) for both new- and reused-connection samplers.
Backend Disruption Sampler
pkg/monitor/backenddisruption/disruption_backend_sampler.go
Added exported builder-style method func (b *BackendSampler) WithTimeout(timeout time.Duration) *BackendSampler which stores an override timeout (*time.Duration) used when deriving the sampler's overall timeout and HTTP client timeouts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Stable And Deterministic Test Names ❓ Inconclusive User requested to examine files for Ginkgo test names with dynamic information but did not provide actual file content or execution results. Please provide the actual content of the files or execute the shell commands to retrieve the test definitions for analysis.
Test Structure And Quality ❓ Inconclusive Modified files are monitoring configuration and utility classes, not Ginkgo test blocks, making standard test structure criteria partially inapplicable to assess test quality and responsibility separation. Clarify scope: does the check apply to monitoring utilities and configuration files, or only to Ginkgo test blocks? Review test files using the new WithTimeout() method to verify assertion messages and timeout appropriateness.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: extending timeouts for load balancer readiness and curl connection in monitoring tests, which matches the PR's core objective and code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Microshift Test Compatibility ✅ Passed The pull request does not add any new Ginkgo e2e tests. The changes consist of conditional timeout adjustments in existing monitoring test infrastructure and a new builder method (WithTimeout()) to the BackendSampler utility class. Since the custom check specifically applies when "new Ginkgo e2e tests are added" (with declarations like It(), Describe(), Context(), When()), and this PR contains no such new test declarations, the check is not applicable and passes by default.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This pull request does not add any new Ginkgo e2e tests (It(), Describe(), Context(), When() blocks). The changes are limited to modifications of an existing monitoring test with SNO topology checks and a builder method addition.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test infrastructure and monitoring utilities with timeout adjustments; no deployment manifests, operators, or Kubernetes scheduling constructs (affinity, nodeSelectors, topologySpreadConstraints) are introduced.
Ote Binary Stdout Contract ✅ Passed The PR modifies timeout configurations in test functions and adds a builder method with no stdout writes, maintaining OTE Binary Stdout Contract compliance.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR modifies timeout configurations for existing tests using net.JoinHostPort() for IPv6-safe URL construction with cluster-internal connectivity only.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/monitor/backenddisruption/disruption_backend_sampler.go`:
- Around line 235-237: Validate the timeout in BackendSampler.WithTimeout and
refuse non-positive values: check if timeout <= 0 and if so do not set b.timeout
(return b unchanged) so callers cannot accidentally disable timeouts; otherwise
set b.timeout = &timeout and return b. This ensures BackendSampler.WithTimeout
enforces a positive time.Duration (use the existing BackendSampler and
WithTimeout identifiers and the b.timeout field).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 304a4f0e-faeb-43e6-99fa-921457c4fef5

📥 Commits

Reviewing files that changed from the base of the PR and between f454514 and 60e1b17.

📒 Files selected for processing (2)
  • pkg/monitor/backenddisruption/disruption_backend_sampler.go
  • pkg/monitortests/network/disruptionserviceloadbalancer/monitortest.go
✅ Files skipped from review due to trivial changes (1)
  • pkg/monitortests/network/disruptionserviceloadbalancer/monitortest.go

Comment thread pkg/monitor/backenddisruption/disruption_backend_sampler.go
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 10, 2026

/test e2e-aws-ovn-fips

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 16, 2026

/retitle no-jira: test/monitoring: increase load balancer readiness and curl connection timeout

@openshift-ci openshift-ci bot changed the title no-jira:test/monitoring: increase load balancer readiness timeout to 20 minutes no-jira: test/monitoring: increase load balancer readiness and curl connection timeout Apr 16, 2026
@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 17, 2026

A couple of /testwith including this PR showed that these monitoring tests passed in EUSC:

I think the slow DNS propagation can be delegated to AWS to improve their infrastructure in the near future (this EUSC cloud is net new - Jan 2026). However, I am taking the proactive approach here and this should help better avoid flakes 🤔

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 17, 2026

/test e2e-gcp-csi
/test e2e-gcp-ovn

tthvo and others added 3 commits April 17, 2026 09:50
The service-type-load-balancer-availability monitor test was timing out
during preparation when waiting for the load balancer to become reachable.

DNS SOA records for AWS ELB in EUSC region show a 900s (15-minute) retry
interval, which can cause the load balancer hostname resolution to take
longer than the previous 10-minute timeout.

Increase the timeout from 10 to 20 minutes to accommodate slow DNS
propagation in regions with high TTL values.
The service-load-balancer-with-pdb disruption test was experiencing
DNS resolution failures when connecting to the load balancer during
test execution. AWS ELB DNS zones have an SOA TTL of 900 seconds,
which means DNS propagation can take up to 15 minutes for newly
created load balancers.

This change adds a WithTimeout() method to BackendSampler and sets
a 120-second timeout for the service load balancer disruption samplers,
allowing sufficient time for DNS retries during the propagation period.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pkg/monitor/backenddisruption/disruption_backend_sampler.go (1)

234-238: Document the one-time effect of WithTimeout.

Because GetHTTPClient() is initialized via sync.Once, calling WithTimeout after the first request won’t change runtime behavior. Please state this explicitly in the method doc to prevent misuse.

Proposed doc update
-// WithTimeout sets a custom timeout for HTTP requests including DNS resolution and connection establishment
+// WithTimeout sets a custom timeout for HTTP requests including DNS resolution and connection establishment.
+// Call this before the first request; once the HTTP client is initialized, later timeout updates are ignored.
 func (b *BackendSampler) WithTimeout(timeout time.Duration) *BackendSampler {
 	b.timeout = &timeout
 	return b
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/monitor/backenddisruption/disruption_backend_sampler.go` around lines 234
- 238, The docstring for BackendSampler.WithTimeout must state that the timeout
is only effective if called before the HTTP client is initialized because
GetHTTPClient() uses sync.Once; update the comment on WithTimeout to explicitly
mention that calling WithTimeout after the first GetHTTPClient()/request will
have no effect at runtime, so users must call it prior to the first request or
client initialization; reference BackendSampler.WithTimeout and the
GetHTTPClient sync.Once initialization in the description to make this one-time
behavior clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@pkg/monitor/backenddisruption/disruption_backend_sampler.go`:
- Around line 234-238: The docstring for BackendSampler.WithTimeout must state
that the timeout is only effective if called before the HTTP client is
initialized because GetHTTPClient() uses sync.Once; update the comment on
WithTimeout to explicitly mention that calling WithTimeout after the first
GetHTTPClient()/request will have no effect at runtime, so users must call it
prior to the first request or client initialization; reference
BackendSampler.WithTimeout and the GetHTTPClient sync.Once initialization in the
description to make this one-time behavior clear.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e6cbe906-e387-4795-b4a9-1b99d68c68c1

📥 Commits

Reviewing files that changed from the base of the PR and between ec8a551 and 3ac8287.

📒 Files selected for processing (2)
  • pkg/monitor/backenddisruption/disruption_backend_sampler.go
  • pkg/monitortests/network/disruptionserviceloadbalancer/monitortest.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/monitortests/network/disruptionserviceloadbalancer/monitortest.go

@neisw
Copy link
Copy Markdown
Contributor

neisw commented Apr 17, 2026

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 17, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 17, 2026

See e2e-aws-eusc-techpreview. Back in a few hours to check 👀

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 17, 2026

/verified by e2e and #30994 (comment)

The EUSC run passed the test as expeced 👍

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

@tthvo: This PR has been marked as verified by e2e and https://github.com/openshift/origin/pull/30994#issuecomment-4270174262.

Details

In response to this:

/verified by e2e and #30994 (comment)

The EUSC run passed the test as expeced 👍

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.

@neisw
Copy link
Copy Markdown
Contributor

neisw commented Apr 17, 2026

/lgtm
/override ci/prow/e2e-vsphere-ovn-upi

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 17, 2026

@neisw: Overrode contexts on behalf of neisw: ci/prow/e2e-vsphere-ovn-upi

Details

In response to this:

/lgtm
/override ci/prow/e2e-vsphere-ovn-upi

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.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 17, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neisw, tthvo

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

@tthvo
Copy link
Copy Markdown
Member Author

tthvo commented Apr 17, 2026

/tide refresh

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 17, 2026

@tthvo: 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 a3ffcaf into openshift:main Apr 17, 2026
21 checks passed
@tthvo tthvo deleted the lb-timeout branch April 17, 2026 22:44
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.

3 participants