Skip to content

pkg/readiness: Fix etcd health check for HyperShift hosted clusters#1

Merged
harche merged 1 commit into
harche:readiness_pkgfrom
jhadvig:fix-hypershift-etcd-readiness
Jun 25, 2026
Merged

pkg/readiness: Fix etcd health check for HyperShift hosted clusters#1
harche merged 1 commit into
harche:readiness_pkgfrom
jhadvig:fix-hypershift-etcd-readiness

Conversation

@jhadvig

@jhadvig jhadvig commented Jun 24, 2026

Copy link
Copy Markdown

Summary

Fixes the e2e-hypershift-conformance CI failures in PR openshift#1395 caused by the etcd readiness check and its e2e test not accounting for HyperShift topology.

On HyperShift hosted clusters, etcd runs on the management cluster — the etcd ClusterOperator and openshift-etcd namespace do not exist on the guest cluster. This caused two blocking test failures:

  • should run all checks without errorsEtcdHealthCheck errored trying to fetch the missing etcd CO, causing ChecksErrored > 0
  • should report etcd member count matching actual etcd pods — listing pods in the non-existent openshift-etcd namespace failed

Changes

  • pkg/readiness/etcd_health.go: Handle NotFound on the etcd ClusterOperator by returning {externally_managed: true, total_members: 0, healthy_members: 0} with status ok instead of erroring. Non-NotFound errors (permissions, timeouts) still propagate as errors.

  • test/cvo/readiness.go: Skip the etcd comparison test on HyperShift using the existing util.SkipIfHypershift() helper, since there are no etcd pods to compare against. All other readiness tests (node capacity, operators, network, PDBs, etc.) continue to run on HyperShift.

Test plan

  • go build ./... passes
  • go test ./pkg/readiness/ — all unit tests pass
  • Test metadata unchanged (make update produces no diff)

On HyperShift hosted clusters, etcd runs on the management cluster and
the etcd ClusterOperator does not exist on the guest cluster. The
EtcdHealthCheck now handles the NotFound case by returning
externally_managed: true instead of erroring, which prevents the
readiness check from failing on HyperShift.

The etcd e2e comparison test is also skipped on HyperShift since the
openshift-etcd namespace does not exist on hosted clusters, making
ground-truth pod comparison impossible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@harche harche merged commit a12626c into harche:readiness_pkg Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants