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

(MODULES-6904) Restart SQL Server Service with Dependent Services #315

Merged

Conversation

RandomNoun7
Copy link
Contributor

Prviously, the sp_configure.pp file would attempt to use the builtin
service resource to restart the MSSQLServer service if a configuration
change was made. This attempt would fail if there was a dependent
service such as the SQL Agent service, which is extremely common.

This change implements an extremely small PowerShell script instead to
force restart the MSSQLSERVER service, even if there are dependent
services.

In testing this resulted in the Agent service going down and then
coming back up as expected.

metadata.json Outdated
},
{
"name": "puppetlabs/powershell",
"version_requirement": ">= 1.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting that I did in fact test this on many versions of the powershell module starting with 1.0.1 which is the earliest version available on the forge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just changed the version to >= 1.0.1 since that's the earliest on the forge.

@RandomNoun7 RandomNoun7 force-pushed the tickets/MODULES-6904-restart-service branch from 753fb0e to 8a66b99 Compare June 6, 2019 22:59
@tphoney
Copy link
Contributor

tphoney commented Jun 7, 2019

looks grand, bar the check failing and the changelog.

@RandomNoun7 RandomNoun7 force-pushed the tickets/MODULES-6904-restart-service branch 4 times, most recently from a16e5f3 to 211ffdf Compare June 10, 2019 17:04
Prviously, the sp_configure.pp file would attempt to use the builtin
service resource to restart the MSSQLServer service if a configuration
change was made. This attempt would fail if there was a dependent
service such as the SQL Agent service, which is extremely common.

This change implements an extremely small PowerShell script instead to
force restart the MSSQLSERVER service, even if there are dependent
services.

In testing this resulted in the Agent service going down and then
coming back up as expected.
@RandomNoun7 RandomNoun7 force-pushed the tickets/MODULES-6904-restart-service branch from 211ffdf to 35bb1a7 Compare June 10, 2019 18:21
@RandomNoun7 RandomNoun7 marked this pull request as ready for review June 11, 2019 03:20
@RandomNoun7
Copy link
Contributor Author

@tphoney Both the failing tests and the changelog issues have been addressed. See the ticket comments also for the passing adhoc run.

@jpogran jpogran merged commit efc1c27 into puppetlabs:master Jun 26, 2019
@RandomNoun7 RandomNoun7 deleted the tickets/MODULES-6904-restart-service branch March 4, 2020 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants