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

Support placement type for disks #3555

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sharsonia
Copy link
Collaborator

@sharsonia sharsonia commented Dec 13, 2024

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

@sharsonia sharsonia force-pushed the SupportPlacementTypeForDisks branch 7 times, most recently from c9f8370 to bf0c1bf Compare December 13, 2024 02:17
@sharsonia sharsonia force-pushed the SupportPlacementTypeForDisks branch 5 times, most recently from 245208c to a23371e Compare December 13, 2024 04:09
@squirrelsc
Copy link
Member

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

How is the placement type used for? If it's set in runbook only, it doesn't need to be in the feature level.

@@ -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:
Copy link
Member

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:
Copy link
Member

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.

Copy link
Collaborator Author

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.

Copy link
Member

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:
Copy link
Member

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?

@sharsonia sharsonia force-pushed the SupportPlacementTypeForDisks branch 5 times, most recently from 2b0aca1 to c11802f Compare December 16, 2024 21:56
@sharsonia sharsonia force-pushed the SupportPlacementTypeForDisks branch from c11802f to 084292f Compare December 16, 2024 22:03
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