A.8 ncs_install.py Script (Extending the Schema, Monitoring NDSD, or Removing NCS Configuration)

You can use the /opt/novell/ncs/install/ncs_install.py script to extend the eDirectory schema in a tree for cluster objects or to monitor the eDirectory daemon on a node.

A.8.1 Extending the Schema

You can extend the eDirectory schema for cluster objects before OES Cluster Services is installed for the first time in the tree. This allows an eDirectory tree administrator to expand the schema, and a container administrator to install the software. The schema needs to be expanded only one time in the tree. See Section 5.2, Extending the eDirectory Schema to Add Cluster Objects.

After you run the script, the schema includes the Cluster object container and the following types of objects in it:

  • Cluster Node objects

  • Cluster Resource objects

  • Cluster Template objects

  • Volume Resource objects

Syntax

Run the following command as the root user:

/opt/novell/ncs/install/ncs_install.py -e -f <configuration_filename>

Options

-e

Expand a specified eDirectory schema to add cluster objects. Use with the -f option to specify a file that contains information about the LDAP server where the schema is stored.

-f <configuration_file_name>

Use with the -e option to specify information about the LDAP server where the schema to be expanded is stored.

In a text editor, create a text file, specify the configuration information for the OES Cluster Services cluster in it, then save the file. This file contains a password in clear text. For security reasons, ensure that you delete the file when you are done.

The following lines are an example of the content of a file, with sample values. The directives are self-explanatory.

IMPORTANT:Ensure that you change the values inside the quotation marks to the actual settings for your cluster.

CONFIG_NCS_LDAP_IP="10.1.1.102"
CONFIG_NCS_LDAP_PORT="636"
CONFIG_NCS_ADMIN_DN="cn=admin.o=context"
CONFIG_NCS_ADMIN_PASSWORD="password"

Example

Create a configuration file on the server desktop and name it mytree_ncs_schema.txt. Open a terminal console on the server where you created the configuration file, then enter the following commands as the root user:

mkdir -p /var/opt/novell/install

/opt/novell/ncs/install/ncs_install.py -e -f /root/Desktop/mytree_ncs_schema.txt

A.8.2 Monitoring NDSD

You can monitor the status of the eDirectory daemon (ndsd) at the NCS level. It is disabled by default. The monitoring  can be set independently on each node. On a node, if the eDirectory daemon does not respond to a status request within a specified timeout period, NCS can take one of three configurable remedy actions: an ndsd restart, a graceful node restart, or a hard node restart. See Section 8.8, Configuring NCS to Monitor the eDirectory Daemon (ndsd).

Syntax

/opt/novell/ncs/install/ncs_install.py 
  -m <display|disable|restart-ndsd|reboot-node|hard-reboot|help> 
  [-i <interval_value>] 
  [-t <timeout_value>]]

The settings apply to an individual node. Different nodes can have different settings.

The settings take effect immediately. You do not need to start or restart any services.

Options

-m <display|disable|restart-ndsd|reboot-node|hard-reboot|help>

Monitor the eDirectory daemon (ndsd) status on this node. Use this option with the -i and -t options.

display

Display the current settings for monitoring of the eDirectory ndsd daemon on this node.

disable

Turn off the monitoring of the eDirectory ndsd daemon on this node.

restart-ndsd

Enable monitoring of the eDirectory ndsd daemon on this node and set a remedy action of a restart for the eDirectory ndsd daemon.

reboot-node

Enable monitoring of the eDirectory ndsd daemon on this node and set a remedy action of a graceful restart for the node.

hard-reboot

Enable monitoring of the eDirectory ndsd daemon on this node and set a remedy action of a hard restart for the node.

help

Display the usage information for the -m option.

-i <interval_value>

Specify the interval of time in seconds to check the status of ndsd on this node. The minimum interval is 16 seconds. Use this option with the -m and -t options.

-t <timeout_value>

Specify a timeout value in seconds to wait for a response from ndsd before enforcing the configured remedy action. The minimum timeout is 8 seconds. Use this option with the -m and -i options.

Examples

Example 1: Display current settings for ndsd monitoring.

# /opt/novell/ncs/install/ncs_install.py -m display
NDSD monitoring is enabled.
interval = 90 seconds, timeout = 20 seconds and remedy action is reboot node hard.

Example 2: Enable ndsd monitoring with an interval of 60 seconds, timeout of 15 seconds, and remedy action of rebooting gracefully.

