JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Cluster Geographic Edition System Administration Guide     Oracle Solaris Cluster 3.3 3/13
search filter icon
search icon

Document Information

Preface

1.  Introduction to Administering the Geographic Edition Software

2.  Before You Begin

3.  Administering the Geographic Edition Infrastructure

4.  Administering Access and Security

5.  Administering Cluster Partnerships

6.  Administering Heartbeats

7.  Administering Protection Groups

8.  Monitoring and Validating the Geographic Edition Software

9.  Customizing Switchover and Takeover Actions

Creating a Role-Change Action Script

Configuring a Protection Group to Run a Script at Switchover or Takeover

How to Configure a Protection Group to Run a Script at Switchover or Takeover

10.  Script-Based Plug-Ins

A.  Standard Geographic Edition Properties

B.  Legal Names and Values of Geographic Edition Entities

C.  Disaster Recovery Administration Example

D.  Takeover Postconditions

E.  Troubleshooting Geographic Edition Software

F.  Deployment Example: Replicating Data With MySQL

G.  Error Return Codes for Script-Based Plug-Ins

Index

Configuring a Protection Group to Run a Script at Switchover or Takeover

After you have created a script, you must configure the protection group to run the script when a switchover or takeover occurs. If a switchover or takeover occurs, the script runs on the cluster that is becoming the new primary cluster.

How to Configure a Protection Group to Run a Script at Switchover or Takeover

  1. Become superuser or assume a role that is assigned the Geo Management RBAC rights profile.

    For more information about RBAC, see Geographic Edition Software and RBAC.


    Note - If you use a role with Geo Management RBAC rights, ensure that the /var/cluster/geo ACLs are correct on each node of both partner clusters. If necessary, become superuser on the cluster node and set the correct ACLs.

    # chmod A+user:username:rwx:allow /var/cluster/geo

    The /var/cluster/geo directory must have the correct access control lists (ACL) applied for compatibility between the Geo Management RBAC rights profile and Oracle Data Guard.


  2. Configure the RoleChange_ActionCmd and RoleChange_ActionArgs properties of the protection group.
    # geopg set-prop -p RoleChange_ActionCmd=fullyqualifiedscript -p RoleChange_ActionArgs=scriptarguments
    -p propertysetting

    Specifies the properties of the protection group.

    Specify the path to the command by using the RoleChange_ActionCmd property. This path should be valid on all nodes of all partner clusters that can host the protection group.

    Define the arguments that you want to append to the command line when the action command is run by using the RoleChange_ActionArgs property.

    For more information about the properties you can set, see Appendix A, Standard Geographic Edition Properties.

    protectiongroupname

    Specifies the name of the protection group.

Example 9-2 Configuring a Protection Group to Run a Command at Cluster Switchover or Takeover

This example configures a protection group to run a custom command called newDNS.

# geopg set-prop -p RoleChange_ActionCmd=/usr/bin/newDNS \
-p RoleChange_ActionArgs=domain=companyx.com,ip=1.2.3.4 avspg