From e0960d9c18d63796ca23e142c4d34010c2335925 Mon Sep 17 00:00:00 2001 From: "goodolclint-claude[bot]" <323206664+goodolclint-claude[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 05:02:53 +0000 Subject: [PATCH] test: pin node B ring0 at join and dump cluster status on the online check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 b/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 index a14a26f..39338c9 100644 --- a/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 +++ b/tests/PSProxmoxVE.Tests/Integration/16_Cluster.Tests.ps1 @@ -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 }