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

[Compute] Removing Exceptions for Vmss SinglePlacementGroup when in OrchestrationMode #18698

Merged
merged 1 commit into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Compute/Compute/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- `New-AzDiskEncryptionSetConfig`
- `Update-AzDiskEncryptionSet`
* Added `-TreatFailureAsDeploymentFailure` to cmdlets `Add-AzVmGalleryApplication` and `Add-AzVmssGalleryApplication`
* Removed Exceptions for when SinglePlacementGroup is set to true in 'OrchestrationMode'

## Version 4.27.0
* Edited `New-AzVm` cmdlet internal logic to use the `PlatformFaultDomain` value in the `PSVirtualMachine` object passed to it in the new virtual machine.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,10 @@ private void checkFlexibleOrchestrationModeParamsDefaultParamSet(VirtualMachineS
//{
// throw new Exception("The value for NetworkApiVersion is not valid for a VMSS with OrchestrationMode set to Flexible. You must use a valid Network API Version equal to or greater than " + vmssFlexibleOrchestrationModeNetworkAPIVersionMinimum);
//}
else if (parameters?.SinglePlacementGroup == true)
{
throw new Exception("The value provided for SinglePlacementGroup cannot be used for a VMSS with OrchestrationMode set to Flexible. Please use SinglePlacementGroup 'false' instead.");
}
}

private void flexibleOrchestrationModeDefaultParameters(VirtualMachineScaleSet parameters)
{
if (parameters?.SinglePlacementGroup == null)
{
parameters.SinglePlacementGroup = false;
}
if (parameters?.VirtualMachineProfile?.NetworkProfile != null &&
parameters?.VirtualMachineProfile?.NetworkProfile.NetworkApiVersion == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,6 @@ private void checkFlexibleOrchestrationModeParams()
{
throw new Exception("UpgradePolicy is not currently supported for a VMSS with OrchestrationMode set to Flexible.");
}
else if (_cmdlet.SinglePlacementGroup == true)
{
throw new Exception("The value provided for singlePlacementGroup cannot be used for a VMSS with OrchestrationMode set to Flexible. Please use SinglePlacementGroup 'false' instead.");
}
}
}

Expand Down