Warning "LCM state is changed by non-DSC operations"

Tagged: 

This topic contains 4 replies, has 5 voices, and was last updated by Profile photo of Paul Frankovich Paul Frankovich 1 month, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #46532

    Hi there,

    I've been using DSC for a couple of months and ran into an odd warning when running Get-DscLocalConfigurationManager:

    dev-dsc03 C:\ PS> Get-DscLocalConfigurationManager
    WARNING: LCM state is changed by non-DSC operations. If you wish to change the state of LCM, please use 
    Remove-DscConfigurationDocument cmdlet.
    
    
    ActionAfterReboot              : ContinueConfiguration
    AgentId                        : 338CAB2C-3947-11E6-93F0-00163E61B0BF
    AllowModuleOverWrite           : False
    CertificateID                  :
    ConfigurationDownloadManagers  : {[ConfigurationRepositoryWeb]Mintel}
    ConfigurationID                : 476edff64edc3945a63e0e90f8f6a58e
    ConfigurationMode              : ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins : 15
    Credential                     :
    DebugMode                      : {NONE}
    DownloadManagerCustomData      :
    DownloadManagerName            :
    LCMCompatibleVersions          : {1.0, 2.0}
    LCMState                       : PendingConfiguration
    LCMStateDetail                 :
    LCMVersion                     : 2.0
    StatusRetentionTimeInDays      : 10
    PartialConfigurations          : {[PartialConfiguration]base}
    RebootNodeIfNeeded             : True
    RefreshFrequencyMins           : 30
    RefreshMode                    : Pull
    ReportManagers                 : {}
    ResourceModuleManagers         : {}
    PSComputerName                 :
    

    My previous DSC configuration run did fail to converge, which is probably what is causing the issue:

    dev-dsc03 C:\ PS> Get-DscConfigurationStatus
    
    Status     StartDate                 Type            Mode  RebootRequested      NumberOfResources
    ------     ---------                 ----            ----  ---------------      -----------------
    Failure    7/11/2016 4:39:58 AM      Consistency     Pull  False                38
    

    I have since fixed the configuration error and I don't see this warning anymore. Does anyone know what this message means?

    #46556
    Profile photo of Juliën Zweverink
    Juliën Zweverink
    Participant

    Had the same error after running a normal DSC script. I looked at the LCM but did not see any changes. I would like the follow this post as well.

    #46621
    Profile photo of Nitin Gupta
    Nitin Gupta
    Participant

    This warning indicates that LCM think that there is an inconsistency in the information available in the LCM cache and what LCM currently sees.
    LCM stores most up to date state (IDLE, BUSY, PENDING CONFIGURATION and REBOOT) in its cache and verify it against current state of the system every time a new configuration is run. However this doesn't impact the execution of the configuration as LCM relies on the current state.

    #48986
    Profile photo of Thomas Lee
    Thomas Lee
    Participant

    how do you get rid of this error

    I ran a dsc against the wrong machine (error in the configuration block) but now the error shows up all the time – against the wrong machine. HOW do I clear it?

    As an aside, I'd have hoped that DSC was a little more idiot proof – simple mistakes that generate errors that are hard to resolve.

    #49057
    Profile photo of Paul Frankovich
    Paul Frankovich
    Participant

    I am just learning DSC so I run into this a lot, I typically run this:

    Remove-DscConfigurationDocument -CimSession 'ComputerName' -Stage Pending -Force

    Because I tend to see this when I have messed up a Configuration.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.