-
Notifications
You must be signed in to change notification settings - Fork 179
mantle/platform/azure: Add support for Azure Shared Image Gallery (SIG) and other enhancements #4109
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
Conversation
b76e3db
to
8c1c513
Compare
8c1c513
to
18626cb
Compare
Introduce a new test 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]: coreos#3378 [2]: coreos/coreos-assembler#4109
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]: coreos#3378 [2]: coreos/coreos-assembler#4109
18626cb
to
9131ca7
Compare
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
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]: coreos#3378 [2]: coreos/coreos-assembler#4109
/retest rhcos |
@marmijo: The
Use In 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 rhcos |
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
9131ca7
to
a5edc64
Compare
} | ||
|
||
// Create a Gallery Image Version | ||
versionName := "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely will want to update this when we start publishing images for other people to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit tricky. Azure only allows version names to match MajorVersion.MinorVersion.Patch
, so our naming convention for FCOS wont be valid because we have four numeric segments instead of three. We'll need to discuss how we want to structure our image galleries to preserve the whole version name elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can discuss this over in coreos/fedora-coreos-tracker#148 (comment)
We can mutate our version slightly to fit this mold if we must, but let's see how that conversation goes too.
versionPager := a.galImgVerClient.NewListByGalleryImagePager(resourceGroup, galleryName, imageName, nil) | ||
for versionPager.More() { | ||
versionPage, err := versionPager.NextPage(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we'll definitely want to be able to delete a specific version of an image from an image gallery.
i.e. we'd call ore
from cosa coreos-prune
code to delete old versions of CoreOS we don't want to keep around any longer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my other comment about the naming of image versions. We can add this to that discussion as well.
a5edc64
to
839442c
Compare
Add support for attaching additional data disks to instances created in Azure. Disks are defined through the machines options as the Size in GB and the 'sku', or storage type, e.g. '["100G:sku=UltraSSD_LRS"]' for NVMe disks.
Add a new flag to allow specifying the Hyper-V generation (V1 or V2) when creating Azure images. This enables support for both Gen1 and Gen2 image creation.
89c9f8b
to
702cf8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add a new `create-gallery-image` ore command to Support creating images within Azure Shared Image Galleries (Gallery Images). The command creates image definitions and versions in Azure Shared Image Galleries. Gallery images can be created from either a blob URL or an existing managed image. A `--azure-publisher` flag is added to assign a publisher to the gallery image. `delete-gallery-image` is also added to delete individual gallery images or an entire Shared Image Gallery.
Add an `InstanceType` field to `PlatformOptions` to allow external tests to override the instance type used in `kola run`. This is useful for cases where a specific test needs to run on a different (potentially more expensive) instance type. Support for this is currently limited to the Azure Platform. Also, fix the `MultiPathDisk` check for the qemu-iso platform. The check is now correctly performed in the `NewMachineWithOptions` function, since `MultiPathDisk` is part of `platform.MachineOptions`.
Remove the option to specify the Hyper-V Generation during image creation and when running instances through kola. Instead, only build traditional and gallery images using Hyper-V Gen2.
702cf8a
to
ecc8569
Compare
I made one last force push (hopefully) to also delete the azure managed image when calling |
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
Feel free to merge whenever (or enable auto-merge). |
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
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
The default size of Standard_D2_v2 does not support Hyper-V Gen2 VMs. Now that we are only producing Gen2[1], update the default to Standard_D2_v3, which does support Gen2 VMs. [1]: coreos#4109
The default size of Standard_D2_v2 does not support Hyper-V Gen2 VMs. Now that we are only producing Gen2[1], update the default to Standard_D2_v3, which does support Gen2 VMs. [1]: #4109
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]: #3378 [2]: coreos/coreos-assembler#4109
This PR introduces support for building and running Azure Shared Image Gallery (SIG) images, also known as "gallery images", alongside traditional managed images.
Both image types can now be used with either Hyper-V Generation 1 or Generation 2.Both images types now default to using Hyper-V Generation 2.Additional enhancements include:
Support for overriding the instance type per kola test via external test configuration (useful for tests requiring specific VM sizes).
Ability to attach additional data disks to Azure instances, as specified in kola tests.
This enables testing the Azure disk udev rules that were added in coreos/fedora-coreos-config#3378, as NVMe support is only available on Gen2 Gallery Images.
See: https://issues.redhat.com/browse/COS-3125
EDIT: a commit was added to remove the option to set the Hyper-V generation. All images will now default to Gen2.