Skip to content
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

SqlRS: SSRS needs restart after reserving URLs #1331

Closed
bozho opened this issue Apr 24, 2019 · 4 comments · Fixed by #1334
Closed

SqlRS: SSRS needs restart after reserving URLs #1331

bozho opened this issue Apr 24, 2019 · 4 comments · Fixed by #1334
Labels
bug The issue is a bug.

Comments

@bozho
Copy link
Contributor

bozho commented Apr 24, 2019

Details of the scenario you tried and the problem that is occurring

When changing (adding, removing) reserved URLs on SSRS, accessing http://server/Reports (the web application interface) will return a 503 until the SQL Server Reporting Services Windows service is restarted.

Suggested solution to the issue

Currently, SqlRS will restart the SQL Server Reporting Services Windows service only after initialising the configuration for the first time.

I suggest we restart SSRS whenever Set-TargetResource makes a change.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

SqlRS SSRSConfig {
    InstanceName = $Node.SqlServerInstanceName
    DatabaseServerName = "localhost"
    DatabaseInstanceName = $Node.SqlServerInstanceName
    ReportServerReservedUrl = "http://+:80"
    ReportsReservedUrl = "http://+:80"
}

SQL Server edition and version the target node is running

Microsoft SQL Server 2016 (SP1-CU12) (KB4464343) - 13.0.4541.0 (X64)   Oct 26 2018 17:23:31   Copyright (c) Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor) 

SQL Server PowerShell modules present on the target node

Name         Version    Path                                                                                           
----         -------    ----                                                                                           
SqlServer    21.1.18068 C:\Program Files\WindowsPowerShell\Modules\SqlServer\21.1.18068\SqlServer.psd1                 
SqlServer    20.0       C:\Program Files\WindowsPowerShell\Modules\SqlServer\SqlServer.psd1                            
SQLASCMDLETS 2.0        C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLASCMDLETS\SQLASC...
SQLPS        1.0        C:\Program Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1      

The operating system the target node is running

OsName               : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsBuildLabEx    : 14393.2791.amd64fre.rs1_release.190205-1511
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value                                                                                   
----                           -----                                                                                   
PSVersion                      5.1.14393.2791                                                                          
PSEdition                      Desktop                                                                                 
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
BuildVersion                   10.0.14393.2791                                                                         
CLRVersion                     4.0.30319.42000                                                                         
WSManStackVersion              3.0                                                                                     
PSRemotingProtocolVersion      2.3                                                                                     
SerializationVersion           1.1.0.1                                                                                 

Version of the DSC module that was used ('dev' if using current dev branch)

Name         Version  Path                                                                              
----         -------  ----                                                                              
SqlServerDsc 12.4.0.0 C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\12.4.0.0\SqlServerDsc.psd1
@johlju
Copy link
Member

johlju commented Apr 24, 2019

I like the suggested solution.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Apr 24, 2019
@bozho
Copy link
Contributor Author

bozho commented Apr 24, 2019

@johlju Do you think it's safe to assume once we're in Set-TargetResource, there will be changes made to SSRS config, and we can just restart SSRS, or would you prefer to include a $restartRS flag to the else branch (SSRS is initialised) in Set-TargetResource and restart SSRS only if there actually are configuration changes?

@johlju
Copy link
Member

johlju commented Apr 24, 2019

You could call the Set-function with Invoke-DscResource so we should not assume it should always restart. I like the idea of setting a restart variable, if that is true then we restart. That why we could move the restart vi already have, so it uses the same variable. 🤔
This will change the behavior of the resource. Should we have a ForceRestart parameter, and when set it will always restart instead?
Though, other resource have SuppressRestart.

So maybe the $restartReportingService variable, and a parameter SuppressRestart so the resource does not restart. SuppressRestart should even suppresses the restart during initialization.

What do you think?

@bozho
Copy link
Contributor Author

bozho commented Apr 25, 2019

So maybe the $restartReportingService variable, and a parameter SuppressRestart so the resource does not restart. SuppressRestart should even suppresses the restart during initialization.

I agree. If other resources use SuppressRestart, I'd use it.

bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
bozho added a commit to bozho/SqlServerDsc that referenced this issue Apr 25, 2019
johlju pushed a commit that referenced this issue Apr 26, 2019
- Changes to SqlRS
  - Reporting Services are restarted after changing settings, unless
    `$SuppressRestart` parameter is set (issue #1331). `$SuppressRestart`
    will also prevent Reporting Services restart after initialization.
@kwirkykat kwirkykat removed the help wanted The issue is up for grabs for anyone in the community. label Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants