Bas Roovers
Bas Roovers Author of onpremisys and working in IT for over 10 years. Loves good discussions and new technologies.

Rejoin quarantined fail-over cluster nodes

Rejoin quarantined fail-over cluster nodes

If you ever encounter a flapping fail-over cluster you might end up with one or more quarantined cluster nodes.

Quarantined nodes are drained from their roles and are not allowed to rejoin the cluster for a set amount. You can find out the duration and threshold using this command:

Get-Cluster | Format-List -Property Quarantine*

In practise though, you might find your fail-over cluster with quarantined nodes outside of these boundaries.

Fail-over cluster green quarantined node

You can use the following Powershell script to find quarantined nodes and rejoin them.

Write-Host "Find quarantined nodes: " -NoNewline
$QuarantinedClusterNodes = Get-ClusterNode | Where-Object StatusInformation -eq Quarantined

if($QuarantinedClusterNodes){
    Write-Host $QuarantinedClusterNodes.count
    foreach($QuarantinedClusterNode in $QuarantinedClusterNodes){
        Write-Host "@($QuarantinedClusterNode.Name)"
        Write-Host "Stopping cluster node: " -NoNewline
        $QuarantinedClusterNode | Stop-ClusterNode
        Write-Host "V"
        Write-Host "Clear quarantine and start cluster node" -NoNewline
        $QuarantinedClusterNode | Start-ClusterNode -ClearQuarantine
        Write-Host "V"
    }
} else {
    Write-Host "No quarantined nodes found"
}

comments powered by Disqus