Switchover and Failover
Switchover and failover operations are handled by the scripts nmshaswitchover and nms-ha-failover, respectively. These scripts are run at the NMS site that is to become primary. They require prior configuration by the nms‑haconfig script. Configuration is stored in the $NMS_HOME/etc/nms_sites.cfg file and the credentials necessary to use Oracle Data Guard are stored in the Oracle Wallet.
nms-ha-switchover
nms‑ha‑switchover performs a Switchover operation. It is run from the command line on the NMS site which is to become primary. After validating that NMS and the database are ready for a switchover, it performs the following actions:
1. Stop NMS Services and WebLogic at the current primary site.
2. Perform an Oracle Data Guard Switchover to make the database corresponding to the site where this script runs Primary.
3. Run nms‑sync‑site to sync NMS Services $OPERATIONS_MODELS directory files from the current primary site to this site.
4. Update the NMS database to mark the current site as primary.
5. Start NMS Services and WebLogic.
Note: Run nms‑ha‑switchover ‑h for full usage information.
nms‑ha‑failover
nms‑ha‑failover performs a hard Failover operation – where hard implies there may or may not be any available communication to the original NMS site we are failing over from. Unlike switchover, Failover does not reverse RDBMS replication. It is run from the command line on the NMS site that is to become primary. After NMS and the database are ready for a failover, it performs the following actions.
1. Perform an Oracle Data Guard Failover to make the database corresponding to the site where this script runs Primary.
2. Run nms-sync-site to sync NMS Services $OPERATIONS_MODELS directory files from the current primary site if possible.
3. Update the NMS database to mark the current site as primary.
4. Start NMS Services and WebLogic.
Note: Run nms-ha-failover -h for full usage information.
nms‑ha‑config
nms‑ha‑config creates or updates the configuration necessary to run the nms‑ha‑switchover and nms‑ha‑failover scripts. It has several subcommands; run nms‑ha‑config -h for a script overview or nms‑ha‑config <subcommand> ‑h for the details of each subcommand. For initial high availability configuration, run nms‑ha‑config init to generate $NMS_HOME/etc/nms_sites.cfg and local entries in the Oracle Wallet. Then copy this file to each NMS environment at each NMS site and run the following command on each environment to add entries to the Oracle Wallet:
nms-ha-config update --wallet $NMS_SITE_NAME
nms‑ha‑config init
usage: nms‑ha‑config [-h] [--connect CONNECT]
Perform initial high availability configuration. This prompts for the following information and saves the configuration to the file $NMS_HOME/etc/nms_sites.cfg.
1. Password for the Oracle Wallet.
2. Static Connect Identifier to connect to Oracle RDBMS Data Guard.
3. Login for database user.
4. Password for database user.
5. Hostname where NMS Services run.
6. Database name and NMS Services hostname for additional NMS sites.
Options
-h, --help: show this help message and exit.
--connect: CONNECT Data Guard static connect identifier
nms-ha-config add
usage: nms-ha-config add [-h] site
Add a new NMS site to configuration. This prompts for the hostname where NMS Services run positional arguments:
site: Name of site to add
Options
-h--help: show this help message and exit.
nms-ha-config update
usage: nms-ha-config update [-h] [--hostname HOSTNAME] [--dbname DBNAME] [--connect CONNECT] [--wallet] site
Update configuration for an NMS site already in config file.
The values for the passed in parameters will be changed. If the --wallet parameter is used, then you will be prompted to update the information in the Oracle Wallet.
positional arguments
site: Site to update
Options
-h, --help: show this help message and exit.
--hostname HOSTNAME: Hostname for NMS services
--dbname DBNAME: Database name in Data Guard configuration
--connect CONNECT: Data Guard static connect identifier
--wallet: Update Oracle wallet
nms-ha-config remove
usage: nms-ha-config remove [-h] site [site ...]
Remove an NMS site from configuration positional arguments:
site: Site to remove
options
-h--help: show this help message and exit.