Repository navigation
Conversation
eb9b470 to
d092c03
Compare
🧪 qe — 2026-04-13T20:17:11ZComprehensive Testing Report:
|
| Parameter | Value |
|---|---|
| Management cluster | OCP 4.22.0-0.nightly-multi (Kubernetes v1.34.2) |
| HO image | quay.io/abdalla/hypershift:backport-cpv-420 (all-in-one dev image) |
| CPO image | quay.io/abdalla/hypershift:backport-cpv-420 (same all-in-one image) |
| Initial release | quay.io/openshift-release-dev/ocp-release:4.20.0-multi |
| HostedCluster | cpv-test-420 (namespace: clusters, infra-id: cpv-test-420-bfl4s) |
| Region | us-east-1 |
| Node pool | 2 replicas (scaled to 0 during upgrade test, then back to 2) |
Build & Deployment
- Checked out
backport-controlplaneversion-release-4.20branch - Built all binaries locally with
make build(Go 1.26.2) - Built all-in-one dev image using UBI9 base with all binaries + CPO labels
- Pushed to
quay.io/abdalla/hypershift:backport-cpv-420 - Deleted existing CRDs for clean install (ensures printer columns are correct)
- Installed HO with
--enable-conversion-webhook=true(default) - Created HC with
--control-plane-operator-image quay.io/abdalla/hypershift:backport-cpv-420
Test Scenario: Multi-Upgrade with History Accumulation
Objective: Validate that controlPlaneVersion status field correctly tracks CP component rollout across multiple upgrades, accumulating history entries with proper state transitions.
Step 1: Initial Install (4.20.0)
- Created HC with release image
4.20.0-multi controlPlaneVersionimmediately populated with:desired.version:4.20.0history[0]: version4.20.0, statePartial
- Result: ✅ PASS — Status field populated on initial creation
Step 2: Scale NodePool to 0
- Scaled
cpv-test-420-us-east-1ato 0 replicas - CP remains Partial (no nodes to complete data-plane rollout)
- Result: ✅ PASS — Nodepool scaled successfully
Step 3: Upgrade to 4.20.1
- Patched HC spec with
4.20.1-multirelease image - After reconciliation:
desired.version:4.20.1history[0]: version4.20.1, statePartial(in progress)history[1]: version4.20.0, statePartial,completionTimeset (superseded)
- Result: ✅ PASS — History accumulated, previous entry marked with completionTime
Step 4: Upgrade to 4.20.2
- Patched HC spec with
4.20.2-multirelease image - After reconciliation:
desired.version:4.20.2history[0]: version4.20.2, statePartial(in progress)history[1]: version4.20.1, statePartial,completionTimesethistory[2]: version4.20.0, statePartial,completionTimeset
- Result: ✅ PASS — 3 history entries, correct ordering (newest first)
Step 5: Scale NodePool Back to 2
- Scaled nodepool back to 2 replicas
- Waited for CP components to reconcile at 4.20.2
- Result: ✅ PASS — Nodes provisioned, CP components became available
Step 6: Verify Completed State
- After CP availability:
desired.version:4.20.2history[0]: version4.20.2, stateCompleted,completionTime:2026-04-13T20:13:51Zhistory[1]: version4.20.1, statePartial,completionTime:2026-04-13T20:07:28Zhistory[2]: version4.20.0, statePartial,completionTime:2026-04-13T20:06:07Z
- Result: ✅ PASS — Latest entry transitioned to Completed
Printer Column Verification
NAME VERSION CP VERSION KUBECONFIG PROGRESS AVAILABLE CP PROGRESS DP PROGRESS
cpv-test-420 4.20.2 cpv-test-420-admin-kubeconfig Partial True Completed Partial
CP Versioncolumn: ✅ Displays4.20.2(fromstatus.controlPlaneVersion.history[?(@.state=="Completed")].version)CP Progresscolumn: ✅ DisplaysCompleted(fromstatus.controlPlaneVersion.history[0].state)DP Progresscolumn: ✅ DisplaysPartial(fromstatus.version.history[0].state)- Note:
VERSION(CVO-based) is empty as expected — CVO version depends on data-plane completion
HCP ↔ HC Propagation
Both HCP and HC controlPlaneVersion status are identical — confirming correct propagation from HCP to HC:
- Same
desired,history, andobservedGenerationvalues - Result: ✅ PASS
Final controlPlaneVersion Status (raw)
{
"desired": {
"image": "quay.io/openshift-release-dev/ocp-release@sha256:40cdd399e6243207a2d5bb6f2eaf8b57d01495c937c882eb6431a86f18439b70",
"version": "4.20.2"
},
"history": [
{
"completionTime": "2026-04-13T20:13:51Z",
"image": "quay.io/openshift-release-dev/ocp-release@sha256:40cdd399e6243207a2d5bb6f2eaf8b57d01495c937c882eb6431a86f18439b70",
"startedTime": "2026-04-13T20:07:28Z",
"state": "Completed",
"version": "4.20.2"
},
{
"completionTime": "2026-04-13T20:07:28Z",
"image": "quay.io/openshift-release-dev/ocp-release@sha256:4e903dead99fc02fc64c5f599aafe066f99c33a5b375d2fe85e85f0ca64f3aaa",
"startedTime": "2026-04-13T20:06:07Z",
"state": "Partial",
"version": "4.20.1"
},
{
"completionTime": "2026-04-13T20:06:07Z",
"image": "quay.io/openshift-release-dev/ocp-release@sha256:4f1e772349a20f2eb69e8cf70d73b4fcc299c15cb6e4f027696eb469e66d4080",
"startedTime": "2026-04-13T20:03:01Z",
"state": "Partial",
"version": "4.20.0"
}
],
"observedGeneration": 3
}Summary
| Test | Result |
|---|---|
| controlPlaneVersion populated on initial creation | ✅ PASS |
| History accumulates across upgrades | ✅ PASS |
| Superseded entries get completionTime | ✅ PASS |
| State transitions: Partial → Completed | ✅ PASS |
| 3 history entries (4.20.0 → 4.20.1 → 4.20.2) | ✅ PASS |
| HCP → HC status propagation | ✅ PASS |
| CRD printer columns (CP Version, CP Progress, DP Progress) | ✅ PASS |
| Custom CPO image used | ✅ PASS |
Overall: ✅ ALL TESTS PASSED — The controlPlaneVersion backport to release-4.20 is working correctly.
d092c03 to
115d511
Compare
…nent versions Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory types to HostedClusterStatus and HostedControlPlaneStatus. These track management-side control plane component versions independently from CVO, enabling service providers to detect completed control plane upgrades and compute NodePool version skew without waiting for data-plane rollout. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
… and docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tatus Implement reconcileControlPlaneVersion() that aggregates ControlPlaneComponent status into hcp.Status.ControlPlaneVersion with version transition logic, image-only change detection, and observedGeneration tracking. Include pruneHistory() ported from CVO's weighted ranking algorithm with exact constants to cap history at 100 entries. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
Deep-copy controlPlaneVersion from HostedControlPlane status to HostedCluster status, following the existing Platform field propagation pattern. Handles nil gracefully for version skew safety during rolling upgrades. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
Extract the api/ module lint commands into standalone api-lint and api-lint-fix targets, reused by lint and lint-fix as dependencies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
115d511 to
1f789a3
Compare
Exploratory QE Validation Report: controlPlaneVersion Backport to release-4.20Test Environment
Scenario 1: controlPlaneVersion field presence on HCP - PASSCommands: Observed output:
Result: All three fields ( Scenario 2: Initial deployment - Partial to Completed transition - PASSCommands: Observed output:
Result: Scenario 3: HCP-to-HC status propagation - PASSCommands: Observed output:
Result: HC Scenario 4: Upgrade - Partial entry creation on version change - PASSCommands: Observed output:
State at observation: {
"desired": {"version": "4.20.15", "image": "...sha256:7574c1d0..."},
"history": [
{"state": "Partial", "version": "4.20.15", "startedTime": "2026-07-21T07:59:46Z"},
{"state": "Completed", "version": "4.20.14", "startedTime": "2026-07-21T07:43:47Z", "completionTime": "2026-07-21T07:52:04Z"}
],
"observedGeneration": 2
}Note: The Result: Upgrade correctly prepends a new Partial entry with startedTime, preserves previous Completed entry, bumps observedGeneration. PASS Scenario 5: History pruning - PASSApproach: Lowered Setup: Patched HCP status with 7 history entries (4.20.15 Partial, 4.20.14, 4.20.13, 4.20.12, 4.20.11, 4.19.5, 4.19.4). Observed output after CPO reconcile: Result: 7 entries pruned to 3. Kept the current Partial entry and most recent Completed entries, removed older z-stream and minor version entries, consistent with CVO weighted ranking algorithm. Code change reverted after testing. PASS Summary
|
Summary
Cherry-pick of openshift#7887 (CNTRLPLANE-2914: Add controlPlaneVersion status to HostedCluster and HostedControlPlane) to release-4.20.
This backport adds the
controlPlaneVersionstatus field toHostedClusterandHostedControlPlane, providing a management-side view of control plane component rollout status independent of the CVO.Changes
ControlPlaneVersionStatusandControlPlaneUpdateHistoryAPI typesreconcileControlPlaneVersionaggregation logic in CPOpruneHistorywith CVO weighted ranking algorithmcontrolPlaneVersionfrom HCP to HC statusWaitForControlPlaneRolloute2e helper (gated to 4.20+)WaitForImageRolloutdeprecated alias forWaitForDataPlaneRolloutConflict Resolution
aggregated-docs.mdexcluded (deleted in release-4.20)reconcileCAPIFinalizers,computeGCPPSCCondition) were excludedVersion422toVersion420for backport contextVersion421andVersion422constants added for forward compatibilityNote: This PR targets the fork's
release-4.20branch. A corresponding PR should be opened againstopenshift/hypershiftrelease-4.20once this is reviewed.Ref: openshift#7887