Closed forensicsguy20012004 closed 7 years ago
In my current configuration when I execute: $ClusterNetworks = @(Get-WmiObject -Namespace root/mscluster -Class MSCluster_Network) .. I get two back because I have multi-subnets...the current foreach logic does not really take this into account.
@nabrond and @johlju I know you guys are working on PR 144...do you guys think you could take a look at this one? Since it deals with clustered instances and PR 144 deals with clustering. Thanks.
It is a different resource you have problem with than what is worked on in PR #144. It's up to @nabrond if he want to take it on in the same PR. But If I may guess, I think he wants to get his PR merged before doing additional changes to other resources. :)
I'm afraid that this bug need to be fixed in an seperate PR.
Ok, that is cool.
Like you mentioned in an earlier posting I do not have a lab with a multi-subnet, so I can't test any mods till I get to work. I am good with your decision. .just wanted to call it out.
On Oct 16, 2016 11:22 AM, "Johan Ljunggren" notifications@github.com wrote:
It is a different resource you have problem with than what is worked on in PR #144 https://github.com/PowerShell/xSQLServer/issues/144. It's up to @nabrond https://github.com/nabrond if he want to take it on in the same PR. But If I may guess, I think he wants to get his PR merged before doing additional changes to other resources. :)
I'm afraid that this bug need to be fixed in an seperate PR.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PowerShell/xSQLServer/issues/157#issuecomment-254053155, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCkZxBg-_YvGiET21LQDa0yJCi-OMwiks5q0kEkgaJpZM4KWDLj .
@forensicsguy20012004 I did have this resource on my list since it has some other issues with credentials and clustered disk detection. However, I would like to keep it separate from PR #144.
Yeah, that is totally cool with. Thank you, both of you.
Matt
On Oct 16, 2016 12:40 PM, "Brandon" notifications@github.com wrote:
@forensicsguy20012004 https://github.com/forensicsguy20012004 I did have this resource on my list since it has some other issues with credentials and clustered disk detection. However, I would like to keep it separate from PR #144 https://github.com/PowerShell/xSQLServer/issues/144.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PowerShell/xSQLServer/issues/157#issuecomment-254057813, or mute the thread https://github.com/notifications/unsubscribe-auth/AMCkZ5u25-8demEiPUg9_X_urgwPiw78ks5q0lNggaJpZM4KWDLj .
@kwirkykat thank you for labeling this as a "bug," I really appreciate it.
Does anyone on the MS side have the syntax for how the command line should look for a multi-subnet install? I am currently waiting for a multi-subnet clustered to be delivered to me..it could take a couple days or even till end of week. If I could see what that command line install looks like, I can start coding something up and help out...but I cannot do anything till I get an environment or an example.
Thanks....good work team.
@nabrond and @johlju .... hey guys...so I have been working on this. It took a fair amount of time...actually opened a support ticket with MS to get a good example. So I posted below what I did to get a working string. This is for resource [MSFT_xSQLServerFailoverClusterSetup] in function [Set-TargetResource]. Even though this creates a good string to send to setup.exe there are still problems. The StartWin32Process is beating this string and cutting it up at all the spaces. So that needs reworked as well and I have not started on that process yet. I would really like some help on. I got us this far but need help to take it to the finish line.
Let me know, matt
Discover which cluster network to use for this cluster group
$ClusterNetworks = @(Get-WmiObject -Namespace root/mscluster -Class MSCluster_Network) [system.string]$Data = $null; if([String]::IsNullOrEmpty($FailoverClusterIPAddress)) { $FailoverClusterIPAddresses = "IPv4;DHCP;" + $ClusterNetwork[0].Name } else {
$FailoverClusterIPAddressDecimal = ConvertDecimalIP -IPAddress $FailoverClusterIPAddress
foreach ($oneIP in $FailoverClusterIPAddress) { $FailoverClusterIPAddressDecimal = ConvertDecimalIP -IPAddress $oneIP foreach($ClusterNetwork in $ClusterNetworks) { $ClusterNetworkAddressDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.Address $ClusterNetworkAddressMaskDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.AddressMask if(($FailoverClusterIPAddressDecimal -band $ClusterNetworkAddressMaskDecimal) -eq ($ClusterNetworkAddressDecimal -band $ClusterNetworkAddressMaskDecimal)) { [system.string]$FailoverClusterIPAddressesCont = "IPv4;" + $oneIP + ";" + $ClusterNetwork.Name + ";" + $ClusterNetwork.AddressMask
$Data = [char]34 + $FailoverClusterIPAddressesCont + [char]34 + "," + $Data
$Data = $FailoverClusterIPAddressesCont + [char]34 + "" + [char]34 + $Data }; }; } } $FailoverClusterIPAddresses = $Data.Substring(0,$Data.Length-2);
Thanks for the research @forensicsguy20012004. I started working on this resource today for the WMI conversion task. I will look at incorporating this effort as well.
@nabrond .... you rock..below is what I have been able to get working for the setup.exe for the "CompleteFailoverCluster." I know it looks bad but if you copy/paste this out, you can format it as you see fit. I am glad you are re-working the WMI part...as I believe that is the other part to get this working. As I do more testing, I will update you so you can try and incorporate that into your rework.
thanks, matt
setup.exe /SkipRules="Cluster_VerifyForErrors" /Quiet="True" /IAcceptSQLServerLicenseTerms="True" /Action="CompleteFailoverCluster" /InstanceName="MSSQLSERVER" /FailoverClusterGroup="SQL Server (MSSQLSERVER)" /FailoverClusterNetworkName="APD000SQL" /FailoverClusterIPAddresses="IPv4;172.00.000.00;Cluster Network 1;255.255.255.0" "IPv4;10.00.000.00;Cluster Network 2;255.255.255.0" /InstallSQLDataDir="S:\Program Files\Microsoft SQL Server\SystemDbs" /SQLUserDBDir="U:\Program Files\Microsoft SQL Server\Data" /SQLUserDBLogDir="L:\Program Files\Microsoft SQL Server\Logs" /SQLTempDBDir="T:\TempDB" /SQLTempDBLogDir="T:\TempDB" /SQLBackupDir="V:\Program Files\Microsoft SQL Server\Backups" /SQLSysAdminAccounts="MYID" "Administrators" /CONFIRMIPDEPENDENCYCHANGE=1
@nabrond Was this issue fixed with the recent PR #326?
@johlju Yes, this is covered by #326.
@forensicsguy20012004 Try out the new cluster support in xSQLServerSetup. Let us now if there is any problems. Closing this issue now. We can reopen it if you have any further problems. Thanks!
The following bit of code in MSFT_xSQLServerFailoverClusterSetup does not work if the the cluster has multiple subnets.
# Discover which cluster network to use for this cluster group $ClusterNetworks = @(Get-WmiObject -Namespace root/mscluster -Class MSCluster_Network) if([String]::IsNullOrEmpty($FailoverClusterIPAddress)) { $FailoverClusterIPAddresses = "IPv4;DHCP;" + $ClusterNetwork[0].Name } else { $FailoverClusterIPAddressDecimal = ConvertDecimalIP -IPAddress $FailoverClusterIPAddress foreach($ClusterNetwork in $ClusterNetworks) { $ClusterNetworkAddressDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.Address $ClusterNetworkAddressMaskDecimal = ConvertDecimalIP -IPAddress $ClusterNetwork.AddressMask if(($FailoverClusterIPAddressDecimal -band $ClusterNetworkAddressMaskDecimal) -eq ($ClusterNetworkAddressDecimal -band $ClusterNetworkAddressMaskDecimal)) { $FailoverClusterIPAddresses = "IPv4;$FailoverClusterIPAddress;" + $ClusterNetwork.Name + ";" + $ClusterNetwork.AddressMask } } }