You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -550,7 +550,7 @@ Function Test-SupportedMultiLBScenario {
550
550
# check that backend type is not 'empty', meaning there is no reason to use -multiLBConfig
551
551
log -Message "[Test-SupportedMultiLBScenario] Checking that backend type is not 'empty' for any of the multi load balancers"
552
552
If ($multiLBConfig.scenario.backendType-contains'Empty') {
553
-
log -ErrorAction Stop -Severity 'Error'-Message "[Test-SupportedMultiLBScenario] One or more Basic Load Balancers backend is empty, for which Load Balancers, there no reason to use -multiLBConfig. Use standalone migrations or remove the load balancer with the empty backend from the -multiLBConfig parameter"
553
+
log -ErrorAction Stop -Severity 'Error'-Message "[Test-SupportedMultiLBScenario] One or more Basic Load Balancers backend is empty. Empty load balancer should not be included in -multiLBConfig. Use standalone migrations or remove the load balancer with the empty backend from the -multiLBConfig parameter"
554
554
return
555
555
}
556
556
@@ -628,10 +628,10 @@ Function Test-SupportedMultiLBScenario {
628
628
$joinedNicIDs=$nicIDs-join','
629
629
630
630
$graphQuery=@"
631
-
Resources |
631
+
resources |
632
632
where type =~ 'microsoft.network/networkinterfaces' and id in~ ($joinedNicIDs) |
log -Message "[UpgradeVMPublicIP] Querying Resource Graph for PIPs associated with VMs in the backend pool(s)..."
644
+
log -Message "[UpgradeVMPublicIP] Querying Resource Graph for availability sets of VMs in load balancers backend pools"
645
645
}
646
646
Else {
647
647
log -Message "[UpgradeVMPublicIP] Waiting 15 seconds before querying ARG again (total wait time up to 15 minutes before failure)..."
@@ -657,11 +657,12 @@ Function Test-SupportedMultiLBScenario {
657
657
log -Severity Error -Message "[UpgradeVMPublicIP] Resource Graph query timed out before results were returned! The Resource Graph lags behind ARM by several minutes--if the resources to migrate were just created (as in a test), test the query from the log to determine if this was an ingestion lag or synax failure. Once the issue has been corrected follow the steps at https://aka.ms/basiclbupgradefailure to retry the migration."-terminateOnError
658
658
}
659
659
660
-
If (($VMAvailabilitySets|Sort-Object|Get-Unique).count -gt1) {
661
-
log -Severity Error -Message "[Test-SupportedMultiLBScenario] The provided Basic Load Balancers do not share backend pool members (VMs are in differnet Availability Sets). Using -multiLBConfig when backend is not shared adds risk and complexity in recovery."-terminateOnError
660
+
# VMs must share an availability set or the backend must be a single VM with no availability set ('NO_AVAILABILITY_SET')
661
+
If (($VMAvailabilitySets.availabilitySetId|Sort-Object|Get-Unique).count -gt1-or ($VMAvailabilitySets.availabilitySetId|Where-Object {$_-eq'NO_AVAILABILITY_SET'}).count -gt1) {
662
+
log -Severity Error -Message "[Test-SupportedMultiLBScenario] The provided Basic Load Balancers do not share backend pool members (VMs are in different or no Availability Sets: '$($VMAvailabilitySets.availabilitySetId-join',')'). Using -multiLBConfig when backend is not shared adds risk and complexity in recovery."-terminateOnError
662
663
}
663
664
Else {
664
-
log -Message "[Test-SupportedMultiLBScenario] The provided Basic Load Balancers share '$($groupedBackends.count)' backend pool members."
0 commit comments