dsccommunity / SqlServerDsc

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

SqlSetup: Throws and obscure error message when installing Reporting Services without service account #226

Open johlju opened 7 years ago

johlju commented 7 years ago

Details of the scenario you try and problem that is occurring: When installing a standalone Reporting Service and not providing a service account for Reporting Service service the setup throws and error that is hard to understand why it failed. Looking at the Bootstrap log you will see that it needs an account. This could have been tested in the resource so that an error message can be thrown before starting the setup.

The DSC configuration that is using the resource (as detailed as possible):

xSQLServerSetup InstallSql2008R2Instance
{
    InstanceName = '2008R2'
    Features = 'RS'
    #RSSvcAccount = $SqlServiceCredential

    SetupCredential = $SqlInstallCredential

    SourcePath = $Node.SourcePath
    SourceFolder = $Node.SourceFolderSql2008R2
    SourceCredential = $SqlInstallCredential

    SuppressReboot = $False
    ForceReboot = $False

    DependsOn = '[WindowsFeature]NetFramework35','[WindowsFeature]NetFramework45'
}

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running: OS: Windows Server 2012 R2 SQL Server: 2008 R2 PS: 5.0

Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev

johlju commented 7 years ago

Note: This is only SQL Server 2008 R2 Reporting Services that has this issue.

The error message that LCM is throwing

PowerShell DSC resource MSFT_xSQLServerSetup  failed to execute Set-TargetResource functionality with error message: Test-TargetResource returned false after calling set. 
    + CategoryInfo          : InvalidOperation: (:) [], CimException
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure
    + PSComputerName        : sqltest.company.local

The error message in the Bootstrap log

Exception type: Microsoft.SqlServer.Chainer.Infrastructure.InputSettingValidationException
    Message: 
        The credentials you provided for the Reporting Services service are invalid. To continue, provide a valid account and password for the Reporting Services service.
    Data: 
      SQL.Setup.FailureCategory = InputSettingValidationFailure
      DisableWatson = true
    Stack: 
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.LogAllValidationErrorsAndThrowFirstOne(ValidationState vs)
        at Microsoft.SqlServer.Configuration.SetupExtension.ValidateFeatureSettingsAction.ExecuteAction(String actionId)
        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)