-
Notifications
You must be signed in to change notification settings - Fork 180
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. |
@@ -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?
c11802f
to
084292f
Compare
084292f
to
92ec624
Compare
92ec624
to
69d2a8b
Compare
@@ -0,0 +1,881 @@ | |||
{ |
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.
Remove this file.
@@ -1475,6 +1509,34 @@ def _call_requirement_method( | |||
schema.disk_controller_type_priority, | |||
) | |||
|
|||
# refer | |||
# https://learn.microsoft.com/en-us/powershell/module/az.compute/set-azvmssstorageprofile?view=azps-13.0.0 # noqa: E501 |
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's good to have the urls, please summarize to avoid people must visit links to know details. In case the links are expired, nothing can help understand it.
capability.disk | ||
).ephemeral_disk_placement_type, | ||
DiskPlacementType, | ||
) |
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.
follow other isinstance
assertions to print actual types, in case it fails.
@@ -2754,6 +2796,14 @@ def _set_disk_features( | |||
isinstance(node_space.disk.os_disk_type, search_space.SetSpace) | |||
and node_space.disk.os_disk_type.isunique(schema.DiskType.Ephemeral) | |||
): | |||
node_space.disk = features.AzureDiskOptionSettings(node_space.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.
Why create a new disk setting here?
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, DiskPlacementType setting and supported values are added to the AzureDiskOptionSettings.
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