wdx.loc(5) — Macro Packages and Conventions
Name
wdx.loc - DECwatchdog/Autopilot local file
Description
1 copy of this file is required on each member of the mission.
File characteristics are:
•all configuration files consist of ASCII text entries,
•a text editor is required for their update,
•a new line is used to delimit each entry,
•A null entry consists of an empty line,
•comments begin with #.
Applications are managed using command files which are triggered by DECwatchdog/Autopilot when it detects changes in the mission. These command files are defined by the user. They are in the form of shell scripts for ULTRIX and OSF/1 Systems, DCL command procedure files for OpenVMS, and executable and batch command files for Windows NT.
Command files
Triggering
Script_name condition Triggered_on
MASTERSCRIPT Slaves no Master
longer
available for
the mission.
SLAVESCRIPT When it becomes Slave
the Master.
SATELLITESCRIPT Master failure Satellite
or Master has
changed.
SHUTDOWNSCRIPT Operator All members
command "wdx
[mission]
shutdown".
SHUTDOWNSCRIPT Two Masters are Oldest Master
detected for
the mission.
EVENTSCRIPT State All members
transition
for members,
networks and
resources.
EVENTSCRIPTs are triggered only when the corresponding transition events are validated in the local file (see DECwatchdog/Autopilot Software User’s Guide Chapter 4).
Version and Date line
The obligatory format keyword value for "VERSION" is:
VERSION X.Y
where X and Y represent 1 number.
The format for "DATE" is a zone of up to 20 characters:
DATE dd-mmm-yyyy
The VERSION line must be the same on all the members of the mission.
Script Files Path Name Entries
The format of "script file path name" line is:
name value
where:
•name can be one of:
•
MASTERSCRIPT,
•
SLAVESCRIPT,
•
SATELLITESCRIPT,
•
SHUTDOWNSCRIPT,
•
EVENTSCRIPT.
•value is the script file path name.
The full path name must be given for the scripts, which can be located anywhere. There is no default directory for the scripts.
An erroneous path given for a script is transparent for the watchdog, which will not generate any error during triggering attempt. However, error messages will be reported by the operating system.
Transition line
The transition line is used to enable or disable the EVENTSCRIPT activation for a specific event.
By default all the possible events triggered in the EVENTSCRIPT are enabled. When you want to disable an event, replace the "YES" value by "NO". For example, to disable the EVENTSCRIPT activation for the NETWORK events,
change the values in the local file as follows:
NETWORK_UNKNOWN_TO_ON NO
NETWORK_UNKNOWN_TO_OFF NO
NETWORK_ON_TO_OFF NO
NETWORK_ON_TO_UNKNOWN NO
NETWORK_OFF_TO_UNKNOWN NO
NETWORK_OFF_TO_ON NO
MASTERSCRIPT
MASTERSCRIPT is the name of the script triggered on the Master when it detects that Slaves are no longer available for the mission.
No argument is passed to this script.
Sample scripts are shown in the appendices.
SLAVESCRIPT
SLAVESCRIPT is the name of the script triggered on the Slave that becomes the new Master after Master failure.
No argument is passed to this script.
Sample scripts are shown in the appendices.
SATELLITESCRIPT
SATELLITESCRIPT is the name of the script triggered on a Satellite when the wdx process detects one of the following conditions:
1no valid message received from Master through any configured interface (up to two),
2
The Master has changed.
One argument is passed to the script to indicate the reason for the shutdown:
•MASTERDISAPPEARENCE: when the Master has failed,
•MASTERCHANGE: when the Master has changed.
SHUTDOWNSCRIPT
SHUTDOWNSCRIPT is the name of the script triggered on all members of the wdx mission with the operator interface command "wdx [mission] shutdown". Member states are not affected by this script activation.
It is also triggered on the oldest Master if two Masters are running (after a disaster), and the oldest Master becomes Slave.
One argument is passed to the script to indicate the reason for the shutdown:
•OPERATOR: "wdx [mission] shutdown" has been entered,
•DOUBLEMASTER: double Master has been detected.
EVENTSCRIPT
EVENTSCRIPT is the name of the script triggered when a state transition has been detected.
The EVENTSCRIPT is triggered on an event only if the corresponding "TRANSITION LINE" is enabled.
The syntax is as follows:
eventscript keyword [arguments...]
The first argument is a keyword indicating the kind of transition reported. Depending on the value of the first argument, the script will be able to parse the other arguments (if any). The first argument can take one of the following values:
1MEMBER: a member state transition has been detected. The other arguments passed to the script are:
•
member_name indicates the member name that is affected by the transition,
•
old_state indicates the old state of the member that is affected by the transition,
•
new_state indicates the new state of the member that is affected by the transition.
Member states are either FAULT, IDLE, MASTER, SLAVE or SATELLITE.
2NETWORK: a network state transition has been detected. The other arguments passed to the script are:
•
member_name indicates the member name that is affected by the transition,
•
network_number indicates the network that is affected by the transition. This value is either "1" or "2". This value is issued from the mission file,
•
interface_name indicates the name of the interface on which the transition has been detected. This name is found in the mission file,
•
old_state indicates the old state of the interface that is affected by the transition,
•
new_state indicates the new state of the interface that is affected by the transition.
Network states are UNKNOWN, ON or OFF.
3RESOURCE: a resource state transition has been detected. The other arguments passed to the script are:
•
resource_name indicates the resource’s name that is affected by the transition,
•
old_state indicates the old state of the resource that is affected by the transition,
•
new_state indicates the new state of the resource that is affected by the transition,
•
initiator_name indicates the name of the transition’s initiator.
Resource states are either UNKNOWN, FREE, RESERVED, MOUNTED or FAULT.
4MISMATCH: This indicates that the eventscript is triggered because of persistent owner duplication for a resource.
•
resource_name indicates the
name of the resource that is affected by the mismatch.
•
owner_name indicates the name of the
resource’s owner which should release its lock.
Sample scripts are shown in the appendices.
Example
##########################################################################
#
# DECwatchdog/Autopilot V2.1
#
# Local file for DECwatchdog/Autopilot
#
##########################################################################
#-------------------------------------------------------------------------
# Format :
# VERSION value
# DATE value
#-------------------------------------------------------------------------
VERSION 2.1
DATE 20-May-1994
#-------------------------------------------------------------------------
# Script parameters are local parameters. They can be different on each
# member in the mission.
# Format :
# name value
#-------------------------------------------------------------------------
SLAVESCRIPT /var/wdx/wdx.slavescript
MASTERSCRIPT /var/wdx/wdx.masterscript
SATELLITESCRIPT /var/wdx/wdx.satellitescript
SHUTDOWNSCRIPT /var/wdx/wdx.shutdownscript
EVENTSCRIPT /var/wdx/wdx.eventscript
#-------------------------------------------------------------------------
# Transition parameters are local parameters. They can be different on each
# member in the mission.
# Format :
# name value
#-------------------------------------------------------------------------
NETWORK_UNKNOWN_TO_ON YES
NETWORK_UNKNOWN_TO_OFF YES
NETWORK_ON_TO_OFF YES
NETWORK_ON_TO_UNKNOWN YES
NETWORK_OFF_TO_UNKNOWN YES
NETWORK_OFF_TO_ON YES
MEMBER_FAULT_TO_IDLE NO
MEMBER_FAULT_TO_MASTER NO
MEMBER_FAULT_TO_SLAVE NO
MEMBER_FAULT_TO_SATELLITE NO
MEMBER_IDLE_TO_FAULT NO
MEMBER_IDLE_TO_MASTER NO
MEMBER_IDLE_TO_SLAVE NO
MEMBER_IDLE_TO_SATELLITE NO
MEMBER_MASTER_TO_FAULT NO
MEMBER_MASTER_TO_IDLE NO
MEMBER_MASTER_TO_SLAVE NO
MEMBER_MASTER_TO_SATELLITE NO
MEMBER_SLAVE_TO_FAULT NO
MEMBER_SLAVE_TO_IDLE NO
MEMBER_SLAVE_TO_MASTER NO
MEMBER_SLAVE_TO_SATELLITE NO
MEMBER_SATELLITE_TO_FAULT NO
MEMBER_SATELLITE_TO_IDLE NO
MEMBER_SATELLITE_TO_MASTER NO
MEMBER_SATELLITE_TO_SLAVE NO
RESOURCE_UNKNOWN_TO_UNKNOWN YES
RESOURCE_UNKNOWN_TO_FREE YES
RESOURCE_UNKNOWN_TO_RESERVED YES
RESOURCE_UNKNOWN_TO_MOUNTED YES
RESOURCE_UNKNOWN_TO_FAULT YES
RESOURCE_FREE_TO_UNKNOWN YES
RESOURCE_FREE_TO_FREE YES
RESOURCE_FREE_TO_RESERVED YES
RESOURCE_FREE_TO_MOUNTED YES
RESOURCE_FREE_TO_FAULT YES
RESOURCE_RESERVED_TO_UNKNOWN YES
RESOURCE_RESERVED_TO_FREE YES
RESOURCE_RESERVED_TO_RESERVED YES
RESOURCE_RESERVED_TO_MOUNTED YES
RESOURCE_RESERVED_TO_FAULT YES
RESOURCE_MOUNTED_TO_UNKNOWN YES
RESOURCE_MOUNTED_TO_FREE YES
RESOURCE_MOUNTED_TO_RESERVED YES
RESOURCE_MOUNTED_TO_MOUNTED YES
RESOURCE_MOUNTED_TO_FAULT YES
RESOURCE_FAULT_TO_UNKNOWN YES
RESOURCE_FAULT_TO_FREE YES
RESOURCE_FAULT_TO_RESERVED YES
RESOURCE_FAULT_TO_MOUNTED YES
RESOURCE_FAULT_TO_FAULT YES
MISMATCH YES
See Also
DECwatchdog/Autopilot Software User’s Guide