Patch Apply Policy doesn't run

  • 7023800
  • 29-Mar-2019
  • 03-Apr-2019

Environment

ZENworks Configuration Management 2017 Update 4
ZENworks Patch Management 2017 Update 4

Situation

After applying 2017 update 4 on agents, patch policy may not apply.  No error seen when running zac pap, it just exits without doing anything.

ERROR (from zmd-messages.log):

[TRACE] [03/19/2019 16:33:46.717] [3468] [ZenworksWindowsService] [79] [] [ZMD] [] [Processing Command for handler patch-apply-policy] [] [] [] [ZENworks Agent] 
[TRACE] [03/19/2019 16:33:46.719] [3468] [ZenworksWindowsService] [79] [] [Patch Module] [] [Exception in fetching contents from DeploymentResult.xml: System.Xml.XmlException: Root element is missing.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
   at System.Xml.XmlDocument.Load(XmlReader reader)
   at System.Xml.XmlDocument.Load(String filename)
   at Lumension.Zenworks.PatchModule.DeploymentList.GetPersistedList()] [] [] [] [ZENworks Agent] 
[TRACE] [03/19/2019 16:33:46.719] [3468] [ZenworksWindowsService] [79] [] [CLM] [] [Unexpected exception in ProcessCommand: System.Xml.XmlExceptionRoot element is missing.
   at Lumension.Zenworks.PatchModule.DeploymentList.GetPersistedList()
   at Lumension.Zenworks.PatchModule.PatchPolicy.ApplyPatchPolicies(Session session, CommandLineOutputStream stream)
   at Lumension.Zenworks.PatchModule.ApplyPolicyCommandLine.ProcessCommandLine(Session session, List`1 parms, CommandLineOutputStream stream)
   at Novell.Zenworks.Zmd.CommandLineManager.ProcessCommand(CommandLineOutputStream stream, String command, List`1 commandParams)] [] [] [] [ZENworks Agent] 
[TRACE] [03/19/2019 16:33:46.719] [3468] [ZenworksWindowsService] [79] [] [CLM] [] [After call to ProcessCommand.  Result = ERROR] [] [] [] [ZENworks Agent] 
[TRACE] [03/19/2019 16:33:46.719] [3468] [ZenworksWindowsService] [79] [] [CLM] [] [After call to ParseArgs.  Result = ERROR] [] [] [] [ZENworks Agent] 

Resolution

Workaround:  Check for DeploymentResults.xml in %ZENWORKS_HOME%\zpm folder.  If it is 0 byte or corrupt (not proper xml in document) delete the file and run zac ps again.

Status

Reported to Engineering