LCM not downloading modules from ResourceRepositoryShare

Welcome Forums DSC (Desired State Configuration) LCM not downloading modules from ResourceRepositoryShare

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
2 months, 2 weeks ago.

  • Author
    Posts
  • #103420

    Participant
    Points: 0
    Rank: Member

    Hello

    I am trying to implement DSC in push mode, using a ResourceRepositoryShare to download powershell modules.

    My LCM config is really simple:

    [DSCLocalConfigurationManager()]
    Configuration PlatformLCMConfig
    {
        Node $AllNodes.NodeName
        {
            Settings
            {
                RefreshMode = 'Push'
                # A configuration Id needs to be specified, known bug
                ConfigurationID = '3a15d863-bd25-432c-9e45-9199afecde91'
            }
    
            ResourceRepositoryShare FileShare
            {
                SourcePath = "\\dcfs\DscModules\"
                
            }
        }
    }
    

    However after I Publish-DscConfiguration (works OK), I see this error after Start-DscConfiguration -UseExisting -Wait -Verbose:

    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 AIS2-b95 with user sid S-1-5-21-1301489009-2575183415-109161302-500.
    VERBOSE: [AIS2-b95]:                            [] Starting consistency engine.
    VERBOSE: [AIS2-b95]:                            [] A pending configuration exists. DSC will process a set request on
    the pending configuration.
    VERBOSE: [AIS2-b95]:                            [] Consistency check completed.
    The PowerShell DSC resource cTentacleAgent from module  does not exist at the PowerShell module
    path nor is it registered as a WMI DSC resource. LCM failed to start desired state configuration manually.
        + CategoryInfo          : InvalidOperation: (root/Microsoft/...gurationManager:String) [], CimException
        + FullyQualifiedErrorId : DscResourceNotFound
        + PSComputerName        : localhost
    
    VERBOSE: Operation 'Invoke CimMethod' complete.
    VERBOSE: Time taken for configuration job to complete is 0.849 seconds
    

    I am using composite configurations, but I have used the same config with the LCM in pull mode using tug as the pull server and the modules and configuration downloaded fine.

    Using sysinternals procmon I can see that no attempt is made to connect to my dsc module share. I can only see the LCM process checking $env:PsModulePath for modules.

    Is there anything else I can do to troubleshoot this? I feel like I must be missing something really basic.

  • #103424

    Participant
    Points: 0
    Rank: Member

    Update on this:

    I changed LCM config to the below:

    [DSCLocalConfigurationManager()]
    Configuration PlatformLCMConfig
    {
        Node $AllNodes.NodeName
        {
            Settings
            {
                RefreshMode = 'Pull'
                # A configuration Id needs to be specified, known bug
                ConfigurationID = $Node.ConfigurationId
            }
    
            ConfigurationRepositoryShare SmbFileShare
            {
                SourcePath = "\\dcfs.nw-ci.local\DscConfiguration"
            }
    
            ResourceRepositoryShare SmbResourceShare
            {
                SourcePath = "\\dcfs.nw-ci.local\DscModules"
                
            }
        }
    }
    

    I then arrange for the .mof file for each server to be copied from configuration output into the file share, and produce a .checksum file for each mof. When I update configuration, the module repository works normally.

    Can anyone comment on this? Is using a ResourceRepositoryShare with push configuration still supported? I am running Windows Server 2016 with inbox WMF. my PSVersionTable looks like this:

    Name                           Value
    ----                           -----
    PSVersion                      5.1.14393.2248
    PSEdition                      Desktop
    PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
    BuildVersion                   10.0.14393.2248
    CLRVersion                     4.0.30319.42000
    WSManStackVersion              3.0
    PSRemotingProtocolVersion      2.3
    SerializationVersion           1.1.0.1
    
  • #105880

    Participant
    Points: 0
    Rank: Member

    Later Edit: Sorry for the wrong answer. I was in a hurry and and missed the Share (not Web) part of the problem.

    Hi Sam

    I also am using a combination of Push for configurations and Pull for resources. Below you can see my LCM code ($servername and $RegistrationKey are variables that I pass when compiling the MOF).
    From what I noticed, using DSC in this scenario works like this: resources are pulled only when you use the Start-DSCConfiguration command. At that time the client machine checks the MOF for what modules it needs + what versions and pulls whatever is missing from it's local Modules folder. The next time the client will check for new resources is when you will run Start-DSCConfiguration again. The difference in my case is that I use one MOF and just start the config with Start-DSCConfiguration.
    Hope this helps. Good luck with your DSC journey!

    Node $NodeName
        {
            Settings
            {
                ActionAfterReboot = 'ContinueConfiguration'
                ConfigurationMode = 'ApplyAndAutoCorrect'
                ConfigurationModeFrequencyMins = 15
                RebootNodeIfNeeded = $false
                RefreshMode = 'Push'
                AllowModuleOverwrite = $true
            }
    
            ResourceRepositoryWeb PullSrv
            {
                ServerURL          = "http://$servername`:8080/PSDSCPullServer.svc"
                RegistrationKey    = $RegistrationKey
                AllowUnsecureConnection = $true
            }
        }
    

You must be logged in to reply to this topic.