Question:
I am creating a virtual machine with two real machines: Linux_Blue and Linux_Green. The real machines were added in the order I wanted them to be executed but the machine definition has reordered the machines.
[[email protected] autouser.SP1]# jil
jil>>1> insert_machine: virtual_machine
jil>>2> machine: Linux_Blue
jil>>3> machine: Linux_Green
jil>>4> exit
[[email protected] autouser.SP1]# autorep -M virtual_machine -q
/* ----------------- virt ----------------- */
insert_machine: virtual_machine
type: v
machine: Linux_Green
factor: ----
machine: Linux_Blue
factor: ----
How can I be certain that Linux_Blue is the first machine called for execution?
Answer:
You can ensure that Linux_Blue will be the first agent called for execution by using the factor attribute. If you do not set the factor attribute for each machine, the default order is alphabetical. If you want Linux_Blue to be the first machine in the definition, set the factor attribute to 1. For the Linux_Green machine, set the factor attribute to something less than 1.
*****DEFINE THE VIRTUAL MACHINE*****
[[email protected] autouser.SP1]# jil
jil>>1> insert_machine: virtual_machine
jil>>2> machine: Linux_Blue
jil>>3> factor: 1.0
jil>>4> machine: Linux_Green
jil>>5> factor: 0.9
jil>>6> exit
*****VIEW THE MACHINE DEFINITION*****
[[email protected] autouser.SP1]# autorep -M virtual_machine -q
/* ----------------- virt ----------------- */
insert_machine: virtual_machine
type: v
machine: Linux_Green
factor: 0.90
machine: Linux_Blue
factor: 1.00
*****DEFINE A JOB*****
[[email protected] autouser.SP1]# jil
jil>>1> insert_job: test_virtual_machine
jil>>2> machine: virtual_machine
jil>>3> command: echo $AUTOSERV
jil>>4> exit
*****EXECUTE THE JOB*****
[[email protected] autouser.SP1]# sendevent -E STARTJOB -J test_virtual_machine
[[email protected] autouser.SP1]# autosyslog -e
[11/11/2015 13:08:19] CAUAJM_I_40245 EVENT: STARTJOB JOB: test_virtual_machine
[11/11/2015 13:08:28] CAUAJM_I_10208 Machine usages obtained for job <test_virtual_machine>:
[11/11/2015 13:08:28] CAUAJM_I_10258 Machine <Linux_Green > Method <CPU monitor> Available usage <0*[0.90]=0>.
[11/11/2015 13:08:28] CAUAJM_I_10258 Machine <Linux_Blue > Method <CPU monitor> Available usage <19*[1.00]=19>.
[11/11/2015 13:08:28] CAUAJM_I_10209 Machine <Linux_Blue > selected for job <test_virtual_machine>.
[11/11/2015 13:08:31] CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: STARTING JOB: test_virtual_machine MACHINE: Linux_Blue
[11/11/2015 13:08:33] CAUAJM_I_10082 [Linux_Blue connected for test_virtual_machine 101.2.1]
[11/11/2015 13:08:40] CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: RUNNING JOB: test_virtual_machine MACHINE: Linux_Blue
[11/11/2015 13:08:41] <Executing at WA_AGENT>
[11/11/2015 13:08:44] CAUAJM_I_40245 EVENT: CHANGE_STATUS STATUS: SUCCESS JOB: test_virtual_machine MACHINE: Linux_Blue EXITCODE: 0
Additional Information:
Visit the CA Workload Automation AE & Workload Control Center DocOps Space for more information about configuring and monitoring these applications.