Test-DbaDiskAlignment - Reach a failover cluster instance through its virtual name - #10614
Open
andreasjordan wants to merge 1 commit into
Open
Test-DbaDiskAlignment - Reach a failover cluster instance through its virtual name#10614andreasjordan wants to merge 1 commit into
andreasjordan wants to merge 1 commit into
Conversation
… virtual name The SQL check built instance names from the Win32_Service list of the node, but a failover cluster instance only listens on its virtual server name. Every connection attempt burned the full timeout and no disk ever qualified as a SQL disk, so the command took six minutes to return nothing. The virtual name is now read from the ClusterName value of the instance hive over the existing CIM session; stand-alone instances keep using the node name. (do Test-DbaDiskAlignment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Against a cluster node,
Test-DbaDiskAlignmenttook 366 seconds and returned nothing.The command discovers instances from the node''s
Win32_Servicelist and builds connection names as<node>/<node>\<instance>. A failover cluster instance only listens on its virtual server name, so on a node hosting FCIs everyConnect-DbaInstanceattempt burned the full connection timeout ("The system cannot find the file specified"), per instance and per disk — that is the six minutes. And because no connection ever succeeded, no disk qualified as a SQL disk, so the output was empty.What changed
For each discovered SQL service the command now reads the
ClusterNamevalue from the instance hive''sClusterregistry key (SOFTWARE\Microsoft\Microsoft SQL Server\<hive>\Cluster) viaStdRegProvover the CIM session it already holds — the key only exists for clustered instances. When present, the virtual server name is used as the connection name; otherwise the node name is used exactly as before.StdRegProvworks over both WSMan and the DCOM fallback, so the command''s transport requirements are unchanged.On the lab cluster node (hosting FCI01 as clustered default instance and FCI02\SQL2022): before, 366s and no output; after, 6 seconds and both cluster volumes correctly reported as SQL disks.
What deliberately did not change
Tests
The existing test file passes on both lab shapes: 3/3 against the default configuration (stand-alone SQL 2019) and 3/3 against the setC configuration (FCI01 as InstanceSingle, previously failing with an empty result). An FCI cannot be provisioned on any CI runner, so like the
Get-DbaWsfc*family this path gets its real-boundary coverage from lab runs; the stand-alone path stays covered by CI.Part of the setC findings (first full run with a clustered default instance), alongside #10605, #10606 and #10613.
🤖 Generated with Claude Code