Enabling automatic failover
To enable automatic failover, configure one or more backup engines, and set the related global options (workstationEventMgrListInAutomaticFailover and workstationMasterListInAutomaticFailover) using the optman command, so that when the active master becomes unavailable, a long-term switchmgr operation is triggered.
Before you begin
About this task
Procedure
- Ensure the local option, mm resolve master, in the localopts file, is set to no on both the master domain manager and on all eligible backup master domain managers.
-
Optional. Define a list of potential backups for the master domain manager and the event manager.
- Update the global option, workstationMasterListInAutomaticFailover, on the master domain manager to specify a list of workstations to be considered as eligible backups for the master domain manager. Edit the value of this option by adding a list of workstations, separated by commas, starting with your preferred choices at the top of the list. The list includes the current master domain manager. If no workstations are specified in this list, then the first backup master domain manager to detect that the master is down, performs the switch.
- Specify potential backups for the event processor by editing the value for the workstationEventMgrListInAutomaticFailover global option. Add a list of workstations, separated by commas, starting with your preferred choices at the top of the list. The list includes the current event manager workstation.
-
Set the following global options to "yes": enAutomaticFailover |
af and enAutomaticFailoverActions | aa using the optman
chg command. For example:
optman chg af=yes optman chg aa=yes
-
Restart WebSphere Application Server
Liberty
Important: Complete the remaining steps only if they are not already present in your environment.
-
If not already present on the master domain manager, create a new workstation with
the following specifications:
- Type: Extended Agent
- Access method: unixlocl
- Host: $MASTER
CPUNAME MDM_XA DESCRIPTION "Workload Scheduler Virtual Master" OS OTHER NODE mdm_xa TCPADDR 31111 FOR MAESTRO HOST $MASTER ACCESS "unixlocl" TYPE X-AGENT AUTOLINK OFF BEHINDFIREWALL OFF FULLSTATUS OFF END
-
Set the FINAL and FINALPOSTREPORTS job streams on the
master domain manager to
"draft". Draft job streams are not added to the preproduction plan.
For example, the following is an extract from the definition for the FINAL job stream:composer mod jS=FINAL composer mod js=FINALPOSTREPORTS
The following example is an extract from the definition for the FINALPOSTREPORTS job stream:SCHEDULE MDM#FINAL DESCRIPTION "Added by composer." DRAFT ON RUNCYCLE RC1 "FREQ=DAILY;" AT 2359 CARRYFORWARD FOLLOWS MDM#FINAL.SWITCHPLAN PREVIOUS :
SCHEDULE MDM#FINALPOSTREPORTS DESCRIPTION "Added by composer." DRAFT ON RUNCYCLE RC1 "FREQ=DAILY;" SCHEDTIME 2359 CARRYFORWARD FOLLOWS MDM_XA#FINAL.SWITCHPLAN PREVIOUS :
-
If not already present, make the following changes to the Sfinal
file:
-
Submit the
composer add Sfinal
command and then verify that the FINAL and FINALPOSTREPORTS job streams and the related jobs, are correctly defined on the extended agent workstation. The following is an example of the correct output:... ... ... / -add Sfinal AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#STARTAPPSERVER". AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#MAKEPLAN". AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#SWITCHPLAN". AWSJCL003I The command "add" completed successfully on object "js=MDM_XA#FINAL". AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#CHECKSYNC". AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#CREATEPOSTREPORTS". AWSJCL003I The command "add" completed successfully on object "jd=MDM_XA#UPDATESTATS". AWSJCL003I The command "add" completed successfully on object "js=MDM_XA#FINALPOSTREPORTS". AWSBIA090I For file "Sfinal": errors 0, warnings 0. AWSBIA288I Total objects updated: 8
- Compare the two copies of the FINAL and FINALPOSTREPORTS job streams and make any necessary changes to those on the extended agent workstation, for example, the job stream submit time, run cycles, or any other custom changes to personalize the schedule.
-
Submit JnextPlan with the -noremove options to update the
plan with the new extended agent workstation:
JnextPlan -for 0000 -noremove
-
If JnextPlan runs correctly, proceed to delete the FINAL and
FINALPOSTREPORTS job streams previously set to "draft" on the master domain manager.
composer del FINALPOSTREPORTS composer del FINAL
-
Delete the FINAL and FINALPOSTREPORTS job streams from the
plan as follows.
conman "canc FINALPOSTREPORTS" conman "canc FINAL"
-
Modify the new job stream definitions for the FINAL and
FINALPOSTREPORTS job streams, setting the limit to
"0":
SCHEDULE MDM_XA#FINAL DESCRIPTION "Added by composer." ON RUNCYCLE RC1 "FREQ=DAILY;" AT 2359 CARRYFORWARD FOLLOWS MDM_XA#FINAL.SWITCHPLAN PREVIOUS LIMIT 0 : MDM_XA#STARTAPPSERVER
-
Submit first the FINAL, and then the FINALPOSTREPORTS job
streams into the current plan.
conman sbs MDM_XA#FINAL conman sbs MDM_XA#FINALPOSTREPORTS
- Verify that the start time and date for the FINAL and FINALPOSTREPORTS job streams are correct by submitting the conman showschedules command.
-
Reset the value of the limit job stream keyword for the FINAL
and FINALPOSTREPORTS job streams, both in the database and in the plan.
Both job streams should be in WAITING (HOLD internal status), awaiting execution time.conman "limit MDM_XA#FINAL ;10" conman "limit MDM_XA#FINALPOSTREPORTS ;10"
- Archived plans, forecast and trial plans are stored on the master domain manager where the plans run. To make these plans available on the backup master domain manager, either store the plan in a single shared folder, or create a job that synchronizes the plans between the master domain manager and the backup master domain manager.
What to do next
After an automatic failover, if you would like to subsequently return service to the original master, you must perform a manual switch. See Manually switching the master.