test: pin node B ring0 at join and dump cluster status on the online check

The "2 nodes online" check has never passed — run 159 shows the identical
failure while the job reported success (swallowed Pester exit code), and
run 170's 60 s poll expires with node B still online=0. Node B reaches
corosync.conf (Get-PveClusterConfigNode passes) but never becomes a
corosync member, and the suite captures nothing about why.

Pass link0 explicitly so ring0 is the address the harness verified node B
answers on, rather than whatever node B resolves its own DHCP-assigned
.test.local hostname to. Dump quorate and each node's ring0/online/local
unconditionally so the next run distinguishes a wrong ring0 address from
a working address with no corosync transport.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
goodolclint-claude[bot]
2026-09-01 05:02:53 +00:00
committed by GitHub
parent f40324b948
commit e0960d9c18
@@ -169,10 +169,13 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' {
$joinPw = ConvertTo-SecureString $script:Password -AsPlainText -Force
try {
# ring0 defaults to whatever node B resolves its own hostname to;
# pin it to the address the harness verified it answers on.
$result = Add-PveClusterMember `
-Hostname $script:Host_ `
-Fingerprint $fingerprint `
-Password $joinPw `
-Links "link0=$($script:HostB)" `
-Wait `
-Confirm:$false `
-ErrorAction Stop
@@ -216,6 +219,12 @@ Describe 'Cluster Config & HA Lifecycle — Integration' -Tag 'Integration' {
Start-Sleep -Seconds 3
} while ([DateTime]::UtcNow -lt $deadline)
$cluster = @($status) | Where-Object { $_.Type -eq 'cluster' } | Select-Object -First 1
Write-Host "cluster: quorate=$($cluster.Quorate) nodes=$($cluster.Nodes); node B answers on $($script:HostB)"
foreach ($n in $nodeEntries) {
Write-Host " node=$($n.Name) nodeid=$($n.NodeId) ring0=$($n.Ip) online=$($n.Online) local=$($n.Local)"
}
@($nodeEntries).Count | Should -BeGreaterOrEqual 2
@($onlineNodes).Count | Should -BeGreaterOrEqual 2
}