To ensure efficient failover of an application, the registry of the node on which the application was taken offline and the registry of the node on which the application is brought online must be synchronized.
The Registry Replication agent synchronizes the registry of both the nodes by monitoring the designated registry keys. When an application changes the registry keys on the active cluster node, the agent logs these changes to the shared disk. When failover occurs, the agent updates the registry of the system on which the application is brought online using the logs on the shared disk. The RegRep agent provides you the option to:
■ exclude certain subkeys from being replicated.
■ mark keys for replication or exclusion, even though they do not exist when the agent is configured.
■ mark keys for replication or exclusion dynamically, even when the resource is online.
When the Registry Replication agent is started, it forks an independent process to monitor registry changes. Even if the VCS engine, HAD, dies, the process continues logging registry changes to the shared disk.
If you wish to replicate the registry of an application running on a node outside VCS, run the utility VCSRegUtil on that particular node. See the Veritas Cluster Server Administrator’s Guide for more information on VCSRegUtil utility.
Note: The Registry Replication agent runs in the context of the local system user while the HKEY_CURRENT_USER (HKCU) hive has values in the context of the current user. As the local system user account does not map to a current user account, the Registry Replication agent does not replicate the keys under the HKCU hive.
Dependency
The RegRep resource depends on the MountV resource.
Agent functions
■ online—Starts logging changes to specified registry keys to the shared disk.
■ offline—Stops logging changes to specified registry keys to the shared disk.
■ monitor—Verifies that the process that logs changes to registry keys is running.
143 VCS infrastructure and support agents
Registry Replication (RegRep) agent
State definitions
■ ONLINE—Indicates the agent is logging changes to specified registry keys to the shared disk.
■ OFFLINE—Indicates the agent is not logging changes to specified registry keys to the shared disk.
■ UNKNOWN—Indicates the agent could not determine the status of the resource.
Note: The Registry Replication agent is for failover service groups only. Do not use the agent for parallel applications or service groups.
Resource type definition
type RegRep (
static i18nstr ArgList[] = {"MountResName:MountPath", ReplicationDirectory, Keys, ExcludeKeys, ListOpenKeys, ForceRestore, RestoreLocally, DebugMonitor }
str MountResName
i18nstr ReplicationDirectory = "\\REGREP\\DEFAULT"
i18nstr Keys{}
i18nstr ExcludeKeys[]
boolean ListOpenKeys = 1 boolean ForceRestore = 1 boolean RestoreLocally = 0 int DebugMonitor = 1 )
Attribute definitions
Table 7-3 RegRep agent required attributes Required Attributes Type and
Dimension
Description
Keys string-association The list of registry keys to be monitored.
From the ‘name-value’ pair of a registry key, you must provide the name of the registry keys to be synchronized and not the value for that key.
When defining the keys, you must use the abbreviations listed in “Configuring registry keys” on page 147.
The agent also enables you to replicate a registry key without replicating the subkeys. See “Ignoring subkeys” on page 148 for instructions.
This attribute can take localized values.
Warning: Do not configure more than 63 keys for a single RegRep resource otherwise the resource will go in an
UNKNOWN state.
MountResName string-scalar The name of the MountV resource on which the Registry Replication resource depends. The MountV resource specifies the mount drive on the shared disk where the log file is created.
In case of a NetApp storage environment, this will be the name of the
NetAppSnapDrive resource.
ReplicationDirectory string-scalar The directory on the shared disk in which the registry changes are logged. The agent creates a directory with the specified name if one does not exist. Default is
"\\REGREP\\DEFAULT".
Note: This attribute can take localized values.
145 VCS infrastructure and support agents
Registry Replication (RegRep) agent
Table 7-4 RegRep agent optional attributes Optional Attributes Type and
Dimension
Description
DebugMonitor integer-scalar Defines whether debug logging is to be enabled for the executable (RegRepMonitor.exe) that monitors the registry keys. The value 0 indicates that the logging is enabled. The value 1 indicates that it is not. Default is 1.
ExcludeKeys string-vector A list of the subkeys to be excluded from replication. For more information on how the agent excludes keys, see “Excluding keys” on page 147. When defining the keys, you must use the abbreviations listed in “Configuring registry keys” on page 147.
Note: This attribute can take localized values.
ForceRestore boolean-scalar Defines the agent behavior when the registry update fails on a node where the resource is being brought online. A registry update may fail if any of the keys being updated are open.
If set to 1 and the registry update fails, the agent tries to forcibly restore the keys by:
■ backing up the configured registry keys of the node being brought online.
■ deleting the configured registry keys from the node being brought online.
■ updating the configured registry keys with the changed values.
If the update fails again, the agent reapplies the original values of the registry keys from the backup.
If set to 0, the agent does not try to forcibly update the registry when an update fails.
Default is 0.
ListOpenKeys boolean-scalar Defines whether the agent lists a set of registry keys, including keys having open handles, when a registry update fails. The list is logged to the agent log. The value 1 indicates the agent lists the registry key set. The value 0 indicates the agent does not. Default is 1.
RestoreLocally boolean-scalar Defines whether the agent restores the keys on the node if it was taken offline from the same node. For example, if the agent was taken offline from SystemA and brought online again on SystemA, this attribute determines whether the registry keys would be restored on SystemA. The value 1 indicates the agent restores the keys on the system.The value 0 indicates it does not.
Default is 0.
Table 7-4 RegRep agent optional attributes (Continued) Optional Attributes Type and
Dimension
Description
147 VCS infrastructure and support agents
Registry Replication (RegRep) agent