Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure NVMe Disks #3378

Open
wants to merge 2 commits into
base: testing-devel
Choose a base branch
from

Conversation

marmijo
Copy link
Member

@marmijo marmijo commented Feb 26, 2025

Add udev rules to support certain VM types (e.g. Standard_M16bds_v3, Standard_M16bs_v3, Standard_L8s_v4) that present managed disks as NVMe devices instead of traditional SCSI disks. This breaks LUN-based detection in the Azure Disk CSI driver, causing volume mount failures.

Add the azure provided udev rules[1] as an overlay and add the azure-vm-utils package to >=42.

[1]: https://github.com/Azure/azure-vm-utils/blob/6fb0ae1d047c0f06e19aab8f1e27e2cd588a6f9f/udev/80-azure-disk.rules

Add support for certain VM types (e.g. Standard_M16bds_v3,
Standard_L8s_v4) that present managed disks as NVMe devices
instead of traditional SCSI disks. This breaks LUN-based
detection in the Azure Disk CSI driver, causing volume mount
failures.

Include the Azure provided udev rules[1] in the 25azure-udev-rules
overlay.

[1]: https://github.com/Azure/azure-vm-utils/blob/6fb0ae1d047c0f06e19aab8f1e27e2cd588a6f9f/udev/80-azure-disk.rules
The `azure-vm-utils` package provides Azure disk udev rules that support
NVMe backed Azure Managed Disks. A few newer VM types
(e.g. Standard_M16bds_v3, Standard_L8s_v4) present managed disks as NVMe
devices instead of traditional SCSI disks.

The package is only available for F42, so conditionally add it for that
release version, while the needed udev rules are added in
overlay/25azure-udev-rules for <42
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this..

Were we able to reproduce the error case and verify adding the rules here fixes it?

@@ -14,4 +14,5 @@ depends() {
# called by dracut
install() {
inst_rules 68-azure-sriov-nm-unmanaged.rules
inst_rules 80-azure-disk.rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed in the >=42 case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not. Let's just drop the overlay altogether and just include the package (see comments on 80-azure-disk.rules)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given our proximity to F42 I think I'd be OK just not including this in <F42 as it makes things simpler.

I know we need to do this downstream for a period of time, but would prefer to just have the rules live in the overlay there and never live here.

alternatively, we could message the package maintainer to ask if they'd build the RPM for F41.

Copy link
Member Author

@marmijo marmijo Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me to just include this the package in >=42. I split out the overlay part into a separate commit in case we wanted to do that.
I agree that we can just keep the overlay downstream until it's no longer needed there.

alternatively, we could message the package maintainer to ask if they'd build the RPM for F41.

That'd be fine as well because it would be cleaner to just include the package unconditionally, but it doesn't seem like there's a immediate need for this functionality here so we could just do this in >=42.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to send an email to them? address should be able to be lifted from the git log in distgit for the RPM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@marmijo
Copy link
Member Author

marmijo commented Feb 26, 2025

Were we able to reproduce the error case and verify adding the rules here fixes it?

I wasn't able to reproduce the exact issue, but I think I can confirm this fixes it. The issue is related to the Azure Disk CSI Driver not being able to perform LUN-based disk discovery without these udev rules. see: kubernetes-sigs/azuredisk-csi-driver#2777

I was able to confirm that the udev rules properly map NVMe devices in /dev/disk/azure and also sets AZURE_DISK_TYPE and AZURE_DISK_LUN to their proper values. These values are not set without the udev rules.

[core@marmijo-Standard_M16bds_v3 ~]$ udevadm info /dev/nvme0n2
M: nvme0n2
...
... (output truncated)
...
E: AZURE_DISK_TYPE=data
E: AZURE_DISK_LUN=0

@dustymabe
Copy link
Member

I was able to confirm that the udev rules properly map NVMe devices in /dev/disk/azure and also sets AZURE_DISK_TYPE and AZURE_DISK_LUN to their proper values. These values are not set without the udev rules.

IOW we have enough to write a simple test for this?

@marmijo
Copy link
Member Author

marmijo commented Feb 26, 2025

IOW we have enough to write a simple test for this?

Looks like it! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants