MGMT-24571: Fix initrd PPI reboot loop by comparing correct image URL#10456
Conversation
When a PreprovisioningImage uses InitRD format, the image-updated check was always comparing the current ImageUrl against ISODownloadURL instead of the InitrdURL. This caused the BMH to be rebooted on every reconcile even when the initrd image had not changed. Extract getExpectedImageURL to select the correct URL (ISO or initrd) based on the PPI's AcceptFormats, and use it in the imageUpdated check. Resolves https://redhat.atlassian.net/browse/MGMT-24571 Assisted-by: Claude Code <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR modifies the ChangesFormat-aware PreprovisioningImage URL comparison
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@carbonin: This pull request references MGMT-24571 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 bug to target the "5.0.0" version, but no target version was set. 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, CrystalChun The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
With @carbonin's designer image, and without the |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10456 +/- ##
==========================================
+ Coverage 44.34% 44.36% +0.01%
==========================================
Files 420 420
Lines 73064 73107 +43
==========================================
+ Hits 32399 32432 +33
- Misses 37731 37741 +10
Partials 2934 2934
🚀 New features to boost your workflow:
|
|
/override ci/prow/edge-e2e-ai-operator-disconnected-capi ci/prow/edge-e2e-ai-operator-ztp-capi |
|
@CrystalChun: Overrode contexts on behalf of CrystalChun: ci/prow/edge-e2e-ai-operator-disconnected-capi, ci/prow/edge-e2e-ai-operator-ztp-capi 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. |
|
@carbonin: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
/cherry-pick release-ocm-2.17 |
|
/cherry-pick release-ocm-2.16 |
|
@carbonin: new pull request created: #10473 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. |
|
@carbonin: new pull request created: #10474 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. |
|
/cherry-pick release-ocm-2.15 |
|
/cherry-pick release-ocm-2.14 |
|
@carbonin: new pull request created: #10505 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. |
When a PreprovisioningImage uses InitRD format, the image-updated check was always comparing the current ImageUrl against ISODownloadURL instead of the InitrdURL. This caused the BMH to be rebooted on every reconcile even when the initrd image had not changed.
Extract getExpectedImageURL to select the correct URL (ISO or initrd) based on the PPI's AcceptFormats, and use it in the imageUpdated check.
Assisted-by: Claude Code noreply@anthropic.com
List all the issues related to this PR
Resolves https://redhat.atlassian.net/browse/MGMT-24571
What environments does this code impact?
How was this code tested?
@minmzzhang is testing. Will hold until she signs off on it.
Checklist
docs, README, etc)Reviewers Checklist
Summary by CodeRabbit
Bug Fixes
Tests