Skip to content

tests/platforms: add test for Azure NVMe udev rules #3519

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

Merged
merged 1 commit into from
May 30, 2025

Conversation

marmijo
Copy link
Member

@marmijo marmijo commented May 22, 2025

Introduce a new test which verifies that udev rules[1] for Azure Managed NVMe disks correctly create symlinks in /dev/disk/azure. It only runs on Azure and uses new kola functionality[2] to override the instance type, enabling the use of a Hyper-V Gen2 VM (Standard_M16bds_v3) with a UltraSSD_LRS (NVMe) data disk attached.

The test checks for the presence of expected symlinks:

  • /dev/disk/azure/os
  • /dev/disk/azure/data/by-lun/0

[1]: #3378
[2]: coreos/coreos-assembler#4109


Note: This test requires coreos/coreos-assembler#4109 to merge first, and also requires changes to the fedora-coreos-pipeline kola-azure job to handle building and resting this on gen2 images.

@marmijo marmijo force-pushed the add-azure-nvme-test branch from 15013d3 to ab01190 Compare May 22, 2025 15:33
marmijo added a commit to marmijo/fedora-coreos-pipeline that referenced this pull request May 22, 2025
Expand the job to build Hyper-V Gen2 gallery images and run kola tests
on both traditional managed images and new Gen2 gallery images[1]. The new
NVMe test[2] is explicitly denylisted from managed image testing since
since it requires Gen2 support. This will essentially allow all Azure
kola tests to be validated on both kinds of images.

A pipeline config variable, `test_gallery`, is introduced to the
Azure section to specify the gallery used to create Gen2 images.

[1]: coreos/coreos-assembler#4109
[2]: coreos/fedora-coreos-config#3519
@marmijo marmijo force-pushed the add-azure-nvme-test branch from ab01190 to 91c7f87 Compare May 27, 2025 19:11

# check symlinks for the os disk
azure_os_symlink="/dev/disk/azure/os"
if [ ! -e "$azure_os_symlink" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Any chance of these checks running early enough and racing with the thing that creates the symlinks (i.e. udev)?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's definitely a chance of a race. I'll update the test to wait for the symlink to exist before proceeding with the checks.

dustymabe
dustymabe previously approved these changes May 27, 2025
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.

LGTM


# check symlinks for the data disk
azure_data_symlink="/dev/disk/azure/data/by-lun/0"
if [ ! -e "$azure_data_symlink" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Instead of -e (existence) should we be checking to make sure it is actually a symlink (-h or -L)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! I think it makes sense to explicitly check that the path is a symlink (not just that it exists), and also verify that it points to a valid path. I realize I have those two mixed up here. I'll update the test to do both so we have full confidence the udev rules are working as expected.

marmijo added a commit to marmijo/fedora-coreos-pipeline that referenced this pull request May 29, 2025
Modify the job to build Hyper-V Gen2 gallery images and run kola tests
exclusively on those new images[1]. The new Azure NVMe test[2] requires
NVMe support, which is only available with Gen2 gallery images. Since
there are no constraints requiring Gen1 images, we simplify things
by testing only Gen2.

A pipeline config variable, `test_gallery`, is introduced to the
Azure section to specify the gallery used to create Gen2 images.

[1]: coreos/coreos-assembler#4109
[2]: coreos/fedora-coreos-config#3519
marmijo added a commit to marmijo/fedora-coreos-pipeline that referenced this pull request May 29, 2025
Modify the job to build Hyper-V Gen2 gallery images and run kola tests
exclusively on those new images[1]. The new Azure NVMe test[2] requires
NVMe support, which is only available with Gen2 gallery images. Since
there are no constraints requiring Gen1 images, we simplify things
by testing only Gen2.

A pipeline config variable, `test_gallery`, is introduced to the
Azure section to specify the gallery used to create Gen2 images.

[1]: coreos/coreos-assembler#4109
[2]: coreos/fedora-coreos-config#3519
@marmijo marmijo enabled auto-merge (rebase) May 29, 2025 20:25
marmijo added a commit to coreos/fedora-coreos-pipeline that referenced this pull request May 29, 2025
Modify the job to build Hyper-V Gen2 gallery images and run kola tests
exclusively on those new images[1]. The new Azure NVMe test[2] requires
NVMe support, which is only available with Gen2 gallery images. Since
there are no constraints requiring Gen1 images, we simplify things
by testing only Gen2.

A pipeline config variable, `test_gallery`, is introduced to the
Azure section to specify the gallery used to create Gen2 images.

[1]: coreos/coreos-assembler#4109
[2]: coreos/fedora-coreos-config#3519
Introduce a new test which verifies that udev rules[1] for Azure
Managed NVMe disks correctly create symlinks in `/dev/disk/azure`.
It only runs on Azure and uses new kola functionality[2] to override
the instance type, enabling the use of a Hyper-V Gen2 VM
(Standard_M16bds_v3) with a UltraSSD_LRS (NVMe) data disk attached.

The test checks for the presence of OS and data disk symlinks, and
that they point to a valid target.

[1]: coreos#3378
[2]: coreos/coreos-assembler#4109
@marmijo marmijo force-pushed the add-azure-nvme-test branch from 543ff1d to ac798ff Compare May 30, 2025 16:33
@marmijo marmijo merged commit c83903e into coreos:testing-devel May 30, 2025
3 checks passed
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