Skip to content

OCPBUGS-93462: Fix stale resourceVersion in HCCO patchHCPStatusCondition#8902

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
vsolanki12:vsolanki/ocpbugs-93462-fix-stale-rv
Jul 14, 2026
Merged

OCPBUGS-93462: Fix stale resourceVersion in HCCO patchHCPStatusCondition#8902
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
vsolanki12:vsolanki/ocpbugs-93462-fix-stale-rv

Conversation

@vsolanki12

@vsolanki12 vsolanki12 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Replaces the inline patchHCPStatusCondition implementation in the HCCO resources controller with the shared statuspatching.PatchStatusCondition helper introduced in PR #8782.

The old implementation operated on a stale HCP object fetched once at reconciliation start. When concurrent controllers (reencryption, hcpstatus) bumped the resourceVersion between fetch and patch, the optimistic lock returned a 409 conflict that was not retried, silently dropping condition updates like ConfigOperatorReconciliationSucceeded.

The new helper re-fetches the HCP on each attempt and retries on conflict automatically, fixing the root cause.

Jira

OCPBUGS-93462

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of cluster status updates, especially during concurrent changes.
    • Reduced the chance of status conditions becoming stale or failing to update.
    • Centralized error handling for status updates, which should make failures more consistent and easier to recover from.

@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: LGTM mode

