-
Notifications
You must be signed in to change notification settings - Fork 54
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: Add node to primary cluster that is located in another subnet #154
Comments
@mohamednazar You need to use xCluster resource on second node after the xWaitForCluster resource, Please see the example 2-JoinAdditionalNodeToFailoverCluster.ps1. |
@johlju as you suggested I have tried xWaitForCluster then xCluster on second node but getting same error. Code that I tried: dsc_resource 'join-cluster' do Error I am getting: 10.241.23.117 Compiling Cookbooks...←[0m Please help to resolve it.. Regards, |
This cluster your trying to configure, is it running in an on-premises Active Directory domarn, or in a cloud Active Directory domain? There are others having similar problems with adding a second node, so trying to figure out the scope. |
@johlju The cluster is running in AWS EC2 and Active Directory is in On-Premises. |
@johlju I have tried with xCluster after xWaitForCluster new set of servers and found secondary node successfully added to the cluster. But Primary node IP address only available due to that cluster went offline after I did move Core Cluster Services to "Best Possible Node" or "Select Node". Please find my code below. ` dsc_resource 'join-cluster' do Please find the screenshot below. How to get added secondary node IP address as well to cluster? so that I can move cluster resources to secondary node. When we do manually the IPs are adding fine. See the screenshot below (Yellow marked IP added) after that I added manually. Please help! |
@johlju or @kwirkykat or @mbreakey3 Waiting for your assistance. Anyone please help how to get added secondary node IP address to the cluster. Regads, |
@mohamednazar A cluster has only one or more IP address for the CNO. They are not different for each cluster node. Each node has at least one IP-address on the NIC, and the CNO has at least one IP-address on the same subnet as the IP-address on the NIC. For example: Node 1: 192.168.10.1 |
@mohamednazar If you have another NIC in you system, with a different subnet, then you can add an IP-address for that subnet to the CNO as well. Please let me know if I misunderstood your question, |
@johlju But it should be like below. for cluster and SQL always on as per AWS documentation , the both (Primary and Secondary) servers should have 2 additional IPs on default NIC. See the example below. Primary Server: Subnet A Secondary Server: Subnet B The secondary server cluster IP not adding to the cluster. Hope you clear my issue now. Regards, |
Okay, you are gonna stretch the cluster over two regions? I personally have not stretched a cluster over different subnets. :/ I have to read up on it to know if it is supported. I won’t have time for that in the near future. Maybe someone else in the community familiar with that setup can tell if the resources support it today, or if we in the community need to make changes to the resources. Do you have a link to the AWS documentation? |
I am going to setup cluster with two availability zone in single region. Please view the AWS documentation link http://docs.aws.amazon.com/quickstart/latest/sql/implementation.html#ip-addressing Regards, |
I am not able to join the second node to the cluster, I have 3 nodes 2 SQL nodes and a DC both the nodes are domain joined, and are in an availability set, I was able to create a cluster on Node1 But was not successful in joining the node, I am using Automation Account and both the nodes and the DC are in Azure. |
@dead8171 on secondary nodes use xWaitForCluster resource then use xCluster.. Check whether all cluster related ports are not blocked.. |
@johlju any update on adding secondary node IP address on cluster core services? |
@mohamednazar I did a quick google search yesterday, but haven't been able to read any, nor the AWS link you provided. Long days at the normal day job. The |
@johlju I think I need to use xClusterNetwork resource to add secondary node IP & Netmask to the cluster.. Correct me if I am wrong. If its correct should I want to apply the script on PrimaryReplica or SecondaryReplica?
Regards, |
Yes seems to be same issue. Let me try xClusterNetwork properties... |
I have executed following xClusterNetwork script on secondaryreplica server and getting error. Script: dsc_resource 'dsc_clus_net_secondary' do Error: [2017-11-27T03:59:12+00:00] INFO: Processing dsc_resource[dsc_clus_net_secondary] action run (SqlServer::dsc_clus_net_secondary line 7) exists and can be set.
You cannot call a method on a null-valued expression.
The property 'Role' cannot be found on this object. Verify that the property exists and can be set.
You cannot call a method on a null-valued expression.
The property 'Metric' cannot be found on this object. Verify that the property exists and can be set.
You cannot call a method on a null-valued expression.
The PowerShell DSC resource '[xClusterNetwork]DirectResourceAccess' with SourceInfo '' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
ager:String) [], CimException
Please let me know should I want to change any property value or should I want to execute the above script on primaryreplica server? Regards, |
@johlju or @kwirkykat or @mbreakey3 Waiting for your assistance. Regards, |
@mohamednazar xClusterNetwork only changes properties on existing networks. It does not have logic to add networks, nor can it have that kind of logic (as mentioned in issue #92). The xClusterNetwork can only change the properties Name, Role and Metric. |
Any update on this, have same issue with cluster across AWS subnets. |
I've been working on setting up a multi-subnet cluster where each node only has one subnet so I have some information to add to the discussion.
The way I envision you'd get this going is adding logic to xCluster so that when it's doing an Add-ClusterNode it will do more with the StaticIPAddress.
It looks like this:
Maybe this could be controlled through an additional flag so that it doesn't break any existing code that might have dummy StaticIPAddress passed in for nodes. |
Has anyone solved this? @mohamednazar @johlju |
I used xWaitForCluster resource on secondary node after that it resolved my problem. On Primary and Secondary I assigned one additional IP (Secondary IP) 1st I created cluster on Primary, after that secondary was able to add to cluster using xWaitForCluster resource. Thanks |
@mohamednazar thank you. curious were you doing this for a sql always on cluster? im having a similar issue with multiple subnets on the slq ag listener |
Just get all the replicas up and added to the AG before you create the listener. See https://github.com/codykonior/OftenOn/blob/master/OftenOn/Configuration/OftenOn.ps1 for one way to do it. |
@mohamednazar any chance you can post a sample. im still struggling with this. |
I have the same problem, I am using 1-Cluster_CreateFirstNodeOfAFailoverClusterConfig.ps1 for creating my cluster in node1, and later I am using 2-Cluster_JoinAdditionalNodeToFailoverClusterConfig.ps1 for join in the cluster my second node. But this not work. Reviewing the comments @mohamednazar I am trying again in my second node with: 1-WaitForCluster_WaitForFailoverClusterToBePresentConfig.ps1 but the error is the same. Check the spelling of the cluster name. Otherwise, there might be a problem with your network. Make sure the cluster nodes are turned on and connected to the network or contact your network administrator.
+ CategoryInfo : ConnectionError: (:) [], CimException
+ FullyQualifiedErrorId : ClusterRpcConnection,Microsoft.FailoverClusters.PowerShell.AddClusterNodeCommand
+ PSComputerName : sqlfsx2
VERBOSE: [SQLFSX2]: [[Cluster]JoinSecondNodeToCluster] Added node SQLFSX2 to cluster cluster.
VERBOSE: [SQLFSX2]: LCM: [ End Set ] [[Cluster]JoinSecondNodeToCluster] in 31.1600 seconds.
The PowerShell DSC resource '[Cluster]JoinSecondNodeToCluster' with SourceInfo 'C:\Users\Administrator\Documents\WaitForCluster_WaitForFailoverClusterToBePresentConfig.ps1::87::9::Cluster' threw one or more non-terminating errors while running the
Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : NonTerminatingErrorFromProvider
+ PSComputerName : sqlfsx2
VERBOSE: [SQLFSX2]: LCM: [ End Set ]
The SendConfigurationApply function did not succeed.
+ CategoryInfo : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 1
+ PSComputerName : sqlfsx2 My scenario is the following in AWS: AD: corp.local Any comment is good! |
How to add secondary node to a existing running cluster which is created using xCluster DSC Resource.. I am using xWaitForCluster resource to add secondary node, but its not adding. Please see the below DSC resource code that I tried.
dsc_resource 'test-cluster' do resource :xWaitForCluster module_name 'xFailOverCluster' module_version '1.1' property :name, 'TestCluster1' property :RetryIntervalSec, 30 property :RetryCount, 100 end
So I tried using following code as well but nothing worked.
dsc_resource 'test-cluster' do resource :xCluster module_name 'xFailOverCluster' module_version '1.1' property :name, 'TestCluster1' property :staticipaddress, '10.0.0.3' property :domainadministratorcredential, ps_credential('mydomainname\\mydomainusername', mydomainpassword') end
Your help is much appreciated.
xCluster and xWaitForCluster DSC resource.
Windows 2012 R2 and PowerShell 5.x is running on target machine.
xFailOverCluster version is 1.1
The text was updated successfully, but these errors were encountered: