-
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
xSqlServerMaxDop: Measure-Resource value of Property is not valid #801
Comments
I forgot to mention that this has been working as of two weeks ago. I don't see any changes to the repository, which would lead one to conclude the problem is on my end :) However, I didn't make any changes either :) |
Submitted the fix. |
Very strange that it did work, an now it doesn't. But I guess your changes as as good as the previous code, so doesn't hurt to change it if this is actually a problem with new build of some external thing. |
I 100% agree with you on the strangeness, it didn’t make any sense since it was working before.
Shawn Sesna
DevOps Engineer
|
A little late to this, but I curious whether you saw any additional errors logged around the call to |
I did not. The cimInstance object is a valid object, however it appeared to be a collection of processor objects. The processor objects had the property the Measure-Object cmdlet was looking for, but the cimInstance did not.
Shawn Sesna
DevOps Engineer
|
- Changes to xSQLServerMaxDop - Fixed error where Measure-Object cmdlet would fail claiming it could not find the specified property (issue #801).
Details of the scenario you tried and the problem that is occurring:
Test section of xMaxDop is failing with: Error Message: Cannot process argument because the value of argument "Property" is not valid.
Researched module and found that Function Get-SqlDscDynamicMaxDop was causing the problem the two lines
both fail with Measure-Object : The property "NumberOfLogicalProcessors" cannot be found in the input for any objects.
and
Measure-Object : The property "NumberOfCores" cannot be found in the input for any objects.
Replaced with
and MaxDop gets set correctly.
The DSC configuration that is using the resource (as detailed as possible):$Node.MaxDop #$ (null)
# set max degree of parallelism
xSqlServerMaxDop $Node.NodeName
{
SQLInstanceName = $Node.InstanceName
SQLServer = $Node.SqlServerName
Ensure = "Present"
DynamicAlloc = $Node.MaxDopDynamicAlloc #($true)
MaxDop =
DependsOn = "[xSqlServerSetup]$($Node.NodeName)"
}
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
Server 2016
SQL Server 2016
What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
SqlServer
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
8.1.0.0
The text was updated successfully, but these errors were encountered: