ZSM 7 SP1 ir3 hp3 Variables in Pre or Post scripts fail with 'ERROR - Failed processing software package'

  • 7001426
  • 06-Mar-2009
  • 30-Apr-2012

Environment

Novell ZENworks 7 Server Management Support Pack 1 - ZSM7 SP1 Tiered Electronic Distribution (TED)

Situation

Using variables in Pre or Post scripts results in failed deployment of Software Package distributions.
Error:   "ERROR - Failed processing software package"

Resolution

Fixed in ZENworks 7 Server Management Service Pack 1 Interim Release 4, see KB 3809227 "Updates to Novell ZENworks 7 Server Management" which can be found at https://www.novell.com/support

Additional Information

When using variables on other places in the package the Software Package distributions work. 
Defining the variables in the TED.CFG  or Subscriber does not resolve the symptom. 
This functionality worked in previous code. 
 
Steps to duplicate: 
  
1)  Start C1 (containing the latest ZSM snapins). 
2)  Right click "Server Software Packages"  and select "New Package".   
3)  Click Next, enter a package name (e.g. test) and a file name (test.spk; file needs to be on the server.), click on "Finish".  
4)  Right click on the package and select Properties.  Click on the "Variables"  tab. 
5)  Click on "Add"  and add a Variable: TESTVAR  and a Value: sys:/system/edit  and click on "OK"  twice.  
6)  Right click on the package and select "New Component".   Give it a name (e.g. testcomp).  
7)  Right click on the newly created component and select properties.  
8)  Select the tab "Pre-Installation" or "Post-Installation"  and select script.  
9)  Click on "Add".  Click on the right pane and enter: load %TESTVAR%  . 
10)  Click on "OK".   
11)  Right click on the package and select "Compile",  c lick "Next",  enter a filename (with .cpk and on the server), click on "Finish".  
12)  In C1 select the OU where the Distributor is.  
13)  Create a new TED Distribution.  Enter Name and the Distributor.  Also check "Define Additional properties".  
14)  Under Channel select the channel to be used.  
15)  Under the "Type"  tab select type "Software Package",  select "Add",  select the test CPK  created.  
16)  Under schedule, check both boxes and for schedule type select "Run Immediately".  
17)  Approve certificates being sent.  
18)  Right click the distributor and select "Refresh Distributor".  The packet will start being distributed.  
 
Extract from  TED.LOG :
2009.03.03 14:32:31 [TED:Extract zen:\zenworks\pds\ted\sub\<software_package_path-name>] ERROR - Failed processing software package : <software_package_name> 
2009.03.03 14:32:31 [TED:Event Processing] Handle Event: com.novell.application.zenworks.ted.event.AgentEvent@2b9406  
2009.03.03 14:32:31 [TED:Event Processing] *** Exception: com.novell.application.servman.services.softwarepackage.PackageProcessorException: script process. Component : component2  
2009.03.03 14:32:31 [TED:Event Processing] com.novell.application.servman.services.softwarepackage.PackageProcessorException: script process. Component : component2  
at com.novell.application.servman.services.softwarepackage.PackageProcessor.ProcessComponent(PackageProcessor.java:1250)  
at com.novell.application.servman.services.softwarepackage.PackageProcessor.Process(PackageProcessor.java:654)  
at com.novell.application.servman.services.softwarepackage.PackageProcessor.process(PackageProcessor.java:215)  
at com.novell.application.servman.plugins.SoftwarePackagePlugin.processPackage(SoftwarePackagePlugin.java:653)  
at com.novell.application.zenworks.ted.agents.cpk.CPKAgent$ExtractAgent.processCPK(CPKAgent.java:1263)  
at com.novell.application.zenworks.ted.agents.cpk.CPKAgent$ExtractAgent.extractDistribution(CPKAgent.java:1163)  
at com.novell.application.zenworks.ted.agents.ReceiverAgentThread.runAgent(ReceiverAgentThread.java:104)  
at com.novell.application.zenworks.ted.agents.AgentThread.run(AgentThread.java:108)  

2009.03.03 14:32:31 [TED:Event Processing] Extract <software_package_path-name> stopped with error: script process. Component : component2  
2009.03.03 14:32:31 [TED:xxx.xxx.xxx.xxx] xxx.xxx.xxx.xxx: Workorder proceeding.  
2009.03.03 14:32:31 [TED:Event Processing] Handle Event: Work order OUT completed... Agent Reply: Distribution = <software_package_name, number>, Status = "Error" Message = "The extraction failed due to the following error: script process. Component : component2" 
2009.03.03 14:32:31 [TED:Event Processing] Agent Reply: Distribution = <software_package_name, number>, Status = "Error" Message = "The extraction failed due to the following error: script process. Component : component2" was sent successfully to <Subscriber_server>