# /opt/novell/ncs/install/ncs_install.py -m reboot-node -i 60 -t 15
NDSD monitoring is enabled.
interval = 60 seconds, timeout = 15 seconds and remedy action is reboot node.

Example 3: Change the remedy action to restart ndsd.

# /opt/novell/ncs/install/ncs_install.py -m restart-ndsd -i 60 -t 15
NDSD monitoring is enabled.
interval = 60 seconds, timeout = 15 seconds and remedy action is restart ndsd.

Example 4: Disable ndsd monitoring.

# /opt/novell/ncs/install/ncs_install.py -m disable
NDSD monitoring is not enabled (3).

Example 5: View usage for ndsd monitoring.

# /opt/novell/ncs/install/ncs_install.py -m help
Usage: /opt/novell/ncs/install/ncs_install.py -m display|disable|restart-ndsd|reboot-node|hard-reboot|help [-i interval_value] [-t timeout_value]
  -m display: Display the current NDSD monitoring settings
  -m disable: Disable NDSD monitoring
  -m restart-ndsd: Enable NDSD monitoring and set remedy action to restarting NDSD
  -m reboot-node: Enable NDSD monitoring and set remedy action to rebooting node
  -m hard-reboot: Enable NDSD monitoring and set remedy action to rebooting node hard
  -m help: Print this help page
  -i interval_value: Specify in seconds how frequently the monitor process checks NDSD
  -t timeout_value: Specify in seconds how long the monitor process waits for the checking operation
NDSD monitoring is not enabled (1).

A.8.3 Removing NCS Configuration

You can use the /opt/novell/ncs/install/ncs_install.py -r script to remove cluster configuration information from a node to return it to a pre-configured state. This is useful for the following scenarios:

  • If the OES Cluster Services configuration is unsuccessful, you might have a partial configuration that prevents you from properly configuring the node for a cluster.

  • You want to move a node from one cluster to another cluster.

After you remove the cluster configuration information, you can start over with the configuration of OES Cluster Services on the node as described in Section 5.5, Configuring OES Cluster Services.

Syntax

You must stop NCS (rcnovell-ncs stop or systemctl stop novell-ncs.service) before you run the command. Run the command as the root user.

/opt/novell/ncs/install/ncs_install.py -r [-f <configuration_file_name>]

Without the -f option or applicable variables in the configuration file, /opt/novell/ncs/install/ncs_install.py prompts you to enter needed information.

You can check the return code ($?) of the command to see if the command is successful. Detailed log information is appended to /var/opt/novell/install/ncslog.

Options

-r

Clean up an unsuccessful OES Cluster Services configuration on a node, or remove the configuration information so that you can move a node from one cluster to another.

-f <configuration_file_name>

Use with the -r option to specify credentials for the node with the unsuccessful OES Cluster Services configuration.

In a text editor, create a text file, specify the credentials for the OES Cluster Services cluster in it, and then save the file. This file contains a password in clear text. For security reasons, ensure that you delete the file when you are done.

The following lines are an example of the content of a file, with sample values. The directives are self-explanatory.

IMPORTANT:Ensure that you change the values inside the quotation marks to the actual settings for your cluster.

CONFIG_NCS_CLUSTER_DN="cn=clus1,ou=ncs,o=novell"
CONFIG_NCS_ADMIN_DN="cn=admin.o=novell"
CONFIG_NCS_ADMIN_PASSWORD="password"

Example

A cluster configuration process failed. You must remove the unsuccessful OES Cluster Services configuration information from the node before you can re-try the configuration.

  1. Open a terminal console as the root user.

  2. Stop OES Cluster Services if it is running.

    rcnovell-ncs stop

    or

    systemctl stop novell-ncs.service
  3. Do either of the following:

    • In a text editor, create a configuration file on the server desktop, add the cluster credentials, and save the file as my_cluster_credentials.conf.

      At the command prompt, enter

      /opt/novell/ncs/install/ncs_install.py -r -f /root/Desktop/my_cluster_credentials.conf
    • At the command prompt, enter the command, then reply with the credentials when you are prompted:

      # /opt/novell/ncs/install/ncs_install.py -r
      Please enter the DN for the admin (cn=admin,o=novell):
      please enter the password for cn=admin,o=novell:
  4. Check the return code to see if the command is successful:

    $?
  5. After the successful removal of the cluster configuration information, you can configure OES Cluster Services on the node as described in Section 5.5, Configuring OES Cluster Services.