dsccommunity / dsccommunity/NetworkingDsc

DnsConnectionSuffix: fails with no ConnectionSpecificSuffix

Open
#427 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
235
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Details of the scenario you tried and the problem that is occurring

I need to ensure that the DNS client does not try to register the interface connection while having no DNS specific suffixes.

Verbose logs showing the problem

When not providing the DnsConnectionSuffix parameter the error occurs when compiling the MOF:

PSDesiredStateConfiguration\Node : At line:2 char:2
+  DnsConnectionSuffix LAN_2055578403 {
+  ~~~~~~~~~~~~~~~~~~~
Resource 'DnsConnectionSuffix' requires that a value of type 'String' be provided for property 'ConnectionSpecificSuffix'.
At C:\Program Files\WindowsPowerShell\DscService\Scripts\New-DscConfiguration.ps1:102 char:5
+     Node $AllNodes.NodeName {
+     ~~~~
    + CategoryInfo          : ParserError: (:) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingValueForMandatoryProperty,PSDesiredStateConfiguration\node

When providing an empty DnsConnectionSuffix parameter an error occurs when the MOF is applied on computer:

Could not find mandatory property ConnectionSpecificSuffix. Add this property and try again.
    + CategoryInfo          : ObjectNotFound: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 6
Suggested solution to the issue

The resource should not be dependent on the connection suffix but on the interface alias.
With the command line the registration can be disabled, whether the interface has or has not a connection specific suffix.

Get-NetIPInterface | Set-DnsClient -RegisterThisConnectionsAddress $false
The DSC configuration that is used to reproduce the issue (as detailed as possible)

YAML format for Datum

NetworkingDsc:
  DnsConnectionSuffix:
    - InterfaceAlias: LAN
      RegisterThisConnectionsAddress: False
      UseSuffixWhenRegistering: False
The operating system the target node is running
OsName               : Microsoft Windows Server 2016 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsBuildLabEx    : 14393.1794.amd64fre.rs1_release.171008-1615
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}
Version and build of PowerShell the target node is running
PSVersion                      5.1.14393.1884
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1884
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Version of the DSC module that was used ('dev' if using current dev branch)
Name : NetworkingDsc
Path : C:\Program Files\WindowsPowerShell\Modules\NetworkingDsc\7.4.0.0\NetworkingDsc.psd1
Description : Module with DSC Resources for Networking area
ModuleType : Manifest
Version : 7.4.0.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the DnsConnectionSuffix resource and reproduce the reported failures using the supplied DSC configuration on Windows Server. Trace how ConnectionSpecificSuffix is handled when omitted or empty, then verify that registration can be disabled using InterfaceAlias without requiring a suffix and that the existing errors no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.