Fix nvme instance storage discovery#407
Draft
Ivaylogi98 wants to merge 11 commits intocloudfoundry:fix-nvme-instance-storage-discoveryfrom
Draft
Fix nvme instance storage discovery#407Ivaylogi98 wants to merge 11 commits intocloudfoundry:fix-nvme-instance-storage-discoveryfrom
Ivaylogi98 wants to merge 11 commits intocloudfoundry:fix-nvme-instance-storage-discoveryfrom
Conversation
957b389 to
6087318
Compare
e7d00b4 to
dcd857a
Compare
6087318 to
b79e5c1
Compare
b79e5c1 to
6ab6cd7
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor NVMe instance storage discovery to be IaaS-agnostic
Refactors #396 to address review feedback from @rkoster.
What changed from #396
IaaS-agnostic design — the AWS-specific awsNVMeInstanceStorageResolver and its hardcoded EBS pattern are replaced by a generic SymlinkDeviceResolver in infrastructure/devicepathresolver. The managed volume
pattern (/dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_) and device pattern (/dev/nvmen1) are passed in entirely via agent config (InstanceStorageManagedVolumePattern, InstanceStorageDevicePattern), set by
the stemcell builder's bosh_aws_agent_settings stage — not hardcoded in the resolver.
udev race condition fixed — the original PR globbed /dev/disk/by-id/ symlinks without waiting for udev to finish creating them. On fast boots, this returned 0 EBS symlinks, causing all NVMe devices (including
the root EBS volume) to be misidentified as instance storage. udevadm trigger + udevadm settle are now called before globbing.
Unit tests fixed — all compilation errors and test failures from #396 are resolved.
Algorithm
Verified using m6id.large
Enabled
raw_instance_storage: true3 NVMe devices present:
Used Claude Code