Home Dashboard Directory Help
Search

DSC LCM in Pull mode requires a current config (set through push) before pull will work. by Neptune443


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


8
1
Sign in
to vote
Type: Bug
ID: 802280
Opened: 9/25/2013 4:22:49 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

When the Desired State Configuration Local Configuration Manager is set in Pull mode it requires a current configuration before it can pull a configuration from a pull server (SMB share was tested in my case). An event with EventID 4131 with a message saying "Current configuration does not exist. Start a DSC configuration first to create a current configuration.".

Even though the error is logged and handled it seems to me that it is a bug that a pull configuration should require a a prior push configuration.
Details
Sign in to post a comment.
Posted by BrianEh on 3/28/2014 at 12:48 PM
In fact - I have all of the patches applied.
I reboot and I start over again with the error.
I apply the workaround, then I can apply the pull configuration and it pulls from my (http) pull server.

Considering how easy it was for me to hit this, I find it difficult to understand how it was closed with 'no repro'
Posted by BrianEh on 3/28/2014 at 12:00 PM
I just ran into this with a fresh clean machine created from the (current) MSDN ISO for Server 2012 R2.
No DSC configuration was applied to the machine. The very first configuration applied to the machine was the LCM configuration to pull.
The workaround solved my issue. I did not try the updates prior to attempting the workaround.

EventType    : ERROR
TimeCreated : 3/28/2014 6:33:00 PM
Message     : DSC Engine Error :
                    Error Message Current configuration does not exist. Start a DSC configuration first to create a current configuration.
                 Error Code : 1
ComputerName : WIN-51KKT03VFNR
JobID        : 67978c5b-eb08-41ca-95c6-d43e2207f4df
SequenceID : 1
Event        : System.Diagnostics.Eventing.Reader.EventLogRecord
Posted by David Wyatt on 3/16/2014 at 6:42 PM
I encountered this error as well, but it turned out to be resolved by installing the GA release of WMF 4.0 (or the KB2883200 rollup, if you're running Windows Server 2012 R2 or Windows 8.1).
Sign in to post a workaround.
Posted by Neptune443 on 9/26/2013 at 9:22 AM
To get around the issue without affecting the configuration of a machine, set an initial fake/non-intrusive configuration through push, such as a script resource which does nothing.

Configuration ResetLCM {
param(
        [Parameter(Mandatory)]
        [ValidateNotNullOrEmpty()]
        [string[]]$ComputerName
    )
    Node $computerName {
        # Just using an empty script resource to create the initial configuration
        # otherwise compuers set to pull without a prior configuration will fail
        # Will log as a bug
        Script FauxConfig {
            SetScript = "''"
            TestScript = '$true'
            GetScript = {@{Result = 'A config exists'}}
        }
        LocalConfigurationManager {
            ConfigurationModeFrequencyMins = 15
            RebootNodeIfNeeded = $False
            RefreshFrequencyMins = 0
            RefreshMode = "PUSH"
        }
    }
}

ResetLCM -ComputerName $ComputerName -OutputPath $LCMConfigFolder
Set-DscLocalConfigurationManager -Path $LCMConfigFolder
Start-DscConfiguration -Path $LCMConfigFolder -Wait -Verbose
$cimSession = New-CimSession -ComputerName $ComputerName
Get-DscConfiguration -CimSession $cimSession