Skip to content

Validate HostedCluster conditions for Agent#74082

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
mgencur:agent_validate_cluster_conditions
Feb 11, 2026
Merged

Validate HostedCluster conditions for Agent#74082
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
mgencur:agent_validate_cluster_conditions

Conversation

@mgencur
Copy link
Copy Markdown
Contributor

@mgencur mgencur commented Jan 28, 2026

Add step-registry component to verify HostedCluster status conditions in Agent platform deployments. Validates conditions like Available, ValidConfiguration, and SupportedHostedCluster before tests run.

Integrated into multiple hypershift-mce-agent test chains.

This mimics the ValidateHostedClusterConditions from openshift/hypershift. Hovewer, it only checks conditions that are general for all platforms or specific for Agent. Checks for other platforms (AWS, Kubevirt, etc.) are excluded because this step is specific for Agent.

Covers also ControlPlaneConnectionAvailable and DataPlaneConnectionAvailable from https://issues.redhat.com/browse/CNTRLPLANE-2203

@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 28, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Jan 28, 2026

@mgencur: This pull request references CNTRLPLANE-2203 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 either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

Add comprehensive validation function that checks 20+ HostedCluster conditions with version-aware and context-specific assertions. Supports worker/worker-less clusters, managed/unmanaged etcd, and OpenShift version-specific conditions.

Covers also ControlPlaneConnectionAvailable and DataPlaneConnectionAvailable from https://issues.redhat.com/browse/CNTRLPLANE-2203

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.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 28, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-disconnected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci openshift-ci bot requested review from avishayt and csrwng January 28, 2026 16:19
@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 28, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-disconnected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 28, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur mgencur force-pushed the agent_validate_cluster_conditions branch 2 times, most recently from 3196682 to 84612a7 Compare January 28, 2026 20:27
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Jan 28, 2026

@mgencur: This pull request references CNTRLPLANE-2203 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 either version "4.22." or "openshift-4.22.", but it targets "openshift-4.21" instead.

Details

In response to this:

Add step-registry component to verify HostedCluster status conditions in Agent platform deployments. Validates conditions like Available, ValidConfiguration, and SupportedHostedCluster before tests run.

Integrated into multiple hypershift-mce-agent test chains.

Covers also ControlPlaneConnectionAvailable and DataPlaneConnectionAvailable from https://issues.redhat.com/browse/CNTRLPLANE-2203

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.

@mgencur mgencur force-pushed the agent_validate_cluster_conditions branch 3 times, most recently from 97b8705 to 905dcbb Compare January 29, 2026 08:34
@mgencur mgencur changed the title CNTRLPLANE-2203: Validate HostedCluster conditions for Agent Validate HostedCluster conditions for Agent Jan 29, 2026
@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

Add step-registry component to verify HostedCluster status conditions in Agent platform deployments. Validates conditions like Available, ValidConfiguration, and SupportedHostedCluster before tests run.

Integrated into multiple hypershift-mce-agent test chains.

Covers also ControlPlaneConnectionAvailable and DataPlaneConnectionAvailable from https://issues.redhat.com/browse/CNTRLPLANE-2203

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.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 29, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 29, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Jan 29, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Feb 2, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Feb 4, 2026

/pj-rehearse periodic-ci-openshift-hypershift-release-4.21-periodics-mce-e2e-agent-connected-ovn-dualstack-metal-conformance

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@mgencur: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Feb 11, 2026
Copy link
Copy Markdown
Contributor

@jparrill jparrill left a comment

Choose a reason for hiding this comment

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

/lgtm

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

openshift-ci bot commented Feb 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill, mgencur

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
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Feb 11, 2026

@mgencur: 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 1b2e065 into openshift:main Feb 11, 2026
15 checks passed
gpei pushed a commit to gpei/release that referenced this pull request Feb 18, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
memodi pushed a commit to memodi/release that referenced this pull request Feb 18, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
theautoroboto pushed a commit to theautoroboto/release that referenced this pull request Feb 19, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
dhensel-rh pushed a commit to dhensel-rh/release that referenced this pull request Feb 19, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
@zhfeng
Copy link
Copy Markdown
Contributor

zhfeng commented Feb 27, 2026

Hi @mgencur ,

When I invesigate

The check condition for PlatformCredentialsFound is always failed on 4.16. So I wonder if this condition is not avaliable on 4.16. The following output is analysted by AI to find the different between the 4.16 codebase and others.

In HyperShift's hostedcluster_controller.go, after ReconcileCredentials succeeds, the code to set the condition to
True differs between versions:

release-4.16:

  if meta.IsStatusConditionFalse(..., "PlatformCredentialsFound") {
      // set to True
  }

release-4.17+:

  if !meta.IsStatusConditionTrue(..., "PlatformCredentialsFound") {
      // set to True
  }

The difference:

  • IsStatusConditionFalse → returns true only when the condition exists AND is False
  • !IsStatusConditionTrue → returns true when the condition doesn't exist OR is False

On a fresh HostedCluster where credentials never failed, the condition was never created. On 4.16, IsStatusConditionFalse sees "condition doesn't exist" and returns false, so it never sets it to True. The condition simply never appears.

On 4.17+, !IsStatusConditionTrue sees "condition doesn't exist" and returns true, so it properly sets it to True on the first successful reconciliation.

cc @jparrill

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Mar 2, 2026

@zhfeng Yeah. Looks like this was a bug fixed in 4.17. We can exclude this condition for 4.16 and older.

@mgencur
Copy link
Copy Markdown
Contributor Author

mgencur commented Mar 2, 2026

@zhfeng Sent #75544

rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 3, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
kannon92 pushed a commit to kannon92/release that referenced this pull request Mar 3, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
wangke19 pushed a commit to wangke19/release that referenced this pull request Mar 4, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 5, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
weinliu pushed a commit to weinliu/release that referenced this pull request Mar 6, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
sdodson pushed a commit to sdodson/release that referenced this pull request Mar 8, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Mar 11, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
tareqalayan pushed a commit to tareqalayan/release that referenced this pull request Mar 13, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
qiliRedHat pushed a commit to qiliRedHat/release that referenced this pull request Mar 13, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
MayXuQQ pushed a commit to MayXuQQ/release that referenced this pull request Mar 17, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Mar 17, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
sairameshv pushed a commit to sairameshv/release that referenced this pull request Mar 23, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
zhouying7780 pushed a commit to zhouying7780/release that referenced this pull request Mar 25, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
rrasouli pushed a commit to rrasouli/release that referenced this pull request Mar 25, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
anpingli pushed a commit to anpingli/release that referenced this pull request Mar 30, 2026
* CNTRLPLANE-2203: Validate HostedCluster conditions for Agent

* Increase NUM_WORKERS to 4
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. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants