Strange behavior

Hello, my testlab is exhibiting some strange behavior. I have 3 identical servers in a lab environment, running 2012 R2. All three of them had a vmware snapshot taken in mid/late November, and I am testing DSC on them using the snapshot to return them to a “state before DSC”. I could never get a compliance = $true in this environment (admittedly I never tried anything very simple). Here’s where it gets interesting:

On server 1, I installed the latest windows updates. This resulted in me seeing a new “Admin” log in DSC. (Anyone know what this log is and how I can benefit from it?). But also now my configuration succeeds on this server, but fails on my other two. This is a list of the Operational eventlogs on one of the two servers that it fails on:

12/16/2014 7:53:52 AM         4107 Information      Job {D9BB5794-C1CE-4BC9-884B-DCF4EAE20063} :                       
                                                    Attempting to get the action from pull server using Download       
                                                    Manager WebDownloadManager. Configuration Id is                    
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598. Checksum is . Compliance     
                                                    status is false.                                                   
12/16/2014 7:53:51 AM         4102 Information      Job {D9BB5794-C1CE-4BC9-884B-DCF4EAE20063} :                       
                                                    Configuration is sent from computer NULL by user sid S-1-5-18.     
12/16/2014 7:21:26 AM         4104 Error            Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    This event indicates that failure happens when LCM is trying to    
                                                    get the configuration from pull server using download manager      
                                                    WebDownloadManager. ErrorId is 0x1. ErrorDetail is The             
                                                    SendConfigurationApply function did not succeed.                   
12/16/2014 7:21:26 AM         4131 Error            Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    DSC Engine Error :                                                 
                                                         Error Message The SendConfigurationApply function did not     
                                                    succeed.                                                           
                                                        Error Code : 1                                                 
12/16/2014 7:21:26 AM         4097 Error            Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    This event indicates that failure happens when LCM is processing   
                                                    the configuration. ErrorId is 0x1. ErrorDetail is The              
                                                    SendConfigurationApply function did not succeed.. ResourceId is    
                                                    [xPackage]SQLStd2014::[rWinSQL2014]InstallSQL and SourceInfo is    
                                                    C:\CieDSCCustom\Making Resources\CieCustomComposite\WindowsPowershe
                                                    ll\Modules\rWinSQL2014\DSCResources\rWinSQL2014\rWinSQL2014.schema.
                                                    psm1::102::2::xPackage. ErrorMessage is PowerShell provider        
                                                    MSFT_xPackageResource  failed to execute Set-TargetResource        
                                                    functionality with error message: The return code -2068578304 was  
                                                    not expected. Configuration is likely not correct .                
12/16/2014 7:20:55 AM         4108 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Successfully got the configuration from pull server using Download 
                                                    Manager WebDownloadManager.                                        
12/16/2014 7:20:55 AM         4216 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Skipping pulling of modules since all modules specified in         
                                                    configuration C:\Windows\TEMP\\635543112553717897\localhost.mof    
                                                    are available.                                                     
12/16/2014 7:20:55 AM         4214 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Skipping pulling module xPSDesiredStateConfiguration with version  
                                                    3.0.3.0 as it already exists in this location C:\Program Files\Wind
                                                    owsPowerShell\Modules\xPSDesiredStateConfiguration\xPSDesiredStateC
                                                    onfiguration.psd1.                                                 
12/16/2014 7:20:55 AM         4214 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Skipping pulling module cWindowsOS with version 1.0 as it already  
                                                    exists in this location C:\Program                                 
                                                    Files\WindowsPowerShell\Modules\cWindowsOS\cWindowsOS.psd1.        
12/16/2014 7:20:55 AM         4214 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Skipping pulling module PSDesiredStateConfiguration with version   
                                                    1.0 as it already exists in this location C:\Windows\system32\Windo
                                                    wsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStat
                                                    eConfiguration.psd1.                                               
12/16/2014 7:20:55 AM         4211 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    The checksum validation for configuration                          
                                                    C:\Windows\TEMP\\635543112553717897\localhost.mof completed with   
                                                    status code 0.                                                     
12/16/2014 7:20:55 AM         4211 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    The checksum validation for configuration                          
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 completed with status code 0. 
12/16/2014 7:20:55 AM         4227 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, GET  
                                                    call result: Ok.                                                   
12/16/2014 7:20:55 AM         4229 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, File 
                                                    save result:                                                       
                                                    C:\Windows\TEMP\635543112553717897\localhost.mof.checksum.         
12/16/2014 7:20:55 AM         4229 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, File 
                                                    save result: C:\Windows\TEMP\635543112553717897\localhost.mof.     
12/16/2014 7:20:55 AM         4226 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Get-DscDocument command, GET  
                                                    Url: PSDSCPullServer.svc/Action(ConfigurationId='82b4fe6f-554c-4095
                                                    -831e-160a5b8d1598')/ConfigurationContent.                         
12/16/2014 7:20:55 AM         4210 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Attempting to get the configuration                                
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 from pull server with Server  
                                                    Url http://dyul1dsc001.cie.contoso.com:8080/PSDSCPullServer.svc 
                                                    using Web Download Manager.                                        
12/16/2014 7:20:55 AM         4105 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Attempting to get the configuration from pull server using         
                                                    Download Manager WebDownloadManager.Configuration Id is            
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598.                              
12/16/2014 7:20:55 AM         4194 Error            Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Failed to delete the current configuration file                    
12/16/2014 7:20:55 AM         4110 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Successfully got the action GetConfiguration from pull server      
                                                    using Download Manager WebDownloadManager.                         
12/16/2014 7:20:55 AM         4246 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command, GET     
                                                    call result: GetConfiguration.                                     
12/16/2014 7:20:55 AM         4245 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command, GET     
                                                    Url: PSDSCPullServer.svc/Action(ConfigurationId='82b4fe6f-554c-4095
                                                    -831e-160a5b8d1598')/GetAction.                                    
12/16/2014 7:20:55 AM         4242 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    WebDownloadManager for configuration                               
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598 Do-DscAction command with     
                                                    server url:                                                        
                                                    http://dyul1dsc001.cie.contoso.com:8080/PSDSCPullServer.svc.    
12/16/2014 7:20:55 AM         4107 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Attempting to get the action from pull server using Download       
                                                    Manager WebDownloadManager. Configuration Id is                    
                                                    82b4fe6f-554c-4095-831e-160a5b8d1598. Checksum is . Compliance     
                                                    status is false.                                                   
12/16/2014 7:20:54 AM         4102 Information      Job {F2E97423-6969-4C18-A152-B16A9BF9FB0F} :                       
                                                    Configuration is sent from computer NULL by user sid S-1-5-18.     
12/16/2014 6:51:56 AM         4104 Error            Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :                       
                                                    This event indicates that failure happens when LCM is trying to    
                                                    get the configuration from pull server using download manager      
                                                    WebDownloadManager. ErrorId is 0x1. ErrorDetail is The             
                                                    SendConfigurationApply function did not succeed.                   
12/16/2014 6:51:56 AM         4131 Error            Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :                       
                                                    DSC Engine Error :                                                 
                                                         Error Message The SendConfigurationApply function did not     
                                                    succeed.                                                           
                                                        Error Code : 1                                                 
12/16/2014 6:51:56 AM         4097 Error            Job {F6D6AC9A-61DE-4CB0-83C5-A92DA485E50E} :                       
                                                    This event indicates that failure happens when LCM is processing   
                                                    the configuration. ErrorId is 0x1. ErrorDetail is The              
                                                    SendConfigurationApply function did not succeed.. ResourceId is    
                                                    [xPackage]SQLStd2014::[rWinSQL2014]InstallSQL and SourceInfo is    
                                                    C:\CieDSCCustom\Making Resources\CieCustomComposite\WindowsPowershe
                                                    ll\Modules\rWinSQL2014\DSCResources\rWinSQL2014\rWinSQL2014.schema.
                                                    psm1::102::2::xPackage. ErrorMessage is PowerShell provider        
                                                    MSFT_xPackageResource  failed to execute Set-TargetResource        
                                                    functionality with error message: The return code -2068578304 was  
                                                    not expected. Configuration is likely not correct . 

If I run get-dscconfiguration on a server that’s misbehaving, here’s the error I get:

PS C:\Windows\system32> Get-DscConfiguration
Get-DscConfiguration : The PowerShell provider cWindowsOS does not exist at the PowerShell module path nor is it
registered as a WMI provider.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager)
   [Get-DscConfiguration], CimException
    + FullyQualifiedErrorId : ModuleNameNotFound,Get-DscConfiguration

PS C:\Windows\system32>

I got that particular module from https://github.com/rchaganti/DSCResources/tree/master/cWindowsOS/DSCResources

I know the quick answer here is to just go and install the windows updates on my other machines. I’m just kind of looking for some understanding of what’s going on here. Moreover this leads me to another question / situation: On server1 (where I have these updates installed and I can get it compliant), if I run get-dscconfiguration everything looks great! However if I run test-dscconfiguration it returns $false. If I’m not mistaken, it should only return $false on test-config if I’m not compliant?

I just noticed a difference between the LCM paramaters between servers 1 and 2 (1 with updates, 2 without):

Server 1:

PS C:\Windows\system32> Get-DscLocalConfigurationManager

ActionAfterReboot : ContinueConfiguration
AllowModuleOverwrite : True
CertificateID :
ConfigurationID : ffd65e49-e7ae-4f17-bb46-040866081f92
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {NONE}
DownloadManagerCustomData : {MSFT_KeyValuePair (key = “ServerUrl”), MSFT_KeyValuePair (key =
“AllowUnsecureConnection”)}
DownloadManagerName : WebDownloadManager
LCMCompatibleVersions : {1.0}
LCMState : Idle
LCMVersion : 1.0
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
PSComputerName :

Server 2:


PS C:\Windows\system32> Get-DscLocalConfigurationManager

AllowModuleOverwrite : True
CertificateID :
ConfigurationID : 82b4fe6f-554c-4095-831e-160a5b8d1598
ConfigurationMode : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 30
Credential :
DownloadManagerCustomData : {MSFT_KeyValuePair (key = “ServerUrl”), MSFT_KeyValuePair (key =
“AllowUnsecureConnection”)}
DownloadManagerName : WebDownloadManager
RebootNodeIfNeeded : True
RefreshFrequencyMins : 30
RefreshMode : Pull
PSComputerName :

This is the identical LCM config I sent to each:

Configuration MakeItSoPull
{ 

    Node $allnodes.NodeName
    {
    
        LocalConfigurationManager 
        { 
            ConfigurationID = "$($Node.NodeGUID)"
            RefreshMode = "PULL";
            DownloadManagerName = "WebDownloadManager";
            RebootNodeIfNeeded = $true;
            RefreshFrequencyMins = 30;
            ConfigurationModeFrequencyMins = 15; 
            ConfigurationMode = "ApplyAndAutoCorrect";
            DownloadManagerCustomData = @{ServerUrl = "http://dyul1dsc001.cie.contoso:8080/PSDSCPullServer.svc"; AllowUnsecureConnection = “TRUE”}
            AllowModuleOverwrite = $True
        }
    } 
}  


MakeItSoPull -ConfigurationData $AllServerConfigData -OutputPath "$Env:Temp\PullDSCCfg"

Set-DscLocalConfigurationManager -Path "$Env:Temp\PullDSCCfg"

So, before we all dig into that opus, what version of PowerShell are you using here?

Also, keep in mind you kinda posted a LOT of info. Were you referring to several problems, there? If so, let’s break it down and do one at a time, if possible. Little easier to digest.

PS C:\Users\ryoung> $psversiontable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.34014
BuildVersion                   6.3.9600.17090
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2


PS C:\Users\ryoung>

That’s the version that’s on server 2 (non complaint)

Problem summary:

issue 1) 3 identical servers with vmware snapshot. I update windows on 1 and re-snapshot leaving the others with updates that were installed mid october. Only the updated one can go succeed, while others fail. Just wanting to know what’s changed?

Issue 2) get-dsclocalconfigurationmanager displays different results on servers 1 and 2, despite the fact I sent them the same config.

Question 3) “What’s the new eventlog in DSC called Admin”?

Question 4) Test-dscConfiguration should return $true when a server is complaint shouldn’t it?

OK.

  1. The Admin log is something the DSC component can log information to. Logging is normally only cranked up when there’s a trace in progress, but to answer the question, “what does the log contain,” it might be easier to… you know… look at it :).

  2. Meh. Yes and no. It depends a little on the actual config. Right now, because v4 doesn’t really use the Get- function, and there’s no Compare- function, it’s a little tough to figure out what’s rolling into the high-level Test- result. You almost have to troubleshoot this by sending a config that contains only one element, and seeing what Test- returns then. Far from practical, especially for a large config, but it’s the only way to tell what’s happening.

  3. It looks like you may have enabled a trace on Server1? That adds some properties to the LCM, which aren’t present on Server2 in your output above. And they’re not identical-identical; they’ve got a different ConfigurationId. But if you’re wondering why Server1 has more properties, that’d be why. Also possibly due to being patched.

  4. Dude, no idea. I don’t think anyone on this side of the Intertubes can diagnose that for you. I mean, Windows updates obviously change things, and we don’t exactly have access to all the code. If it’s a concern, I’d personally open a support ticket with MS, but you know they’re just going to tell you to patch the other servers.

BTW… keep in mind that this DSC stuff isn’t so much “documented” as other stuff. So my answer on the Admin log wasn’t meant to be snarky - it’s just that there’s no official documentation to describe it. So the only way any of us figure this out is to stick our heads in and look.

I can say that I didn’t change anything beyond “enabling” the debut and analytical logs on server 1. That & the windows updates are the sole difference between them. As for the new ‘admin’ log, I only noticed it after installing the updates on server 1, and noticed that there weren’t really any events going there. I looked but didn’t have anything really to look at, so was hoping to find more info on it.

I know you’re not intending to be snarky, I asked quite the broad question and went information overload. Also since I’ve come on the scene of these forums I’ve asked for help far more than I’ve helped, so even if it’s not intended I certainly could understand it if you or anyone were a little tired of me haha. I’m a straight shooter, and don’t mind being told to go figure it out myself when it’s called for haha :slight_smile: No worries Don!

I’m going to patch my machines and move forward from this. Looking forward to version 5 :).

DSC doesn’t log a whole lot unless there’s a trace going on. It’s also possible that some of the updates you install modified the functionality a bit. For example, I’m not seeing an Admin log on my lab machine, which hasn’t been patched in ages. But I don’t know if it’s had a trace enabled on it since I last reverted it.

Version 5 will, of course, change everything again :).