REGISTER_VARIABLE and PUBLISH don't work in HOSTG mode ALL

Document ID : KB000084955
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
U01001308 Variable 'HOSTNAME#' has not yet been defined.

If using a Host Group (HOSTG) in mode ALL, the REGISTER_VARIABLE and PUBLISH commands do not publish into a JOBP.

Investigation

1. Create a UNIX job with the following: 

 
Attributes: 
Create a HOSTG with 1 Unix Agent. 
Process Tab: 
:register_variable job_name#,&$NAME# 
:register_variable node#,&$AGENT# 
:register_variable HOSTNAME#,$HOSTNAME 
Post Process Tab: 
:publish &HOSTNAME#,HOSTNAME#,TOP 

2. Create a Script: 
:p &HOSTNAME# 

3. Create a JOBP: 
a. Unix JOB 
b. SCRI 

Results

HOSTG Mode All: 
Workflow will show value N. 
WorkflowPar will show the job itself. 
Hostname will not be published. 
Scri will fail with variable not defined. 

HOSTG Mode Any: 
Workflow will show value Y. 
WorkflowPar will show the workflow. 
Hostname will be published. 
Variable will be successful. 
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: This appears to be due to the C_HOSTG container.
Resolution:
Update to a fix version listed below or a newer version if available.

Released versions are available for download at the Automic-Support-Zone (https://support.automic.com).

Hotfix-Description: PSET and PUBLISH do not work for agentgroups with mode ALL

An error has been fixed where the script commands PSET and PUBLISH did not work if used in a job started with an agent-group with mode ALL. The value has not been published to the agent-group container


Fix Status: Released

Fix Version(s):
Component(s): Automation Engine

Automation Engine 12.1.0 - Available
Automation Engine 12.0.2 - Available
Automation Engine 11.2.5 - Available
Additional Information:
Workaround :
Do not use mode ALL.