OCPBUGS-99229: fix(bootstrap): detect CVO render flag support before passing optional flags - #10700
OCPBUGS-99229: fix(bootstrap): detect CVO render flag support before passing optional flags#10700jira-solve-bot wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@jira-solve-bot: This pull request references Jira Issue OCPBUGS-99229, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Hi @jira-solve-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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
📝 WalkthroughWalkthroughChangesCVO render compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
/hold |
|
|
||
| # Detect which optional flags the CVO render command supports, | ||
| # to prevent bootstrap failure when a newer installer is paired | ||
| # with an older CVO binary that lacks recently-added flags. |
There was a problem hiding this comment.
add a reference in the comment to the original ocpbug reporting why this is needed
There was a problem hiding this comment.
Done. Added a reference to https://issues.redhat.com/browse/OCPBUGS-99229 in the code comment.
AI-assisted response via Claude Code
d5c8a6e to
e4c25ba
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@data/data/bootstrap/files/usr/local/bin/bootkube.sh.template`:
- Around line 208-213: Replace the echo-and-grep checks in the cvo_render_help
flag-selection block with Bash built-in substring matching against
cvo_render_help, preserving the existing CVO_RENDER_FLAGS additions for each
supported manifest-path option and eliminating the subshell.
- Around line 203-207: Update the cvo_render_help bootkube_podman_run invocation
to remove the hardcoded --name cvo-render-help option and the --volume
"$PWD:/assets:z" mount, leaving the release image digest and render --help
arguments unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ae0d5467-61a2-474a-8a01-d7bc74b34417
📒 Files selected for processing (1)
data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
| --volume "$PWD:/assets:z" \ | ||
| "${RELEASE_IMAGE_DIGEST}" \ | ||
| render --help 2>&1) || true | ||
| if echo "${cvo_render_help}" | grep -q -- --cluster-version-manifest-path; then |
There was a problem hiding this comment.
make this a function that takes args as the parameter
There was a problem hiding this comment.
Done. Extracted the flag detection into a cvo_render_optional_flag() helper function that takes the flag name and value as parameters. Also adopted bash built-in [[ == *...* ]] matching and removed the unnecessary --name/--volume from the --help probe.
AI-assisted response via Claude Code
953e62d to
2ffa208
Compare
The 4.22 installer's bootkube.sh unconditionally passes --cluster-version-manifest-path and --feature-gate-manifest-path to the CVO render command. When the release image contains an older CVO binary (e.g. 4.21) that does not recognize these flags, cvo-render crashes with "unknown flag", causing bootstrap failure. Probe the CVO render --help output to detect which optional flags the release image's CVO binary supports, and only pass flags that it recognizes. This prevents version-skew breakage when a newer installer bootstraps with an older CVO. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2ffa208 to
eb932a0
Compare
|
/close |
|
@enxebre: Closed this PR. DetailsIn response to this:
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. |
|
@jira-solve-bot: This pull request references Jira Issue OCPBUGS-99229. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state. DetailsIn response to this:
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. |
Description
The bootkube.sh bootstrap script unconditionally passes
--cluster-version-manifest-pathand--feature-gate-manifest-pathto the CVO render command. When a newer installer (e.g. 4.22) bootstraps with an older CVO binary (e.g. 4.21) that does not support these flags, the cvo-render container crashes with "unknown flag", causing bootstrap failure. This is a recurring version-skew pattern.Changes
render --helpoutput before invoking itJira
https://redhat.atlassian.net/browse/OCPBUGS-99229
Always review AI generated responses prior to use.
Generated with Claude Code via openshift-developer plugin
Summary by CodeRabbit
rendermanifest-path options are supported and passes only the compatible flags, reducing failures when certain optional flags aren’t available.