Things are different in WMF5 Feb

This topic contains 23 replies, has 3 voices, and was last updated by Profile photo of sirirako sirirako 1 year, 8 months ago.

  • Author
    Posts
  • #23052
    Profile photo of sirirako
    sirirako
    Participant

    1. I got this error in WMF5 Feb but not in WMF5 Nov. This is just a Group resource.

    This event indicates that failure happens when LCM is processing the configuration. Error Id is 0x1. Error Detail is The SendConfigurationApply function did not succeed.. Resource Id is [Group]Administrators and Source Info is Y:\xxxxxx\OSConfig.psm1::26::8::Group. Error Message is PowerShell DSC resource MSFT_GroupResource failed to execute Test-TargetResource functionality with error message: Credentials are required to resolve the domain account Domain Admins.

    2. The node does not correct the configuration (Pull mode). I don't see Consistency check job in schedule task any more. When I use the command Update-DscConfiguration, it does not apply the configuration but just check if there is new one. Is it supposed to work the same way in WMF5 Feb? They are working in WMF5 Nov. What could be the problem?

  • #23055
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Some of this is expected. The old scheduled task is gone; scheduling is just something that WMI / LCM do internally now. Update-DscConfiguration is indeed only intended to trigger a check for a new configuration in a Pull scenario. If you want to re-apply your current configuration immediately, they added a -UseExisting switch to Start-DscConfiguration. This is a bit confusing, and they may change around the verbs and user experience some more based on feedback before the final release.

    I'm not sure why your group resource has just started failing, though. Out of curiosity, have you tried xGroup from the xPSDesiredStateConfiguration module (in the DSC resource kit) to see if it has the same problem?

  • #23056
    Profile photo of sirirako
    sirirako
    Participant

    If LCM is supposed to check the configuration by itself without schedule task, it should at least detect the change, right? I tried setting ConfigurationMode to "ApplyAndAutoCorrect" and "ApplyAndMonitor" , it does not report or try to fix the change. Is there a way to look at its schedule? I do not see anything in event log.

    Start-DSCConfiguration -UseExisting works but it gave me the same error.

    PowerShell DSC resource MSFT_GroupResource failed to execute Test-TargetResource functionality with error message: Credentials are required to resolve the domain account Domain Admins.

    I will try xGroup and see if it works. Thank you so much for your help!

  • #23068
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    I'm not sure what change you're referring to, in your latest questions. However, since the configuration is producing an error when the LCM tries to apply it, that trumps most other concerns for the moment. Until you can get it to apply properly, it's just going to be stuck in Pending status.

  • #23120
    Profile photo of sirirako
    sirirako
    Participant

    Ok
    1. I got a new server(node) and install WMF5 Feb. I am able to set the LCM configuration with no error. With the same configuration meta.mof , on the server that got upgrade to WMF5, I keep getting this error (however it seems like the first time, it works and then got error after that.). The setting is being set in the node but the update configuration does not work.

    The specified Property does not exist.
    + CategoryInfo : MetadataError: (root/Microsoft/...gurationManager:String) [], CimException
    + FullyQualifiedErrorId : MI RESULT 12
    + PSComputerName :

    2. On the new server, LCM does not try to get the configuration by itself (I configure it to Pull mode). I have to use the command Update-DscConfiguration to apply the configuration. After that, I deleted a local user and it didn't apply to configuration again (AutoCorrect). (I removed the Group resource from the configuration.)

  • #23241
    Profile photo of sirirako
    sirirako
    Participant

    Is there a way to see what scheduling that WMI / LCM do internally to check the configuration? I set the node to be ApplyAndAutoCorrect and it does not reapply the configuration. I tested it by removing one of the local user. If I use the command Start-DscConfiguration -CimSession Infra-fs-p1 -UseExisting, it replied the configuration.

  • #23243
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    The intervals are part of the output of Get-DscLocalConfigurationManager. In your case, you'd be interested in ConfigurationModeFrequencyMinutes (might not be remembering that property name exactly right, but it's close.) There's another one called RefreshModeFrequencyMinutes (or similar), which is how often a server in Pull mode will check in with the pull server.

  • #23277
    Profile photo of sirirako
    sirirako
    Participant

    I didn't change those 2 numbers so they are both default value. It does not check for a new configuration nor applied the existing without manually sending the command.

    ActionAfterReboot : ContinueConfiguration
    AllowModuleOverWrite : False
    CertificateID :
    ConfigurationDownloadManagers : [ConfigurationRepositoryShare]PullSvcOS
    ConfigurationID : b7fe803c-190b-442d-9942-626edc0bab57
    ConfigurationMode : ApplyAndMonitor
    ConfigurationModeFrequencyMins : 15
    Credential :
    DebugMode : {All}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0, 2.0}
    LCMState : Ready
    LCMVersion : 2.0
    MaxPendingConfigRetryCount :
    StatusRetentionTimeInDays : 10
    PartialConfigurations : [PartialConfiguration]OSConfig
    RebootNodeIfNeeded : False
    RefreshFrequencyMins : 30
    RefreshMode : Pull
    ReportManagers : {}
    ResourceModuleManagers : {}
    PSComputerName :

  • #23278
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Your ConfigurationMode is set to ApplyAndMonitor. If you change that to ApplyAndAutoCorrect, then it should fix any configuration drift every 15 minutes.

  • #23345
    Profile photo of sirirako
    sirirako
    Participant

    I set them up with ApplyAndAutoCorrect and ApplyAndMonitor and it does not fix the configuration or check for the new configuration. As I mention earlier, using the command is fine. In event log, in WMF5 Nov, it used to show when the check for consistency and when it apply. It doesn't show any more in WMF5 Feb. So I am wondering if there is a way to see what LCM is doing or why it is not doing every 15 minutes.

    BTW, xGroup is working without error. Thanks for suggesting that.

  • #23544
    Profile photo of sirirako
    sirirako
    Participant

    Hi Dave, I still couldn't figure out why my node does not correct itself. I have some questions. So as I mentioned, I remove a local account of the administrators group, now Test-DscConfiguration shows that the node is not in the desirestate.

    PS C:\Windows\system32> Test-DscConfiguration -CimSession Test-fs-p1 
    
    InDesiredState  PSComputerName                                                                                                                                                                                          
    --------------  --------------                                                                                                                                                                                          
    False           Test-fs-p1    
    
    

    My LCM is

    
    ActionAfterReboot              : ContinueConfiguration
    AllowModuleOverWrite           : False
    CertificateID                  : 
    ConfigurationDownloadManagers  : [ConfigurationRepositoryShare]PullSvcOS
    ConfigurationID                : b7fe803c-190b-442d-9942-626edc0bab57
    ConfigurationMode              : ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins : 15
    Credential                     : 
    DebugMode                      : {All}
    DownloadManagerCustomData      : 
    DownloadManagerName            : 
    LCMCompatibleVersions          : {1.0, 2.0}
    LCMState                       : Ready
    LCMVersion                     : 2.0
    MaxPendingConfigRetryCount     : 
    StatusRetentionTimeInDays      : 10
    PartialConfigurations          : [PartialConfiguration]OSConfig
    RebootNodeIfNeeded             : False
    RefreshFrequencyMins           : 30
    RefreshMode                    : Pull
    ReportManagers                 : {}
    ResourceModuleManagers         : {}
    PSComputerName                 : test-fs-p1
    PSComputerName                 : test-fs-p1
    
    

    This is the result of Get-DscConfigurationStatus. My question is that should I see the log for consistency check every 30 minutes and as you can see, it does not reapply the config on 3/20. (I made the change around 9 PM.) Is there any other place that logs LCM activity? I am guessing that the 'ReadOnly' one is when I did Get-DscConfigurationStatus.

    
    PS C:\Windows\system32\Configuration> Get-DscConfigurationStatus -all
    
    Status     StartDate                 Type            Mode  RebootRequested      NumberOfResources             
    ------     ---------                 ----            ----  ---------------      -----------------             
    Success    2015/03/20 22:25:02       ReadOnly        Pull  False                6                             
    Success    2015/03/20 22:18:57       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:32:24       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:24:12       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:23:37       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:22:07       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:21:09       ReadOnly        Pull  False                6                             
    Success    2015/03/20 21:14:41       ReadOnly        Pull  False                6                             
    Success    2015/03/20 19:06:36       ReadOnly        Pull  False                6                             
    Success    2015/03/13 17:20:31       Initial         Pull  False                6                             
    Failure    2015/03/13 17:12:08       Initial         Pull  False                6                             
    Success    2015/03/13 16:29:16       Initial         Pull  False                6                             
    Success    2015/03/13 14:35:54       Initial         Pull  False                6                             
    Success    2015/03/13 14:31:57       Initial         Pull  False                6                             
    Success    2015/03/13 12:06:26       Initial         Pull  False                6                             
    Success    2015/03/13 11:42:47       Initial         Pull  False                6                             
    Failure    2015/03/13 11:33:23       Initial         Pull  False                6                             
    Failure    2015/03/13 11:18:16       Initial         Pull  False                6                             
    Success    2015/03/11 19:06:05       Initial         Pull  False                6                             
    Success    2015/03/11 19:05:35       Initial         Pull  False                6                             
    Success    2015/03/11 18:52:27       Initial         Pull  False                6                             
    Success    2015/03/11 18:29:05       Initial         Pull  False                6                             
    Failure    2015/03/11 18:25:19       Initial         Pull  False                6                             
    Failure    2015/03/11 18:23:42       Initial         Pull  False                                              
    Failure    2015/03/11 18:14:45       Initial         Pull  False                                              
    Failure    2015/03/11 18:12:57       Initial         Pull  False                                              
    Failure    2015/03/11 18:11:48       Initial         Pull  False                                              
    Failure    2015/03/11 17:09:24       Reboot          Pull  False                6                             
    Failure    2015/03/11 16:07:24       Initial         Pull  False                6                             
    Failure    2015/03/11 15:59:37       Initial         Pull  False                6                             
    Success    2015/03/11 13:03:54       Initial         Pull  False                5                             
    Success    2015/03/11 11:59:20       Initial         Pull  False                5                             
    Success    2015/03/10 17:34:50       Initial         Pull  False                5                             
    Failure    2015/03/06 17:45:44       Initial         Pull  False                6                             
    Failure    2015/03/06 16:48:48       Initial         Pull  False    
    
  • #23548
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Your DebugMode is set to All, which may be a problem. The February preview has a new debug option called 'ResourceScriptBreakAll' which allows you to attach to DSC resources running in the LCM with a debugger. Try changing DebugMode to just 'ForceModuleImport', and see if that clears things up.

  • #23555
    Profile photo of sirirako
    sirirako
    Participant

    Still now working. After I restart the WMI (15:38), it did the check and the reapply. After that I removed the user from the group again and it still does not check or correct the configuration. What else I can check? Thank you!

    PS C:\Windows\system32\Configuration> Get-DscConfigurationStatus -all

    Status StartDate Type Mode RebootRequested NumberOfResources
    —— ——— —- —- ————— —————–
    Success 2015/03/21 21:30:25 ReadOnly Pull False 6
    Success 2015/03/21 15:43:29 ReadOnly Pull False 6
    Success 2015/03/21 15:41:51 ReadOnly Pull False 6
    Success 2015/03/21 15:38:35 Reboot Pull False 6
    Success 2015/03/21 15:32:25 ReadOnly Pull False 6
    Aborted 2015/03/21 15:30:36 Reboot Pull False 6

    PS C:\Windows\system32\Configuration> Get-DscLocalConfigurationManager

    ActionAfterReboot : ContinueConfiguration
    AllowModuleOverWrite : False
    CertificateID :
    ConfigurationDownloadManagers : [ConfigurationRepositoryShare]PullSvcOS
    ConfigurationID : b7fe803c-190b-442d-9942-626edc0bab57
    ConfigurationMode : ApplyAndAutoCorrect
    ConfigurationModeFrequencyMins : 15
    Credential :
    DebugMode : {ForceModuleImport}
    DownloadManagerCustomData :
    DownloadManagerName :
    LCMCompatibleVersions : {1.0, 2.0}
    LCMState : Ready
    LCMVersion : 2.0
    MaxPendingConfigRetryCount :
    StatusRetentionTimeInDays : 10
    PartialConfigurations : [PartialConfiguration]OSConfig
    RebootNodeIfNeeded : False
    RefreshFrequencyMins : 30
    RefreshMode : Pull
    ReportManagers : {}
    ResourceModuleManagers : {}
    PSComputerName :

  • #23556
    Profile photo of sirirako
    sirirako
    Participant

    What are the file, DSCEngineCache.mof for? (These are in c:\windows\system32\configuration\)

    -a—- 3/21/2015 3:38 PM 6564 Current.mof
    -a—- 3/21/2015 9:34 PM 496 DSCEngineCache.mof
    -a—- 3/21/2015 9:41 PM 1254 DSCResourceStateCache.mof
    -a—- 3/21/2015 9:31 PM 13908 DSCStatusHistory.mof
    -a—- 3/21/2015 3:31 PM 2916 MetaConfig.backup.mof
    -a—- 3/21/2015 3:31 PM 2906 MetaConfig.mof
    -a—- 3/21/2015 3:38 PM 750 PartialConfigBaseDocumentInstances.mof
    -a—- 3/21/2015 3:38 PM 750 PartialConfigBaseDocumentInstances.mof.tmp
    -a—- 3/21/2015 3:38 PM 6564 Pending.mof.tmp
    -a—- 3/21/2015 3:38 PM 6564 Previous.mof

    The content of DSCEngineCache is shown below. Do you see anything wrong with it?

    instance of DSC_InternalStateCache
    {
    ComplianceStatus = True;
    PartialConfigurationStoreUpdate = 0;
    GetActionStatusCode = 0;
    LCMStatusCode = 0;
    PendingJobId = "{2F1B4859-C437-11E4-80C4-000C29F52CC4}";
    PendingJobStep = 0;
    };

  • #23557
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    That Pending job and the .tmp files in the folder may be what I mentioned earlier: a DSC job is sitting at a breakpoint, waiting for you to attach to it with a debugger. Try running Stop-DscConfiguration -Force , and see if those go away.

  • #23558
    Profile photo of sirirako
    sirirako
    Participant

    PS C:\Windows\system32\Configuration> Stop-DscConfiguration -Force
    WARNING: There is no operation running concurrently. Stop will return without any action.

    🙁

  • #23559
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Sorry, I'm running out of ideas here. From what I can see of your last few posts, it looks like your configuration should be applying every 15 minutes (and pulling every 30, if it's been updated on the server.) If it's not doing that, maybe you've found a bug somewhere.

  • #23560
    Profile photo of sirirako
    sirirako
    Participant

    Thank you very much! I have learnt a lot from you.

  • #23561
    Profile photo of sirirako
    sirirako
    Participant

    One last question, at every 15 minutes and 30 minutes, should there be logs in EventViewer if it works correctly?

  • #23562
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    Yep. Applications and Services Logs -> Microsoft -> Windows -> Desired State Configuration -> Operational

  • #23684
    Profile photo of Jason Helmick
    Jason Helmick
    Keymaster

    Hi Sirirako! Dave has done a great job of try to isolate this. One of the challenges in using the preview release is that sometime bugs creep in. You may have found one. I'll try a similar config when I get a chance this weekend and check it out. I do have a question, are you using resources downloaded from TechNet or the PSGallery?

    Cheers!

  • #23691
    Profile photo of sirirako
    sirirako
    Participant

    Jason, I got xPSDesiredStateConfiguration from PSGallery. My configuration is very simple. When I said earlier about testing, I just remove a user from Administrator group but LCM has never reapplied or even checked the config. I understand that this is a preview but I would like to be able to troubleshoot LCM and understand it more. I can't put a black box in the Production and hope it will work. Thank you!

    Configuration OSConfig {
    param (
    [pscredential]$credential,
    [pscredential]$YYYYCredential,
    [pscredential]$verifyCredential
    
    )
        Import-DscResource -ModuleName xPSDesiredStateConfiguration
        Node $Allnodes.Where{$_.OS -eq $true}.NodeName 
        {
           User xxxxxxx 
           {
    
           }
           User yyyyyyyyy 
           {
    
           }
           xGroup Administrators
           { 
                
           }
    
           WindowsFeature NETFW35    
           {       
                Ensure = “Present” 
                Name = "NET-Framework-Features"
                Source = "\\test\sxs"
                
           }
            WindowsFeature NETFW45     
            {       
                Ensure = “Present” 
                Name = "NET-Framework-45-Features"
            }
            if ($Node.Environment -eq "Internal")
            { 
                Environment ConfigLocation
                {
    
                }
            } else
            {
                Environment ConfigLocation
                {
    
                }
            }
           
        }
    }
    
    
    
  • #23692
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    "I can't put a black box in the Production and hope it will work." That's sort of what you do with almost every piece of software, including the Windows OS. 🙂 Sometimes there are bugs. (Or perhaps more cynical: there are always bugs; just some of them you may not notice.)

    Have you tried this on a clean Windows install, by chance? Can you reproduce it across multiple computers, or is only this one lab machine somehow screwed up at the moment?

  • #23698
    Profile photo of sirirako
    sirirako
    Participant

    Yes, I put a black box in production and luckily most of the time it works. I need to see more though in this case. These jobs were in Task Scheduler and I used to be able to see exactly when it will happen and see the log in the event log. Now I don't know what is happening inside LCM. I am guessing it is a job with a timer in it. In other product like SharePoint, I can see all timer jobs. I wish I can see it in LCM and be able to start them or a way to clear it up. If this happens in Production, I have no way to tell my manager what is happening. This is sort of feature request to make it a little more transparent. Even right now, this is a pilot project (but already communicated to customer that we are doing this). It won't become real if I can't explain what is happening.

    I appreciate all your help. I will try one a new machine and see if it fixed. I have other 3 machines that was upgraded for WMF5 Nov. Two are having the same issue. One is working because for some reasons, the schedule task are still there.

You must be logged in to reply to this topic.