feat(ROSAENG-68802): add control-plane EBS volume change notification #991
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->
[!IMPORTANT]
## Review skipped
> Bot user detected.
> To trigger a single review, invoke the @coderabbitai review command.> <details>
<summary>⚙️ Run configuration</summary>
> - Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID: 4aabd786-8b33-4530-87d0-1b34517ceee8> </details>
> You can disable this status message by setting thereviews.review_statustofalsein the CodeRabbit configuration file.
> Use the checkbox below for a quick retry:
- [ ] <!-- {"checkboxId":"e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review
<!-- end of auto-generated comment: skip review by coderabbit.ai -->
<!-- tips_start -->
---
<sub>Comment @coderabbitai help to get the list of available commands.</sub>
<!-- tips_end -->
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: <a href="https://github.com/openshift/osdctl/pull/991#" title="Author self-approved">fullsend-ai-coder[bot]</a>
Once this PR has been reviewed and has the lgtm label, please assign bergmannf for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
<details open>
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
</details>
<!-- META={"approvers":["bergmannf"]} -->
Hi @fullsend-ai-coder[bot]. Thanks for your PR.
I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.
Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
<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.
</details>
AWS definitely defaults to gp3
/fs-fix
1. Drop defaultAWSEBSVolumeType — don't hardcode an AWS default. Keep currentType := "" and if it's empty after the nil check, skip the automatic service log and print guidance for the SRE to verify the actual type and send the
service log manually.
2. Service log placement is good — after patch, before monitoring. Keep it there.
3. Fix $CLUSTER_ID — line 394 uses a Go string literal "$CLUSTER_ID" instead of o.clusterID. The infra path gets this right.
4. Use strings.Join for params — same pattern as infra, instead of hardcoding individual -p flags.
5. ObservedGeneration check is a good fix — the stale-status race was a real bug, keep it.
7. Error on nil EBS instead of panic — add if awsSpec.BlockDevices[0].EBS == nil { return fmt.Errorf("CPMS blockDevice has no EBS configuration") } before the write path. Stops the operation cleanly instead of a nil-deref panic.
8. Redundant double timeout in monitorCPMSRollout — context.WithTimeout wraps with rolloutPollTimeout, then PollUntilContextTimeout applies the same timeout again internally. Drop one.
9. Add rollout monitoring fallback guidance — if monitorCPMSRollout fails or times out, print recovery guidance like CPMS patch was applied successfully but rollout monitoring failed. Monitor manually with: oc get
controlplanemachineset/cluster -n openshift-machine-api -w. The SRE needs to know the patch went through and how to watch it themselves.
<!-- fullsend:agent-status:38252251868 -->
<!-- fullsend:status:terminal -->
🤖 Finished Fix · ❌ Failure (ensuring provider "gitleaks": retries exhausted after 3 attempts: provider create "gitleaks" failed: exit status 1 (output: Error: × unsupported provider type or profile: fullsend-gitleaks ) ensuring…) · Started 12:58 PM UTC · Completed 12:58 PM UTC
Commit: e45d118 · View workflow run →
Effort: high
Thanks Josh. This was added because the field is optional in cpms.
The command moves volumes to gp3 so using a default as PREVIOUS_VOLUME_TYPE doesn't make much sense.
Instead, we can error and send the servicelog manually with the correct previous volume type.
The other option is for osdctl to pull it from the aws account, but during operations, the previous type will generally be known to the operator before running this command anyhow^^
/fs-fix
1. Drop defaultAWSEBSVolumeType — don't hardcode an AWS default. Keep currentType := "" and if it's empty after the nil check, skip the automatic service log and print guidance for the SRE to verify the actual type and send the
service log manually.
2. Service log placement is good — after patch, before monitoring. Keep it there.
3. Fix $CLUSTER_ID — line 394 uses a Go string literal "$CLUSTER_ID" instead of o.clusterID. The infra path gets this right.
4. Use strings.Join for params — same pattern as infra, instead of hardcoding individual -p flags.
5. ObservedGeneration check is a good fix — the stale-status race was a real bug, keep it.
7. Error on nil EBS instead of panic — add if awsSpec.BlockDevices[0].EBS == nil { return fmt.Errorf("CPMS blockDevice has no EBS configuration") } before the write path. Stops the operation cleanly instead of a nil-deref panic.
8. Redundant double timeout in monitorCPMSRollout — context.WithTimeout wraps with rolloutPollTimeout, then PollUntilContextTimeout applies the same timeout again internally. Drop one.
9. Add rollout monitoring fallback guidance — if monitorCPMSRollout fails or times out, print recovery guidance like CPMS patch was applied successfully but rollout monitoring failed. Monitor manually with: oc get
controlplanemachineset/cluster -n openshift-machine-api -w. The SRE needs to know the patch went through and how to watch it themselves.
<!-- fullsend:agent-status:38253584140 -->
<!-- fullsend:status:terminal -->
🤖 Finished Fix · ❌ Failure (ensuring provider "package-registries": retries exhausted after 3 attempts: provider create "package-registries" failed: exit status 1 (output: Error: × unsupported provider type or profile: fullsend-…) · Started 1:10 PM UTC · Completed 1:10 PM UTC
Commit: e45d118 · View workflow run →
Effort: high
/fs-fix test
<!-- fullsend:agent-status:38402673677 -->
<!-- fullsend:status:terminal -->
🤖 Finished Fix · ❌ Failure (ensuring provider "github-artifacts": retries exhausted after 3 attempts: provider create "github-artifacts" failed: exit status 1 (output: Error: × unsupported provider type or profile: fullsend-gith…) · Started 1:10 PM UTC · Completed 1:10 PM UTC
Commit: e45d118 · View workflow run →
Effort: high
/close
@RaphaelBut: Closed this PR.
<details>
In response to this:
>/close
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.
</details>
joshbranham
fullsend-ai-coder[bot]
Summary
controlplane_volume_type_changed.json), separate from the existing infra templateservicelog.Post()for the standard confirmation flowVolumeTypeas the effective AWS defaultgp2so notifications are not skipped when the field is nilmonitorCPMSRolloutto wait forObservedGenerationto matchGenerationbefore trusting replica counts, preventing stale pre-patch status from prematurely satisfying the completion checkDepends on the template added in managed-notifications#436.
Testing
go test -v ./cmd/cluster/-- all tests pass (existing + new)go vet ./cmd/cluster/-- clean---
Related to https://redhat.atlassian.net/browse/ROSAENG-68802
Post-script verification
agent/ROSAENG-68802-cp-ebs-notification)8f99854ac061a7720c4876947770c222ad9c3a7f..HEAD)