dsccommunity / FailoverClusterDsc

This module contains DSC resources for deployment and configuration of Windows Server Failover Cluster.
MIT License
60 stars 54 forks source link

Unable to run xCluster twice #180

Closed jonathaneckman closed 6 years ago

jonathaneckman commented 6 years ago

I am trying to create a new cluster on the first node. The node is an Azure VM. The first time the following is run, it works.

xCluster CreateCluster
{
    Name = "SqlFailoverCluster"  
    DomainAdministratorCredential = $DomainAdmin
    StaticIPAddress = "10.3.0.8"
}

The second time, it fails with

There was an error adding node 'SQL-VM-1' to the cluster The computer 'SQL-VM-1.contoso.local' is joined to a cluster.

I use a DSC pull server so this runs every 15 mins. Are my parameters incorrect?

jonathaneckman commented 6 years ago

Disregard. I figured this out but will leave the answer here for others.

My Cluster name was too long. The CNO of SqlFailoverCluster was SQLFAILOVERCLUS. This caused the error because SqlFailoverCluster was not found in the domain, but the machine was already joined to the SQLFAILOVERCLUS cluster.

johlju commented 6 years ago

@jonathaneckman Great that you solved it. It's NetBIOS limitation, for another reference see here https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/create-or-configure-an-availability-group-listener-sql-server?view=sql-server-2017#DNSnameReqs

Closing this as this was resolved by the contributor.