-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlServiceAccount: Timing issue in integration test for SqlServiceAccount #1008
Labels
enhancement
The issue is an enhancement request.
Comments
johlju
added
enhancement
The issue is an enhancement request.
help wanted
The issue is up for grabs for anyone in the community.
labels
Jan 9, 2018
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Jan 12, 2018
- Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue dsccommunity#1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error.
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Jan 12, 2018
- Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue dsccommunity#1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error.
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Jan 12, 2018
- Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue dsccommunity#1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error.
johlju
added
in progress
The issue is being actively worked on by someone.
and removed
help wanted
The issue is up for grabs for anyone in the community.
labels
Jan 12, 2018
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Jan 13, 2018
- Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue dsccommunity#1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error.
5 tasks
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Jan 15, 2018
- Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue dsccommunity#1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error.
johlju
added a commit
that referenced
this issue
Jan 18, 2018
- Changes to SqlServerDsc - Now the helper function Restart-SqlService, after restarting the SQL Server service, does not return until it can connect to the SQL Server instance, and the instance returns status 'Online' (issue #1008). If it fails to connect within the timeout period (defaults to 120 seconds) it throws an error. - Changes to SqlServiceAccount - The timing issue that the resource returned before SQL Server service was actually restarted has been solved by a change in the helper function Restart-SqlService (issue #1008). Now Restart-SqlService waits for the instance to return status 'Online' or throws an error saying it failed to connect within the timeout period.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details of the scenario you tried and the problem that is occurring:
It seems there is a timing issue in the resource SqlServiceAccount, or the helper function
Restart-SqlService
. This error is thrown seemingly random, but twice in a row for PR #1004.I think it is because Set-TargetResource returns as soon as it has restart the service, and the integration test directly runs Get-TargetResource for the next test, and that test fails because the instance has not started on the build worker.
Is a solution to add a validation in the helper function
Restart-SqlService
that the instance is actually available? It could start a task that tries to connect, and use theTimeout
parameter to thrown an error if connection has not succeeded within the timeout period.Because this issue could be seen in other resource that uses this helper function, so resolving this in this helper function would maybe solve more potential problems.
https://ci.appveyor.com/project/PowerShell/sqlserverdsc/build/9.0.160.0#L8753
The DSC configuration that is using the resource (as detailed as possible):
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Windows Server 2016, SQL Server 2016, WMF 5.1
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
SQLPS
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
The text was updated successfully, but these errors were encountered: