Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster: Fails if CNO and cluster name don't match #259

Open
jrdbarnes opened this issue Jun 24, 2021 · 2 comments
Open

Cluster: Fails if CNO and cluster name don't match #259

jrdbarnes opened this issue Jun 24, 2021 · 2 comments
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@jrdbarnes
Copy link
Contributor

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.

@stale
Copy link

stale bot commented Jul 24, 2021

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Jul 24, 2021
@johlju
Copy link
Member

johlju commented Jul 27, 2021

Maybe line 347 should be changed to the following to make use of line 337 that already got the cluster?

$allNodes = $cluster | Get-ClusterNode

@stale stale bot removed the stale The issue or pull request was marked as stale because there hasn't been activity from the community. label Jul 27, 2021
@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Jul 27, 2021
@johlju johlju changed the title xCluster fails if CNO and cluster name don't match xCluster: Fails if CNO and cluster name don't match Jul 27, 2021
@johlju johlju changed the title xCluster: Fails if CNO and cluster name don't match Cluster: Fails if CNO and cluster name don't match Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants