|
|
|
@ -11,12 +11,12 @@ $offlineAddressList = $failoverAddressList | Where-Object active_server_ip -noti
|
|
|
|
|
$maximumAddressCount = [Math]::Ceiling($failoverAddressList.Count / $onlineNodeList.Count)
|
|
|
|
|
|
|
|
|
|
$i = 0
|
|
|
|
|
$addressGroupList = $failoverAddressList `
|
|
|
|
|
$addressGroupList = $failoverAddressList+($onlineNodeList.Status.Addr | ForEach-Object {@{active_server_ip=$_}}) `
|
|
|
|
|
| Where-Object active_server_ip -in $onlineNodeList.Status.Addr `
|
|
|
|
|
| Group-Object active_server_ip `
|
|
|
|
|
| Sort-Object Count
|
|
|
|
|
$distributionTarget = :distribution foreach ($addressGroup in $addressGroupList) {
|
|
|
|
|
$currentAddressCount = $addressGroup.Count
|
|
|
|
|
$currentAddressCount = $addressGroup.Count - 1
|
|
|
|
|
|
|
|
|
|
while ($currentAddressCount -lt $maximumAddressCount) {
|
|
|
|
|
if (!$offlineAddressList[$i]) {
|
|
|
|
|