Skip to content

Commit 7faeec9

Browse files
committed
Update Add-AdditionalNSXManagers
Update Add-AdditionalNSXManagers to poll for stable status Signed-off-by: Brian O'Connell <brian.oconnell@broadcom.com>
1 parent 24846e2 commit 7faeec9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

VMware.CloudFoundation.InstanceRecovery.psm1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5684,14 +5684,23 @@ Function Add-AdditionalNSXManagers {
56845684
$response = $stream.Read()
56855685

56865686
} Until ($response -like "*Join operation successful*")
5687-
Do {
5687+
<# Do {
56885688
Start-Sleep 10
56895689
$stream.writeline("get cluster status")
56905690
Start-Sleep 5
56915691
$response = $stream.Read()
56925692
56935693
} Until ($response -notlike "*DOWN*")
5694+
#>
5695+
Do {
5696+
<# Start-Sleep 10
5697+
$stream.writeline("get cluster status")
5698+
Start-Sleep 5
5699+
$response = $stream.Read() #>
5700+
LogMessage -type INFO -message "[$nsxManagerFQDN] Monitoring cluster rebuild status"
5701+
$response = ((curl -k -s -u "admin:$nsxManagerAdminPassword" "https://$nsxManagerFqdn/api/v1/cluster/status") | ConvertFrom-Json).mgmt_cluster_status.status
56945702

5703+
} Until ($response -eq "stable")
56955704
#Close SSH Session
56965705
Remove-SSHSession -SSHSession $sshSession | Out-Null
56975706
}

0 commit comments

Comments
 (0)