AutoSys Workload Automation

 View Only

 Refresh external instance with local job statuses

Br1ce's profile image
Br1ce posted Dec 06, 2024 08:11 AM

Hello,

We have just migrated a significant number of jobs (+/-3500 jobs) from a local Autosys instance to an external Autosys instance. Both instances are configured to work as cross-instances. 
The cross-instance conditions are almost working as expected : The statuses of the external jobs that haven't run since the migration are not known from the other Autosys instance. 

For example:

Local instance AE1
Remote instance AE2

We load this jil now on the instance AE2 : 

insert_job: TEST-BOX job_type: BOX
owner: autosys

insert_job: TEST-BOX-J1   job_type: CMD
box_name: TEST-BOX
command: echo test
machine: localhost
owner: autosys
permission:
condition: s(ANOTHERJOB^AE1)
date_conditions: 0
std_out_file: "/blablabla/out/${AUTO_JOB_NAME}_${AUTORUN}.std"
std_err_file: "/blablabla/out/${AUTO_JOB_NAME}_${AUTORUN}.err"
alarm_if_fail: 0
alarm_if_terminated: 0


On the instance AE1, ANOTHERJOB has been in SUCCESS for a while but it hasn't run after the creation of TEST-BOX-J1 on AE2. If we force start TEST-BOX, the job TEST-BOX-J1 won't start even if ANOTHERJOB^AE1 is on SUCCESS, because the status is not known from the AE2 instance. 
A new successful run of ANOTHERJOB^AE1 triggers TEST-BOX-J1. 

Do you know if there's a way to make the remote instance know the status of ANOTHERJOB without making a local sendevent -E CHANGE_STATUS -s SUCCESS that might trigger other local jobs ?

Thank you

Venkateswarlu Dondapati's profile image
Broadcom Employee Venkateswarlu Dondapati

Job status of external instance (AE1) is maintained in the AE2 database( table: ujo_ext_job)

The status of the external job(ANOTHERJOB^AE1) in AE2 database is not available after the migration of TEST-BOX-J1, until ANOTHERJOB in AE1 is run at least once after migration.

So, for the job: TEST-BOX-J1 from AE2 to run naturally, AE1 scheduler should notify AE2 scheduler on the status of job: ANOTHERJOB^AE1.

To see if the AE2's database was populated with the status of job: ANOTHERJOB^AE1, below query result from AE2 database are useful: 
select status from ujo_ext_job where ext_autoserv='AE1' and ext_job_name='ANOTHERJOB' 

If the above query returns zero results, then for the job: TEST-BOX-J1 from AE2 to run forcefully, 
either 
a. We should issue a force start job to TEST-BOX-J1 in AE2
or
b. We should manually populate ujo_ext_job in the AE2 database with the same status of ANOTHERJOB from the AE1 database, before starting your TEST-BOX.

You may want to raise the support case to populate the ujo_ext_job manually

Thanks

Venkat D, Broadcom Engineering