-
Notifications
You must be signed in to change notification settings - Fork 224
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
xSQLServerAlwaysOnService: Returns IsHadrEnabled -eq $null #763
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
Aug 15, 2017
Wrong link to error message. Above link is test run after testing casting to boolean. This is the correct url showing the error. |
The error message returned is
Casting the return value to [System.Boolean] will make sure a |
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
Aug 16, 2017
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Aug 16, 2017
- Casting the result of the property IshardEnabled to to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Aug 16, 2017
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Aug 16, 2017
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Aug 16, 2017
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
5 tasks
johlju
added a commit
to johlju/SqlServerDsc
that referenced
this issue
Aug 17, 2017
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
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:
Sometimes this row returns $null resulting in an exception. This most likely due to that the server has not been restarted after setup. I'm guessing, because I hit this issue during integration testing. And there I am suppressing reboot.
If we instead cast this row to a Boolean, it will always return false if it is false or $null.
https://github.com/PowerShell/xSQLServer/blob/dev/DSCResources/MSFT_xSQLServerAlwaysOnService/MSFT_xSQLServerAlwaysOnService.psm1#L45
The DSC configuration that is using the resource (as detailed as possible):
test run here: https://ci.appveyor.com/project/johlju/xsqlserver/build/6.0.851.0#L1652
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a
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: