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 |
|
/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 |
|
/test e2e-azure-ovn-multidisk-techpreview |
|
/test e2e-azure-ovn |
|
/jira refresh |
|
@mfbonfigli: This pull request references Jira Issue OCPBUGS-59521, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: jinyunma. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
|
/assign mfbonfigli |
|
/test e2e-azure-ovn-multidisk-techpreview |
|
/test e2e-azure-ovn |
1 similar comment
|
/test e2e-azure-ovn |
|
/test e2e-azure-ovn-multidisk-techpreview |
|
Regular azure jobs are passing (e2e-azure-ovn, azure-private). Azure TPNU job failed (e2e-azure-ovn-multidisk-techpreview) for unrelated reason (transient e2e test). Considering it is installed as expected, and this job is not exercising the disk encryption, I will trigger it just for visibility as data disk on azure is available only in TPNU. /test e2e-azure-ovn-multidisk-techpreview |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
/pipeline required |
|
Scheduling tests matching the |
|
/override-sticky ci/prow/e2e-aws-ovn Unrelated to AWS platform. |
tthvo
left a comment
There was a problem hiding this comment.
/approve
One suggestion for a follow-up PR is that we can validate the empty encryption set ID earlier in the static validation :D
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tthvo 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 |
|
@tthvo: Overrode contexts on behalf of tthvo: ci/prow/e2e-aws-ovn These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use 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. |
|
/test e2e-azure-ovn |
1 similar comment
|
/test e2e-azure-ovn |
|
/lgtm |
1 similar comment
|
/lgtm |
|
/test e2e-azure-ovn |
1 similar comment
|
/test e2e-azure-ovn |
|
@redhat-chai-bot: The following tests 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. |
|
/test e2e-azure-ovn |
|
/verified by CI jobs |
|
@mfbonfigli: This PR has been marked as verified by 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. |
c8d2999
into
openshift:main
|
@redhat-chai-bot: Jira Issue OCPBUGS-59521: Some pull requests linked via external trackers have merged: The following pull request, linked via external tracker, has not merged:
All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with Jira Issue OCPBUGS-59521 has not been moved to the MODIFIED state. This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload. 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. |
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