@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 Jul 2, 2026
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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-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. labels Jul 2, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@vsolanki12: This pull request references Jira Issue OCPBUGS-93462, 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 (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

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

Details

In response to this:

What does this PR do?

Replaces the inline patchHCPStatusCondition implementation in the HCCO resources controller with the shared statuspatching.PatchStatusCondition helper introduced in PR #8782.

The old implementation operated on a stale HCP object fetched once at reconciliation start. When concurrent controllers (reencryption, hcpstatus) bumped the resourceVersion between fetch and patch, the optimistic lock returned a 409 conflict that was not retried, silently dropping condition updates like ConfigOperatorReconciliationSucceeded.

The new helper re-fetches the HCP on each attempt and retries on conflict automatically, fixing the root cause.

How was this tested?

  • Built custom CPO image with the fix and deployed on a KubeVirt HCP cluster (test-93462)
  • Verified ConfigOperatorReconciliationSucceeded condition is now set correctly (True - AsExpected)
  • Confirmed no conflict/retry errors in HCCO logs across multiple reconciliation cycles
  • All existing unit tests pass (reconcileDataPlaneConnectionAvailable, reconcileControlPlaneConnectionAvailable)

Jira

OCPBUGS-93462

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-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jul 2, 2026
@openshift-ci openshift-ci Bot added do-not-merge/needs-area area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 16658bfe-0be9-4c7e-81bf-3d3c56191820

📥 Commits

Reviewing files that changed from the base of the PR and between ac20bf8 and 9f72cbe.

📒 Files selected for processing (1)
  • control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go

📝 Walkthrough

Walkthrough

This change updates the hosted cluster config operator’s HostedControlPlane condition patching flow. The restored-cluster reconcile path now calls r.patchHCPStatusCondition instead of patching status inline. That helper now delegates condition application and status patching to statuspatching.PatchStatusCondition, replacing the prior local condition merge, no-op check, and direct status patch logic.

Sequence Diagram(s)

sequenceDiagram
  participant Reconciler
  participant patchHCPStatusCondition
  participant statuspatching.PatchStatusCondition
  participant KubeAPIServer

  Reconciler->>patchHCPStatusCondition: patchHCPStatusCondition(condition)
  patchHCPStatusCondition->>statuspatching.PatchStatusCondition: delegate patching
  statuspatching.PatchStatusCondition->>KubeAPIServer: read/patch HostedControlPlane status
  KubeAPIServer-->>statuspatching.PatchStatusCondition: patch result
  statuspatching.PatchStatusCondition-->>patchHCPStatusCondition: result
  patchHCPStatusCondition-->>Reconciler: return result
Loading

Possibly related PRs

Suggested reviewers: devguyio, Nirshal, bryan-cox

🚥 Pre-merge checks | ✅ 11
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing stale resourceVersion handling in HCCO patchHCPStatusCondition.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Only resources.go changed; no test files or Ginkgo titles were added/modified, so no unstable test names were introduced.
Test Structure And Quality ✅ Passed PASS: The PR only changes a controller implementation file; no Ginkgo test code was added or modified, so the checklist is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only status condition patching was changed; no manifests or controller scheduling fields (affinity, selectors, replicas, PDBs, spread constraints) were added or modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only resources.go changed; no new Ginkgo e2e tests were added, and no test code or external connectivity assumptions were introduced.
No-Weak-Crypto ✅ Passed Changed code only delegates HCP status patching to statuspatching; no MD5/SHA1/DES/RC4/ECB/custom crypto or secret comparisons were added.
Container-Privileges ✅ Passed The only changed file is resources.go, and the diff only swaps status-patching logic; no manifest/securityContext fields or privileged settings appear.
No-Sensitive-Data-In-Logs ✅ Passed No new sensitive data logs were added; the old condition log with message/status was removed, and the new error only includes the condition type.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci-robot

Copy link
Copy Markdown

@vsolanki12: This pull request references Jira Issue OCPBUGS-93462, which is valid.

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

In response to this:

What does this PR do?

Replaces the inline patchHCPStatusCondition implementation in the HCCO resources controller with the shared statuspatching.PatchStatusCondition helper introduced in PR #8782.

The old implementation operated on a stale HCP object fetched once at reconciliation start. When concurrent controllers (reencryption, hcpstatus) bumped the resourceVersion between fetch and patch, the optimistic lock returned a 409 conflict that was not retried, silently dropping condition updates like ConfigOperatorReconciliationSucceeded.

The new helper re-fetches the HCP on each attempt and retries on conflict automatically, fixing the root cause.

How was this tested?

  • Built custom CPO image with the fix and deployed on a KubeVirt HCP cluster (test-93462)
  • Verified ConfigOperatorReconciliationSucceeded condition is now set correctly (True - AsExpected)
  • Confirmed no conflict/retry errors in HCCO logs across multiple reconciliation cycles
  • All existing unit tests pass (reconcileDataPlaneConnectionAvailable, reconcileControlPlaneConnectionAvailable)

Jira

OCPBUGS-93462

Summary by CodeRabbit

  • Bug Fixes
  • Improved reliability of control plane status updates.
  • Reduced the chance of status update conflicts caused by stale data during reconciliation.
  • Status conditions are now updated more consistently, helping ensure the UI reflects current cluster state.

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.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.45%. Comparing base (ce9dd2c) to head (9f72cbe).
⚠️ Report is 126 commits behind head on main.

Files with missing lines Patch % Lines
...rconfigoperator/controllers/resources/resources.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8902      +/-   ##
==========================================
+ Coverage   43.28%   43.45%   +0.17%     
==========================================
  Files         771      771              
  Lines       95503    95707     +204     
==========================================
+ Hits        41335    41589     +254     
+ Misses      51284    51232      -52     
- Partials     2884     2886       +2     
Files with missing lines Coverage Δ
...rconfigoperator/controllers/resources/resources.go 57.53% <50.00%> (-0.06%) ⬇️

... and 14 files with indirect coverage changes

Flag Coverage Δ
cmd-support 37.12% <ø> (+0.45%) ⬆️
cpo-hostedcontrolplane 45.21% <ø> (-0.11%) ⬇️
cpo-other 45.07% <50.00%> (-0.03%) ⬇️
hypershift-operator 53.65% <ø> (+0.06%) ⬆️
other 32.08% <ø> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vsolanki12

Copy link
Copy Markdown
Contributor Author

I have tried to test on my test cluster:

Before fix:

$ oc get hostedcontrolplane -n clusters-repro-93462 -o jsonpath='{.items[0].status.conditions[*].type}' | tr ' ' '\n' | grep -i ConfigOperator
<No Output>

$ oc get hostedcontrolplane -n clusters-repro-93462 -o jsonpath='{range .items[0].status.conditions[?(@.type=="ConfigOperatorReconciliationSucceeded")]}{.type}: {.status} - {.reason} - {.message}{"\n"}{end}'
<No Output>

$ oc logs -n clusters-repro-93462 deployment/hosted-cluster-config-operator --tail=500 | grep -i 'reconcil'

{"level":"info","ts":"...","msg":"Finished reconciling configuration and version status",
  "controller":"hcpstatus","reconcileID":"..."}
{"level":"info","ts":"...","msg":"reconciling data plane connection available condition",
  "controller":"resources","reconcileID":"..."}
{"level":"info","ts":"...","msg":"reconciling control plane connection available condition",
  "controller":"resources","reconcileID":"..."}

$ oc get hostedcontrolplane -n clusters-repro-93462 -o jsonpath='{range .items[0].status.conditions[*]}{.type}: {.status} - {.reason}{"\n"}{end}' | grep -E 'DataPlane|ControlPlane|ConfigOperator'

DataPlaneConnectionAvailable: Unknown - NoWorkerNodesAvailable
ControlPlaneConnectionAvailable: Unknown - NoWorkerNodesAvailable
ConfigOperatorReconciliationSucceeded  <-- MISSING, never appears

After fix:

$ oc get hostedcontrolplane -n clusters-test-93462 -o jsonpath='{.items[0].status.conditions[*].type}' | tr ' ' '\n' | grep -i ConfigOperator

ConfigOperatorReconciliationSucceeded

$ oc get hostedcontrolplane -n clusters-test-93462 -o jsonpath='{range .items[0].status.conditions[?(@.type=="ConfigOperatorReconciliationSucceeded")]}{.type}: {.status} - {.reason} - {.message}{"\n"}{end}'

ConfigOperatorReconciliationSucceeded: True - AsExpected - All is well

$ oc get hostedcontrolplane -n clusters-test-93462 -o jsonpath='{range .items[0].status.conditions[*]}{.type}: {.status} - {.reason} - {.message}{"\n"}{end}' | grep -E 'DataPlane|ControlPlane|ConfigOperator'

DataPlaneConnectionAvailable: Unknown - NoWorkerNodesAvailable - No worker nodes available
ControlPlaneConnectionAvailable: Unknown - NoWorkerNodesAvailable - No worker nodes available to verify control plane connectivity
ConfigOperatorReconciliationSucceeded: True - AsExpected - All is well

$ oc logs -n clusters-test-93462 deployment/hosted-cluster-config-operator --tail=500 | grep -i 'conflict\|retry\|failed.*patch\|error.*condition'
<No Output>

$ oc logs -n clusters-test-93462 deployment/hosted-cluster-config-operator --tail=200 | grep -i 'reconciling.*condition'

{"level":"info","ts":"2026-07-02T03:24:21Z","msg":"reconciling data plane connection available condition",
  "controller":"resources","reconcileID":"2dc8b3f1-2d09-447f-8a63-4dda79a84f8a"}
{"level":"info","ts":"2026-07-02T03:24:21Z","msg":"reconciling control plane connection available condition",
  "controller":"resources","reconcileID":"2dc8b3f1-2d09-447f-8a63-4dda79a84f8a"}
{"level":"info","ts":"2026-07-02T03:24:23Z","msg":"reconciling data plane connection available condition",
  "controller":"resources","reconcileID":"93a1fda5-1cc3-4f18-b29b-d07fcd408554"}
{"level":"info","ts":"2026-07-02T03:24:23Z","msg":"reconciling control plane connection available condition",
  "controller":"resources","reconcileID":"93a1fda5-1cc3-4f18-b29b-d07fcd408554"}

@vsolanki12 vsolanki12 marked this pull request as ready for review July 6, 2026 05:42
@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 Jul 6, 2026
@openshift-ci openshift-ci Bot requested review from cblecker and clebs July 6, 2026 05:42
@clebs

clebs commented Jul 6, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aws | Build: 2074040205974704128 | Cost: $5.037516250000002 | Failed step: hypershift-aws-run-e2e-nested

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@cwbotbot

cwbotbot commented Jul 6, 2026

Copy link
Copy Markdown

Test Results

e2e-aws

Failed Tests

Total failed tests: 35

  • TestAutoscaling
  • TestAutoscaling/ValidateHostedCluster
  • TestAutoscaling/ValidateHostedCluster/EnsureNoCrashingPods
  • TestCreateCluster
  • TestCreateCluster/ValidateHostedCluster

... and 30 more failed tests

e2e-aks

@cblecker cblecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

reconcileClusterRecovery (around line 585) has the same stale-resourceVersion pattern this PR fixes — it deep-copies the potentially stale hcp, mutates the condition, and patches with MergeFromWithOptimisticLock without re-fetch or retry on conflict.

Since patchHCPStatusCondition now delegates to the shared helper and the import is already here, would it make sense to convert this too?

condition := metav1.Condition{
	Type:               string(hyperv1.HostedClusterRestoredFromBackup),
	Status:             metav1.ConditionTrue,
	Reason:             "Restored",
	Message:            "This hosted cluster has been restored from a backup.",
	ObservedGeneration: hcp.Generation,
}
return ctrl.Result{}, r.patchHCPStatusCondition(ctx, hcp, &condition)

// It only performs the API call if the condition actually changed.
// Delegates to statuspatching.PatchStatusCondition which re-fetches the HCP on each attempt,
// avoiding stale resourceVersion conflicts when concurrent controllers update HCP status.
func (r *reconciler) patchHCPStatusCondition(ctx context.Context, hcp *hyperv1.HostedControlPlane, condition *metav1.Condition) error {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The old implementation wrapped errors with the condition type (fmt.Errorf("failed to patch HCP status with %s condition: %w", condition.Type, err)), which was helpful for debugging since this controller manages ~13 distinct conditions per reconcile cycle. The new one-liner returns the raw error without that context, and 12 of 13 call sites don't add their own wrapping.

Consider preserving it here:

func (r *reconciler) patchHCPStatusCondition(ctx context.Context, hcp *hyperv1.HostedControlPlane, condition *metav1.Condition) error {
	if err := statuspatching.PatchStatusCondition(ctx, r.cpClient, hcp, &hcp.Status.Conditions, *condition); err != nil {
		return fmt.Errorf("failed to patch HCP status with %s condition: %w", condition.Type, err)
	}
	return nil
}

@vsolanki12 vsolanki12 Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Preserved the error wrapping with condition type context around the helper call.

The HCCO patchHCPStatusCondition method operated on a stale HCP object
fetched once at reconciliation start. When concurrent controllers bumped
the resourceVersion between fetch and patch, the optimistic lock returned
a 409 conflict that was not retried, silently dropping condition updates.

Replace with statuspatching.PatchStatusCondition which re-fetches the HCP
on each attempt and retries on conflict automatically.

Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
@vsolanki12

Copy link
Copy Markdown
Contributor Author

@cblecker Good catch on reconcileClusterRecovery — converted it to use patchHCPStatusCondition as well, since it had the same stale-resourceVersion pattern (deep-copy + inline patch without retry). This also makes it the 14th call site going through the shared helper.


AI-assisted response via Claude Code

@vsolanki12 vsolanki12 force-pushed the vsolanki/ocpbugs-93462-fix-stale-rv branch from ac20bf8 to 9f72cbe Compare July 7, 2026 08:31
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026
@cblecker

cblecker commented Jul 7, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-v2-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws
/test e2e-v2-gke

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aks | Build: 2074511368496615424 | Cost: $3.5248667500000006 | Failed step: hypershift-azure-run-e2e

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@vsolanki12

Copy link
Copy Markdown
Contributor Author

/retest
as these previous jobs got failed due to network issue.

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

AI Test Failure Analysis

Job: pull-ci-openshift-hypershift-main-e2e-aks | Build: 2074800775782993920 | Cost: $2.2203255000000004 | Failed step: hypershift-azure-run-e2e

View full analysis report


Generated by hypershift-analyze-e2e-failure post-step using Claude claude-opus-4-6

@hypershift-jira-solve-ci

Copy link
Copy Markdown
Contributor

Confirmed: TestHAEtcdChaos and TestPullSecretUnavailable (LoadBalancer-based) passed. All Route-based tests failed. Now I have all the evidence needed. Let me produce the final report.

Test Failure Analysis Complete

Job Information

Test Failure Analysis

Error

dial tcp: lookup api-<cluster>.aks-e2e.hypershift.azure.devcluster.openshift.com on 172.30.0.10:53: no such host

Available=False: KASLoadBalancerNotReachable
ExternalDNSReachable=False: ExternalDNSHostNotReachable
DataPlaneConnectionAvailable=Unknown: NoWorkerNodesAvailable
ClusterVersionSucceeding=False: ClusterOperatorsNotAvailable (console, dns, image-registry, ingress, insights, kube-storage-version-migrator, monitoring, node-tuning, openshift-samples, service-ca, storage)

Summary

All 17 test failures share a single root cause: the External DNS controller on the AKS management cluster failed to create DNS A-records in the Azure DNS zone aks-e2e.hypershift.azure.devcluster.openshift.com for hosted cluster API endpoints. This caused every test that uses Route-based service publishing (with custom DNS hostnames) to fail — DNS resolution returned "no such host", making the KAS API endpoint unreachable, preventing worker nodes from joining, and leaving all cluster operators unavailable. Tests using LoadBalancer-based service publishing (TestHAEtcdChaos, TestPullSecretUnavailable) passed because they connect directly via load balancer IP without needing External DNS. This is an infrastructure/environment issue unrelated to PR #8902, which only changes HCP status condition patching logic.

Root Cause

The External DNS controller in the AKS management cluster is not creating DNS records for hosted clusters that use Route-based service publishing with custom hostnames under *.aks-e2e.hypershift.azure.devcluster.openshift.com.

Failure chain:

  1. Hosted clusters are created successfully (all 8 clusters created in ~2m30s)
  2. Kubeconfig secrets are published and available
  3. External DNS fails to create A-records in Azure DNS zone for api-<cluster>.aks-e2e.hypershift.azure.devcluster.openshift.com
  4. DNS lookups for the API endpoint return "no such host" (both from test pod via 172.30.0.10 and from within the hosted cluster via 10.0.0.10)
  5. KAS API server is unreachable → Available=False: KASLoadBalancerNotReachable
  6. No worker nodes can join → DataPlaneConnectionAvailable=Unknown: NoWorkerNodesAvailable
  7. Cluster operators (console, dns, image-registry, ingress, insights, monitoring, etc.) never become available
  8. ValidateHostedCluster times out after 10 minutes waiting for API server connectivity

Why PR #8902 is NOT the cause:

  • PR OCPBUGS-93462: Fix stale resourceVersion in HCCO patchHCPStatusCondition #8902 modifies a single file (control-plane-operator/hostedclusterconfigoperator/controllers/resources/resources.go) replacing an inline patchHCPStatusCondition with the shared statuspatching.PatchStatusCondition helper
  • This change only affects HCP status condition patching — it has no relationship to External DNS, DNS record creation, Route hostname assignment, or Azure DNS zone management
  • The failure pattern (100% Route-based tests fail, 100% LoadBalancer-based tests pass) confirms an infrastructure issue with the External DNS setup
Recommendations
  1. Rerun the job — if this is a transient External DNS controller issue (pod crash, temporary Azure API outage), a rerun may succeed
  2. Investigate External DNS controller in the AKS management cluster — check if it is running, has correct Azure credentials, and has permissions to create records in the aks-e2e.hypershift.azure.devcluster.openshift.com DNS zone
  3. Check Azure DNS zone aks-e2e.hypershift.azure.devcluster.openshift.com — verify the zone exists, is properly delegated, and the managed identity has DNS Zone Contributor permissions
  4. Check other recent e2e-aks job runs across different PRs to determine if this is a persistent environment issue or a one-time flake
  5. No code changes needed in PR OCPBUGS-93462: Fix stale resourceVersion in HCCO patchHCPStatusCondition #8902 — the PR's status-patching improvement is orthogonal to the DNS infrastructure issue
Evidence
Evidence Detail
Failing step hypershift-azure-run-e2e (test phase)
Failure pattern 100% of Route-based tests failed (8 hosted clusters); 100% of LoadBalancer-based tests passed
DNS error lookup api-<cluster>.aks-e2e.hypershift.azure.devcluster.openshift.com: no such host on both 172.30.0.10:53 and 10.0.0.10:53
HostedCluster condition ExternalDNSReachable=False: ExternalDNSHostNotReachable on all 8 Route-based clusters
HostedCluster condition Available=False: KASLoadBalancerNotReachable on all 8 Route-based clusters
HostedCluster condition DataPlaneConnectionAvailable=Unknown: NoWorkerNodesAvailable — no workers joined
Passing tests TestHAEtcdChaos (LoadBalancer, no DNS needed), TestPullSecretUnavailable (LoadBalancer, no DNS needed)
Failing tests TestCreateCluster, TestCreateClusterCustomConfig, TestNodePool (x2), TestAzureScheduler, TestAutoscaling, TestCreateClusterHABreakGlassCredentials, TestUpgradeControlPlane
Cluster creation All hosted clusters created successfully in ~2m25-2m34s — infrastructure provisioning was fine
AKS cluster ci-op-h0692w0h-4a2a3-aks-cluster provisioned successfully with NAP (Node Auto Provisioning) enabled
PR #8902 scope Single file change to HCP status condition patching — no External DNS or DNS-related code
External DNS domain --e2e.external-dns-domain=aks-e2e.hypershift.azure.devcluster.openshift.com
Timeout ValidateHostedCluster timed out after 10m0s waiting for API server connectivity

@clebs

clebs commented Jul 9, 2026

Copy link
Copy Markdown
Member

/approve

@vsolanki12

Copy link
Copy Markdown
Contributor Author

/retest

@csrwng csrwng added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: clebs, vsolanki12

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

@vsolanki12

Copy link
Copy Markdown
Contributor Author

/verified by @vsolanki12
reference with the manual testing on test cluster. #8902 (comment)

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 14, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@vsolanki12: This PR has been marked as verified by @vsolanki12.

Details

In response to this:

/verified by @vsolanki12
reference with the manual testing on test cluster. #8902 (comment)

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.

@vsolanki12

Copy link
Copy Markdown
Contributor Author

/label acknowledge-critical-fixes-only

@openshift-ci openshift-ci Bot added the acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@vsolanki12: 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 bbc1bc5 into openshift:main Jul 14, 2026
40 of 41 checks passed
@openshift-ci-robot

Copy link
Copy Markdown

@vsolanki12: Jira Issue Verification Checks: Jira Issue OCPBUGS-93462
✔️ 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-93462 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:

What does this PR do?

Replaces the inline patchHCPStatusCondition implementation in the HCCO resources controller with the shared statuspatching.PatchStatusCondition helper introduced in PR #8782.

The old implementation operated on a stale HCP object fetched once at reconciliation start. When concurrent controllers (reencryption, hcpstatus) bumped the resourceVersion between fetch and patch, the optimistic lock returned a 409 conflict that was not retried, silently dropping condition updates like ConfigOperatorReconciliationSucceeded.

The new helper re-fetches the HCP on each attempt and retries on conflict automatically, fixing the root cause.

Jira

OCPBUGS-93462

Summary by CodeRabbit

  • Bug Fixes
  • Improved reliability of cluster status updates, especially during concurrent changes.
  • Reduced the chance of status conditions becoming stale or failing to update.
  • Centralized error handling for status updates, which should make failures more consistent and easier to recover from.

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

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release 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. 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.

6 participants