Group policy goes into error state after importing with zman

  • 7009641
  • 26-Oct-2011
  • 27-Apr-2012

Environment

Novell ZENworks 11 Configuration Management Zman
Novell ZENworks 11 Configuration Management Support Pack 1 - ZCM 11 SP1 Zman

Situation

Changes:
Exported group policy meta data with zman policy-settings-export-to-file (petf) command
Captured group policy content by backing up the temporary zip file while editing the group policy with ZENworks Control Center (ZCC)
Prepared the ActionContentInfo XML file with the actual group policy content zip file name for the import
Imported the group policy using the zman policy-create (pc) without error

Symptoms:
The group policy settings do not apply
The group policy shows failure status in ZCM agent properties

Error in zmd-messages.log on affected device:
"...
 [DEBUG] [10/26/2011 09:39:09.378] [1072] [ZenworksWindowsService] [24] [user] [grouppolicy] [] [File not found] [] []
 [DEBUG] [10/26/2011 09:39:09.378] [1072] [ZenworksWindowsService] [24] [user] [grouppolicy] [] [An exception occured while generating ApplySettingsRequest
Exception Details: Found path for content with ID - 7949f2a8ecb0c52eba1934a69d98e086 but the file - q7yi555s40.zip was not found.
   at Novell.Zenworks.PolicyHandlers.WindowsGroupPolicyPlural.WindowsGPHandler.GenerateSettingsRequest(ApplyPolicyRequest request, WindowsGPData data)
   at Novell.Zenworks.PolicyHandlers.WindowsGroupPolicyPlural.WindowsGPHandler.ApplyPolicies(ApplyPolicyRequest request)] [] []
 [ERROR] [10/26/2011 09:39:09.378] [1072] [ZenworksWindowsService] [24] [user] [grouppolicy] [POLICYHANDLERS.WinGPPolicy.ContentError] [There was an error while accessing content for policy "GPStdUser(0)". The error was - "Found path for content with ID - 7949f2a8ecb0c52eba1934a69d98e086 but the file - q7yi555s40.zip was not found."] [Found path for content with ID - 7949f2a8ecb0c52eba1934a69d98e086 but the file - q7yi555s40.zip was not found.] [a6afa4070a5fe49ea14acc431b003960]
 [ERROR] [10/26/2011 09:39:09.471] [1072] [ZenworksWindowsService] [24] [user] [grouppolicy] [POLICYHANDLERS.WinGPPolicy.ContentError] [There was an error while accessing content for policy "GPStdUser(0)". The error was - "Found path for content with ID - 7949f2a8ecb0c52eba1934a69d98e086 but the file - q7yi555s40.zip was not found."] [Found path for content with ID - 7949f2a8ecb0c52eba1934a69d98e086 but the file - q7yi555s40.zip was not found.] [a6afa4070a5fe49ea14acc431b003960]
 [DEBUG] [10/26/2011 09:39:09.471] [1072] [ZenworksWindowsService] [24] [user] [grouppolicy] [] [Execute policy operation completed for policy type - grouppolicystatus :Failure] [] []
..."

Resolution

Open the policy XML file and ensure the following tags/sections reflect the correct content file name matching the one in the ActionContentInfo XML file:
"...
<GPFileName xmlns="https://www.novell.com/ZENworks/Policies/GP">filename.zip</GPFileName>
...
<PolicyData>...GPFileName&gt;filename.zip&lt;/GPFileName...</PolicyData>
..."

This is another specific example of preparing policy meta data for (re-)import as documented in the ZCM 11 online documentation:
Creating Policies by Using the zman Command Line Utility

Additional Information

In the above example the zip file name used to backup the actual group policy content is Standard_Users.zip.

Since the ActionContentInfo XML file of the exported group policy has been prepared with the correct Standard_Users.zip filename, the import itself has been working fine. But the group policy general XML meta data file still contains the original zip filename used by ZCC when creating/updating the group policy. It is q7yi555s40.zip.

So while the group policy and the Standard_Users.zip content file imported fine, the group policy content can not apply to any device. The reason is that the group policy meta data still instructs the ZCM agent to apply to group policy content from a file called q7yi555s40.zip, which does not exist in the content linked with the imported group policy. The linked content only contains a file called Standard_Users.zip.

Beside editing the ActionContentInfo XML file of the group policy meta data, also the policy XML itself needs to reflect to correct zip file name for the group policy content.