[Compute] Add AvailabilityPolicy support for Managed Disks#29161
[Compute] Add AvailabilityPolicy support for Managed Disks#29161aimuhire wants to merge 7 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
Thank you for your contribution @aimuhire! We will review the pull request and get back to you soon. |
@microsoft-github-policy-service agree company="Microsoft" |
This agent will create a Powershell PR based on the issue described. It will write tests, make code changes and add changelog.
Co-authored-by: audreyttt <225061541+audreyttt@users.noreply.github.com>
… ActionOnDiskDelay parameter
cf08ffb to
96bd468
Compare
There was a problem hiding this comment.
Pull request overview
This PR exposes the Disk Availability Policy feature in the Az.Compute module by adding an -ActionOnDiskDelay parameter to disk config/update config cmdlets, wiring it through to the SDK model, and adding scenario coverage.
Changes:
- Added
-ActionOnDiskDelaytoNew-AzDiskConfigandNew-AzDiskUpdateConfigand mapped it toAvailabilityPolicy.ActionOnDiskDelay. - Extended PowerShell disk models to include
AvailabilityPolicyso the setting is round-tripped and observable. - Added a new scenario test for create/get/update flows and updated Compute changelog/help.
Reviewed changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Compute/Compute/help/New-AzDiskUpdateConfig.md | Documents the new -ActionOnDiskDelay parameter for disk update config. |
| src/Compute/Compute/help/New-AzDiskConfig.md | Documents the new -ActionOnDiskDelay parameter for disk config. |
| src/Compute/Compute/Generated/Models/PSDiskUpdate.cs | Adds AvailabilityPolicy to the disk update PS model for mapping/serialization. |
| src/Compute/Compute/Generated/Models/PSDisk.cs | Adds AvailabilityPolicy to the disk PS model so Get-AzDisk can surface it. |
| src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs | Introduces -ActionOnDiskDelay and sets AvailabilityPolicy on PSDiskUpdate. |
| src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs | Introduces -ActionOnDiskDelay and sets AvailabilityPolicy on PSDisk. |
| src/Compute/Compute/ChangeLog.md | Adds an Upcoming Release note for the new disk availability behavior support. |
| src/Compute/Compute.Test/ScenarioTests/DiskRPTests.ps1 | Adds a new scenario test function covering create/get/update with availability policy. |
| src/Compute/Compute.Test/ScenarioTests/DiskRPTests.cs | Wires the new PowerShell scenario test into the test runner. |
| src/Compute/Compute.Management.Sdk/Rest-api-specs/DiskRP.json | Updates AvailabilityPolicy descriptions (grammar). |
| src/Compute/Compute.Management.Sdk/Generated/Models/AvailabilityPolicy.cs | Updates XML docs (grammar) for ActionOnDiskDelay. |
Comments suppressed due to low confidence (1)
src/Compute/Compute/ChangeLog.md:30
- ChangeLog entries should reflect the user-facing PowerShell surface. Here the parameter name is written without the leading dash; please update to
-ActionOnDiskDelayfor consistency with other entries and cmdlet usage, and keep wording in past tense (for example, avoid 'Users can now …' phrasing if possible).
- Removed local swagger files and replaced references with remote swagger files.
* Added new cmdlets for Availability Set to Virtual Machine Scale Set (VMSS) Flex migration (Public Preview)
- `Convert-AzAvailabilitySet`: Converts an Availability Set to a new Flexible Virtual Machine Scale Set without downtime
- `Test-AzAvailabilitySetMigration`: Validates that VMs in an Availability Set can be migrated to a VMSS
src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs
Outdated
Show resolved
Hide resolved
src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs
Outdated
Show resolved
Hide resolved
src/Compute/Compute.Management.Sdk/Generated/Models/AvailabilityPolicy.cs
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
isra-fel
left a comment
There was a problem hiding this comment.
LGTM besides @audreyttt 's comment
|
This PR was labeled "needs-revision" because it has unresolved review comments or CI failures. |
src/Compute/Compute/ChangeLog.md
Outdated
| * Added support for Disk Availability Policy | ||
| - Added `ActionOnDiskDelay` parameter to `New-AzDiskConfig` cmdlet to configure disk availability behavior | ||
| - Added `ActionOnDiskDelay` parameter to `New-AzDiskUpdateConfig` cmdlet to update disk availability behavior | ||
| - Users can now specify how VMs handle disks with slow I/O using values 'None' or 'AutomaticReattach' |
There was a problem hiding this comment.
The new release note entry was added under the historical "## Version 11.0.0" section. Per this file’s header guidance, new user-facing changes should be placed under "## Upcoming Release" at the top. Also consider formatting the parameter as -ActionOnDiskDelay (with the leading dash) to match how users pass it on the command line.
There was a problem hiding this comment.
@audreyttt I moved this to Upcoming Release, let me know if it should stay under Version 11.0.0
There was a problem hiding this comment.
Yes it should go under upcoming release, thanks!
…riptions, fix test location, fix changelog
c6f67f8 to
22db800
Compare
| * Added support for Disk Availability Policy | ||
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskConfig` cmdlet to configure disk availability behavior | ||
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskUpdateConfig` cmdlet to update disk availability behavior |
There was a problem hiding this comment.
The new ChangeLog entry is a bit generic ("Added support for Disk Availability Policy") and doesn’t clearly describe the user-visible behavior/impact (what policy is being set and when it applies). Consider rewriting the top-level bullet to explicitly mention managed disks and that -ActionOnDiskDelay configures the disk’s availability behavior when the disk experiences slow I/O, keeping the wording user-focused per the ChangeLog header guidance.
| * Added support for Disk Availability Policy | |
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskConfig` cmdlet to configure disk availability behavior | |
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskUpdateConfig` cmdlet to update disk availability behavior | |
| * Added support for configuring managed disk availability behavior when disks experience slow I/O | |
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskConfig` cmdlet so users can choose how a managed disk should behave when it experiences slow I/O | |
| - Added `-ActionOnDiskDelay` parameter to `New-AzDiskUpdateConfig` cmdlet so users can update the slow I/O availability behavior of existing managed disks |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
Exposes Azure SDK's existing Disk Availability Policy feature through PowerShell cmdlets, enabling configuration of VM behavior when disks experience I/O degradation.
New Parameter:
-ActionOnDiskDelayparameter added toNew-AzDiskConfigandNew-AzDiskUpdateConfigNone,AutomaticReattachCmdlets Updated:
New-AzDiskConfigNew-AzDiskUpdateConfigUsage
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.