You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the DnsClientGlobalSetting SuffixSearchList to an empty string fails Test-DscConfiguration
The SuffixSearchList is correctly set to an empty string array, but the test fails. Setting th attribute to an empty array @() instead, works correctly.
The verbose logging error is also not expanding the strings correctly:
DNS Client Global Setting "SuffixSearchList" is "System.String[]" but should be "System.String[]". Change required.
Verbose logs showing the problem
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ApplyConfiguration,'className'
= MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-KQV0CSPMTL6 with user sid
S-1-5-21-653353224-2594412442-3194183951-1002.
VERBOSE: [WIN-KQV0CSPMTL6]: [] Starting consistency engine.
VERBOSE: [WIN-KQV0CSPMTL6]: [] A pending configuration exists. DSC will process a set
request on the pending configuration.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Resource ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Test ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Test-TargetResource:
Testing DNS Client Global Settings.
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Test-TargetResource:
DNS Client Global Setting "SuffixSearchList" is "System.String[]" but should be "System.String[]". Change required.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Test ] [[DnsClientGlobalSetting]SuffixSearchList] in 0.0620 seconds.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Set ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Set-TargetResource:
Setting DNS Client Global Settings.
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Set-TargetResource:
Setting DNS Client Global Settings parameter SuffixSearchList to "System.String[]".
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Set-TargetResource:
Setting DNS Client Global Settings updated.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Set ] [[DnsClientGlobalSetting]SuffixSearchList] in 0.5560 seconds.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Resource ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: [] Consistency check completed.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 1.007 seconds
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = TestConfiguration,'className'
= MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-KQV0CSPMTL6 with user sid
S-1-5-21-653353224-2594412442-3194183951-1002.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Test ]
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Resource ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ Start Test ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Test-TargetResource:
Testing DNS Client Global Settings.
VERBOSE: [WIN-KQV0CSPMTL6]: [[DnsClientGlobalSetting]SuffixSearchList] Test-TargetResource:
DNS Client Global Setting "SuffixSearchList" is "System.String[]" but should be "System.String[]". Change required.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Test ] [[DnsClientGlobalSetting]SuffixSearchList] False in 0.0780
seconds.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Resource ] [[DnsClientGlobalSetting]SuffixSearchList]
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Test ] Completed processing test operation. The operation returned
False.
VERBOSE: [WIN-KQV0CSPMTL6]: LCM: [ End Test ] in 0.2490 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
False
VERBOSE: Time taken for configuration job to complete is 0.76 seconds
Suggested solution to the issue
Looking at the code, Test-TargetResource for DnsClientGlobalSetting is currently being performed in a single foreach loop, even though all four parameters are different types. Suggestion would be to split the test code so that each parameter is tested individually, then specific coding for the SuffixSearchList can be added to cope with this issue.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
PlagueHO
added
bug
The issue is a bug.
help wanted
The issue is up for grabs for anyone in the community.
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
May 21, 2019
Setting the DnsClientGlobalSetting SuffixSearchList to an empty string fails Test-DscConfiguration
The SuffixSearchList is correctly set to an empty string array, but the test fails. Setting th attribute to an empty array
@()
instead, works correctly.The verbose logging error is also not expanding the strings correctly:
Verbose logs showing the problem
Suggested solution to the issue
Looking at the code, Test-TargetResource for DnsClientGlobalSetting is currently being performed in a single
foreach
loop, even though all four parameters are different types. Suggestion would be to split the test code so that each parameter is tested individually, then specific coding for the SuffixSearchList can be added to cope with this issue.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
Networking Dsc v7.2.0.0
The text was updated successfully, but these errors were encountered: