dsccommunity / dsccommunity/SqlServerDsc

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

Open
#412 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the xSQLServerSetup resource handling Action = "PrepareFailoverCluster" and inspect how setup parameters are assembled from the DSC configuration. The change is complete when optional parameters with empty values are omitted for prepare operations and the provided PrepareMSSQLSERVER configuration no longer passes those empty service credentials.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, sql
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.