OCPBUGS-59521: azure: fixes when setting DiskEncryptionSet on data disks - #10776
Conversation
…t on Azure The data disk encryption set code in provider() incorrectly accessed disk.ManagedDisk.SecurityProfile.DiskEncryptionSet, which panics when SecurityProfile is nil. The correct access path is disk.ManagedDisk.DiskEncryptionSet. This change also adds validation for an empty encryption set ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesAzure data disk encryption
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change prevents the Azure installer panic for data-disk encryption sets and rejects invalid empty encryption-set IDs, with focused tests covering the affected cases. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 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 |
|
[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 |
|
/assign |
|
/test e2e-azure-ovn |
|
/retitle OCPBUGS-59521: azure: fixes when setting DiskEncryptionSet on data disks |
|
@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-59521, 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. |
|
/test e2e-azure-ovn-multidisk-techpreview |
|
@redhat-chai-bot: The following test failed, say
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. |
Summary
Fixes a nil pointer dereference panic in
pkg/asset/machines/azure/machines.gowhen configuringdataDisks.managedDisk.diskEncryptionSeton Azure.Bug
OCPBUGS-59521
When a data disk is configured with a
DiskEncryptionSetbut without aSecurityProfile, the installer panics with a nil pointer dereference. The code incorrectly accessesdisk.ManagedDisk.SecurityProfile.DiskEncryptionSetinstead of using the correct pathdisk.ManagedDisk.DiskEncryptionSet.Changes
pkg/asset/machines/azure/machines.go:SecurityProfile.DiskEncryptionSetaccess with directdisk.ManagedDisk.DiskEncryptionSet.IDaccesspkg/asset/machines/azure/machines_test.go:TestProviderDataDiskEncryptionSetwith 4 table-driven subtests:Testing
All 24 tests in
pkg/asset/machines/azure/pass (20 existing + 4 new).This change is isolated from the bundle PR #9947 which addresses multiple bugs.
AI-generated. Review for accuracy.
@mtulio requested in Slack thread
Summary by CodeRabbit