-
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
xSQLServerAlwaysOnService: Returns IsHadrEnabled -eq $null #763
Comments
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 |
- 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).
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
- Casting the result of the property IsHadrEnabled to [System.Boolean] so that $null is never returned, which resulted in an exception (issue dsccommunity#763).
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: