Cluster: Fails if CNO and cluster name don't match #259
Labels
enhancement
The issue is an enhancement request.
help wanted
The issue is up for grabs for anyone in the community.
If a cluster exists with a cluster name different to the name of the cluster computer object this resource will fail to correctly process the configuration. For example if the cluster name is longer than 15 characters then the computer object will be a shortened version of the name.
This line enumerates clusters in Active Directory, so looks for the Computer Object name, rather than connecting direct to the cluster.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L337
This line then tries to connect directly to the cluster to list the cluster nodes, but this requires the clusters full name, not the name of the computer object.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L347
I'm not sure what the best fix is here?
Line 337 makes sense, as we want to check that there isn't an existing object in active directory, but then we aren't checking the connection to the cluster prior to asking for the nodes.
The text was updated successfully, but these errors were encountered: