dsccommunity / SqlServerDsc

This module contains DSC resources for deployment and configuration of Microsoft SQL Server.
MIT License
358 stars 224 forks source link

SqlSetup: Passes parameters with empty values which should not be passed for PrepareFailoverCluster #412

Open aultt opened 7 years ago

aultt commented 7 years ago

Details of the scenario you try and problem that is occurring: Prepare fails with the following error: (01) 2017-02-27 15:57:27 Slp: The credentials you provided for the SQL Server Agent service are invalid. To continue, provide a valid account and password for the SQL Server Agent service. (01) 2017-02-27 15:57:27 Slp: HResult : 0x851c0001

Looking through the Summary log you see list of parms passed: User Input Settings: ACTION: PrepareFailoverCluster AGTDOMAINGROUP: AGTSVCACCOUNT: AGTSVCPASSWORD: ASPROVIDERMSOLAP: 1 ASSVCACCOUNT: ASSVCPASSWORD: ASSVCSTARTUPTYPE: Automatic CONFIGURATIONFILE:
ENU: true FEATURES: SQLENGINE, REPLICATION, FULLTEXT, DQ FILESTREAMLEVEL: 0 FILESTREAMSHARENAME: FTSVCACCOUNT: NT Service\MSSQLFDLauncher FTSVCPASSWORD: HELP: false IACCEPTROPENLICENSETERMS: false IACCEPTSQLSERVERLICENSETERMS: true INDICATEPROGRESS: false INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\ INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\ INSTANCEDIR: C:\Program Files\Microsoft SQL Server\ INSTANCEID: MSSQLSERVER INSTANCENAME: MSSQLSERVER ISSVCACCOUNT: NT AUTHORITY\Network Service ISSVCPASSWORD: ISSVCSTARTUPTYPE: Automatic MRCACHEDIRECTORY:
PBDMSSVCACCOUNT: PBDMSSVCPASSWORD: PBDMSSVCSTARTUPTYPE: 0 PBENGSVCACCOUNT: PBENGSVCPASSWORD: PBENGSVCSTARTUPTYPE: 0 PBPORTRANGE: PBSCALEOUT: false PID: ***** QUIET: true QUIETSIMPLE: false RSINSTALLMODE: DefaultNativeMode RSSHPINSTALLMODE: DefaultSharePointMode RSSVCACCOUNT: RSSVCPASSWORD: RSSVCSTARTUPTYPE: Automatic SQLSVCACCOUNT: SQLSVCINSTANTFILEINIT: false SQLSVCPASSWORD: SUPPRESSPRIVACYSTATEMENTNOTICE: false UIMODE: Normal UpdateEnabled: true UpdateSource: MU USEMICROSOFTUPDATE: false X86: false

For prepare most of these are not required.

The DSC configuration that is using the resource (as detailed as possible): xSQLServerSetup "PrepareMSSQLSERVER" { DependsOn = @( "[WindowsFeature]NET-Framework-Core", "[WindowsFeature]Failover-Clustering" ) Action = "PrepareFailoverCluster" SourcePath = $Node.SourcePath SetupCredential = $Node.InstallerServiceAccount Features = $Node.Features InstanceName = $Node.InstanceName } Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running: Windows 2016, SQL Server 2016, 5.1 Version of the DSC module you're using, or 'dev' if you're using current dev branch: dev

johlju commented 7 years ago

Did you see this in the verbose log as well when you ran the configuration (if you ran the in push mode with verbose that is). Very strange that it passes empty parameters, I have not seen that behaviour when doing normal install. Is it during 'PrepareFailoverCluster' only you see this?

aultt commented 7 years ago

No I do not see this in the verbose output which was strange. It shows up in the SQL detail logs on the servers.

johlju commented 7 years ago

Okay, so in the verbose output you see that it passes the SQL Server Agent credentials? But setup.exe still fails? Could you post the verbose log so I can see how it looks like?

yardbirdsax commented 7 years ago

I don't know if it's related, but I'm seeing some really weird behavior like @johlju describes, where all the right arguments are being passed to the Win32 function that starts the process, but the process itself doesn't get all the arguments. It's like it's being truncated or something. I'm going to investigate tomorrow and if it is related I'll note it here.

yardbirdsax commented 7 years ago

Never mind, my problem was with some whacky characters in one of the passwords that got specified.

aultt commented 7 years ago

Verbose output shows exactly what it should No SQL Agent just the required parameters. Prepare doesn't take agent as a parm but looking through the SQL Error logs its being passed.

johlju commented 7 years ago

@aultt Please see comment https://github.com/PowerShell/xSQLServer/pull/421#issuecomment-284289354in PR #421 . Could you please verify that you are passing credentials for the required SQL Agent account? I can't see it in the configuration you provided.