Skip to content

Commit

Permalink
Merge pull request #1124 from PowerShell/dev
Browse files Browse the repository at this point in the history
Release of version 11.2.0.0 of SqlServerDsc
  • Loading branch information
kwirkykat authored May 2, 2018
2 parents 4a68bac + 8d3652d commit d804b8c
Show file tree
Hide file tree
Showing 21 changed files with 1,116 additions and 219 deletions.
7 changes: 5 additions & 2 deletions .MetaTestOptIn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
"Common Tests - Validate Markdown Files",
"Common Tests - Validate Module Files",
"Common Tests - Validate Script Files",
"Common Tests - Validate Example Files"
]
"Common Tests - Validate Example Files",
"Common Tests - Required Script Analyzer Rules",
"Common Tests - New Error-Level Script Analyzer Rules",
"Common Tests - Custom Script Analyzer Rules"
]
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

## Unreleased

## 11.2.0.0

- Changes to SqlServerDsc
- Added new test helper functions in the CommonTestHelpers module. These are used
by the integration tests.
- **New-IntegrationLoopbackAdapter:** Installs the PowerShell module
'LoopbackAdapter' from PowerShell Gallery and creates a new network
loopback adapter.
- **Remove-IntegrationLoopbackAdapter:** Removes a new network loopback adapter.
- **Get-NetIPAddressNetwork:** Returns the IP network address from an IPv4 address
and prefix length.
- Enabled PSSA rule violations to fail build in the CI environment.
- Renamed SqlServerDsc.psd1 to be consistent
([issue #1116](https://github.com/PowerShell/SqlServerDsc/issues/1116)).
[Glenn Sarti (@glennsarti)](https://github.com/glennsarti)
- Changes to Unit Tests
- Updated
the following resources unit test template to version 1.2.1
- SqlWaitForAG ([issue #1088](https://github.com/PowerShell/SqlServerDsc/issues/1088)).
[Michael Fyffe (@TraGicCode)](https://github.com/TraGicCode)
- Changes to SqlAlwaysOnService
- Updated the integration tests to use a loopback adapter to be less intrusive
in the build worker environment.
- Minor code cleanup in integration test, fixed the scope on variable.
- Changes to SqlSetup
- Updated the integration tests to stop some services after each integration test.
This is to save memory on the AppVeyor build worker.
- Updated the integration tests to use a SQL Server 2016 Service Pack 1.
- Fixed Script Analyzer rule error.
- Changes to SqlRS
- Updated the integration tests to stop the Reporting Services service after
the integration test. This is to save memory on the AppVeyor build worker.
- The helper function `Restart-ReportingServicesService` should no longer timeout
when restarting the service ([issue #1114](https://github.com/PowerShell/SqlServerDsc/issues/1114)).
- Changes to SqlServiceAccount
- Updated the integration tests to stop some services after each integration test.
This is to save memory on the AppVeyor build worker.
- Changes to SqlServerDatabaseMail
- Fixed Script Analyzer rule error.

## 11.1.0.0

- Changes to SqlServerDsc
Expand Down
2 changes: 1 addition & 1 deletion DSCResources/MSFT_SqlRS/MSFT_SqlRS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function Set-TargetResource
Invoke-RsCimMethod @invokeRsCimMethodParameters
}

Restart-ReportingServicesService -SQLInstanceName $InstanceName
Restart-ReportingServicesService -SQLInstanceName $InstanceName -WaitTime 30
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ function Set-TargetResource
{
if ($Ensure -eq 'Present')
{

$databaseMailEnabledRunValue = $sqlServerObject.Configuration.DatabaseMailEnabled.RunValue
if ($databaseMailEnabledRunValue -eq 1)
{
Expand Down
4 changes: 2 additions & 2 deletions DSCResources/MSFT_SqlSetup/MSFT_SqlSetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,6 @@ function Set-TargetResource

if ($Features.Contains('SQLENGINE'))
{

if ($PSBoundParameters.ContainsKey('SQLSvcAccount'))
{
$setupArguments += (Get-ServiceAccountParameters -ServiceAccount $SQLSvcAccount -ServiceType 'SQL')
Expand Down Expand Up @@ -1842,7 +1841,8 @@ function Test-TargetResource
$boundParameters.Keys | Where-Object {$_ -imatch "^FailoverCluster"} | ForEach-Object {
$variableName = $_

if ($getTargetResourceResult.$variableName -ne $boundParameters[$variableName]) {
if ($getTargetResourceResult.$variableName -ne $boundParameters[$variableName])
{
Write-Verbose -Message ($script:localizedData.ClusterParameterIsNotInDesiredState -f $variableName, $($boundParameters[$variableName]))
$result = $false
}
Expand Down
97 changes: 0 additions & 97 deletions SQLServerDsc.psd1

This file was deleted.

109 changes: 109 additions & 0 deletions SqlServerDsc.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
@{
# Version number of this module.
moduleVersion = '11.2.0.0'

# ID used to uniquely identify this module
GUID = '693ee082-ed36-45a7-b490-88b07c86b42f'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = '(c) 2018 Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Module with DSC Resources for deployment and configuration of Microsoft SQL Server.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '5.0'

# Minimum version of the common language runtime (CLR) required by this module
CLRVersion = '4.0'

# Functions to export from this module
FunctionsToExport = '*'

# Cmdlets to export from this module
CmdletsToExport = '*'

RequiredAssemblies = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @('DesiredStateConfiguration', 'DSC', 'DSCResourceKit', 'DSCResource')

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShell/SqlServerDsc/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/PowerShell/SqlServerDsc'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '- Changes to SqlServerDsc
- Added new test helper functions in the CommonTestHelpers module. These are used
by the integration tests.
- **New-IntegrationLoopbackAdapter:** Installs the PowerShell module
"LoopbackAdapter" from PowerShell Gallery and creates a new network
loopback adapter.
- **Remove-IntegrationLoopbackAdapter:** Removes a new network loopback adapter.
- **Get-NetIPAddressNetwork:** Returns the IP network address from an IPv4 address
and prefix length.
- Enabled PSSA rule violations to fail build in the CI environment.
- Renamed SqlServerDsc.psd1 to be consistent
([issue 1116](https://github.com/PowerShell/SqlServerDsc/issues/1116)).
[Glenn Sarti (@glennsarti)](https://github.com/glennsarti)
- Changes to Unit Tests
- Updated
the following resources unit test template to version 1.2.1
- SqlWaitForAG ([issue 1088](https://github.com/PowerShell/SqlServerDsc/issues/1088)).
[Michael Fyffe (@TraGicCode)](https://github.com/TraGicCode)
- Changes to SqlAlwaysOnService
- Updated the integration tests to use a loopback adapter to be less intrusive
in the build worker environment.
- Minor code cleanup in integration test, fixed the scope on variable.
- Changes to SqlSetup
- Updated the integration tests to stop some services after each integration test.
This is to save memory on the AppVeyor build worker.
- Updated the integration tests to use a SQL Server 2016 Service Pack 1.
- Fixed Script Analyzer rule error.
- Changes to SqlRS
- Updated the integration tests to stop the Reporting Services service after
the integration test. This is to save memory on the AppVeyor build worker.
- The helper function `Restart-ReportingServicesService` should no longer timeout
when restarting the service ([issue 1114](https://github.com/PowerShell/SqlServerDsc/issues/1114)).
- Changes to SqlServiceAccount
- Updated the integration tests to stop some services after each integration test.
This is to save memory on the AppVeyor build worker.
- Changes to SqlServerDatabaseMail
- Fixed Script Analyzer rule error.
'

} # End of PSData hashtable

} # End of PrivateData hashtable
}














31 changes: 25 additions & 6 deletions SqlServerDscHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -900,11 +900,15 @@ function Restart-SqlService

<#
.SYNOPSIS
Restarts a Reporting Services instance and associated services
Restarts a Reporting Services instance and associated services
.PARAMETER SQLInstanceName
Name of the instance to be restarted. Default is 'MSSQLSERVER'
(the default instance).
Name of the instance to be restarted. Default is 'MSSQLSERVER'
(the default instance).
.PARAMETER WaitTime
Number of seconds to wait between service stop and service start.
Defaults to 0 seconds.
#>
function Restart-ReportingServicesService
{
Expand All @@ -913,7 +917,11 @@ function Restart-ReportingServicesService
(
[Parameter()]
[System.String]
$SQLInstanceName = 'MSSQLSERVER'
$SQLInstanceName = 'MSSQLSERVER',

[Parameter()]
[System.UInt16]
$WaitTime = 0
)

$ServiceName = 'ReportServer'
Expand All @@ -935,8 +943,19 @@ function Restart-ReportingServicesService
$_.Status -eq 'Running'
}

Write-Verbose -Message ($script:localizedData.RestartService -f 'Reporting Services') -Verbose
$reportingServicesService | Restart-Service -Force
Write-Verbose -Message ($script:localizedData.RestartService -f $reportingServicesService.DisplayName) -Verbose

Write-Verbose -Message ($script:localizedData.StoppingService -f $reportingServicesService.DisplayName) -Verbose
$reportingServicesService | Stop-Service -Force

if ($WaitTime -ne 0)
{
Write-Verbose -Message ($script:localizedData.WaitServiceRestart -f $WaitTime, $reportingServicesService.DisplayName) -Verbose
Start-Sleep -Seconds $WaitTime
}

Write-Verbose -Message ($script:localizedData.StartingService -f $reportingServicesService.DisplayName) -Verbose
$reportingServicesService | Start-Service

# Start dependent services
$dependentService | ForEach-Object {
Expand Down
Loading

0 comments on commit d804b8c

Please sign in to comment.