Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xPendingReboot: post 'Invalid namespace' warning and doesn't reboot #26

Open
FallenGameR opened this issue Apr 4, 2019 · 5 comments
Open

Comments

@FallenGameR
Copy link

Details of the scenario you tried and the problem that is occurring

I'm using xPendingReboot at the and of my configuration, but the logs suggest that:

  1. xPendingReboot couldn't query CCM_ClientUtilities because it failed to find some needed namespace
  2. Reboot is required anyway and it was not done.

Verbose logs showing the problem

VERBOSE: [ukwest000000]: LCM:  [ Start  Resource ]  [[xPendingReboot]AfterVmSetup]
VERBOSE: [ukwest000000]: LCM:  [ Start  Test     ]  [[xPendingReboot]AfterVmSetup]
WARNING: [ukwest000000]:                            [[xPendingReboot]AfterVmSetup] Unable to query CCM_ClientUtilities: Invalid namespace
VERBOSE: [ukwest000000]:                            [[xPendingReboot]AfterVmSetup] Pending file rename found.
VERBOSE: [ukwest000000]: LCM:  [ End    Test     ]  [[xPendingReboot]AfterVmSetup]  in 0.0470 seconds.
VERBOSE: [ukwest000000]: LCM:  [ Start  Set      ]  [[xPendingReboot]AfterVmSetup]
VERBOSE: [ukwest000000]: LCM:  [ End    Set      ]  [[xPendingReboot]AfterVmSetup]  in 0.0000 seconds.
VERBOSE: [ukwest000000]: LCM:  [ End    Resource ]  [[xPendingReboot]AfterVmSetup]
VERBOSE: [ukwest000000]:                            [] A reboot is required to progress further. Please reboot the system.
WARNING: [ukwest000000]:                            [] A reboot is required to progress further. Please reboot the system.
VERBOSE: [ukwest000000]: LCM:  [ End    Set      ]
VERBOSE: [ukwest000000]: LCM:  [ End    Set      ]    in  7.6100 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 8.157 seconds

Suggested solution to the issue

Fix it please =)
Or provide a workaround.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

        # Check if a reboot is needed after we setup the VM
        xPendingReboot AfterVmSetup
        {
            Name = 'AfterVmSetup'
        }

The operating system the target node is running

OsName               : Microsoft Windows Server 2019 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

ModuleName                     Version
----------                     -------
xPendingReboot                 0.4.0.0
@brinkers
Copy link

xPendingReboot is fickle :-)

CCM_ClientUtilities: Invalid namespace can be avoided by specifying SkipCcmClientSDK = $True. that's just the check to see if SCCM thinks a reboot is needed; and the class isn't available if you don't have the SCCM client.

As for the no actual reboot, ensure the LCM is allowed to reboot the node
(Get-DscLocalConfigurationManager).RebootNodeIfNeeded must be $true; if not set if before hand with set-DscLocalConfigurationManager

@nehrua
Copy link

nehrua commented Apr 30, 2019

Thanks @brinkers

@b3nt0
Copy link

b3nt0 commented Jun 14, 2019

@brinkers

So, by default it doesn't check to see if the SCCM client is installed and just fails if it isn't? Why not default to not searching for the SCCM client and having SCCM admins opt-in since they know that its there?

@PlagueHO
Copy link
Member

This is related to #13. I will be addressing this when I move the resource to ComputerManagementDsc.
@b3nt0 - your suggestion is correct and will be addressed during the migration.

There is an issue where regardless of the SCCM state of the client a reboot will never be triggered. This is because there is no check for the status in the Test-TargetResource. I'll be addressing this during the migration.

@PlagueHO
Copy link
Member

This has been fixed over in the new PendingReboot in ComputerManagementDsc. @gaelcolas - can you close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants