-
Notifications
You must be signed in to change notification settings - Fork 179
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
Support placement type for disks #3555
base: main
Are you sure you want to change the base?
Conversation
c9f8370
to
bf0c1bf
Compare
245208c
to
a23371e
Compare
How is the placement type used for? If it's set in runbook only, it doesn't need to be in the feature level. |
lisa/features/disks.py
Outdated
@@ -54,6 +54,9 @@ def get_all_disks(self) -> List[str]: | |||
def get_hardware_disk_controller_type(self) -> schema.DiskControllerType: | |||
raise NotImplementedError | |||
|
|||
def get_ephemeral_disk_placement_type(self) -> schema.EphemeralDiskPlacementType: |
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.
It looks an Azure only feature, please add it in the inherited Azure disk feature.
@@ -1665,6 +1691,11 @@ def get_hardware_disk_controller_type(self) -> Any: | |||
vm = get_vm(azure_platform, self._node) | |||
return vm.storage_profile.disk_controller_type | |||
|
|||
def get_ephemeral_disk_placement_type(self) -> Any: |
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.
The method name is not accurate, it should mention it's for os disk.
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.
The method name is not accurate, it should mention it's for os disk.
Hmm actually in Azure, it looks like disk placement is configured only for Ephemeral disk type.
See here - https://learn.microsoft.com/en-us/powershell/module/az.compute/set-azvmssstorageprofile?view=azps-13.0.0
But if you think, the functional name should be generic, I can change it. let me know your preference after reading through above link.
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.
But the L1697 called for os_disk
.
vm.storage_profile.**os_disk**.diff_disk_settings.placement
node_space.disk.os_disk_type.add(schema.DiskType.Ephemeral) | ||
node_space.disk.os_disk_size = cached_disk_bytes_gb | ||
nvme_disk_bytes = azure_raw_capabilities.get("NvmeDiskSizeInMiB", 0) | ||
if nvme_disk_bytes: |
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.
Why the original if cached_disk_bytes_gb >= 30:
is removed?
2b0aca1
to
c11802f
Compare
c11802f
to
084292f
Compare
Currently, Ephemeral OS Disk placement value is hardcoded in LISA. This PR enables LISA to fetch the Ephemeral OS disk placement type value from the SKU capability in Azure VMs.
To allow this, EphemeralDiskPlacementType setting and supported values are added to the DiskOptionSettings in the schema.
LISA user can also pass the EphemeralDiskPlacementType from Runbook to deploy VM with specific supported placement type value.
For Ephemeral OS Disk placement types available, refer
https://learn.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks-faq