16.6 PSE cluster Configuration Scripts

This section describes the following scripts used during the installation or postinstallation process:

16.6.1 Running the modify_services Script

As part of the configuration process, the PSE Database editor creates the pse_modify_services script and places it in the /var/adm/PSE/scripts directory. You must be able to issue the rsh command as superuser (root) to the NIS master machine.

This script connects to the Network Information Service (NIS) master server for the services map, adding the PSE cluster name and service port. The service port is derived from the PSE_SERVICEPORT number. This script file adds the new PSE cluster entry to the /var/yp/src/services file using the port you assigned it in the editing session. Once the services file is updated, the make utility is invoked to compile the file on the NIS master server.

Before executing the script, always review it. For example:

rsh nismastername.xyz.abc.qwe.com -l root \
\(cd /var/yp/src\; \
cp services services.sav\; \
sed -e '/^mycluster/d' services.sav \>services\; \
echo '"mycluster 6666/tcp"' \>\> services\; \
echo '"mycluster 6666/udp"' \>\> services\; \
cd .. \; \
make\; \
\)

Review the following items in the modify_services script before running it:

  1. Ensure that the NIS master server node is correct.
  2. Ensure that the services source file is in the /var/yp/src/services directory. Servers running an operating system other that Digital UNIX might put the services file in another directory.
  3. Ensure that the IP port number is unique (the PSE Database editor checks this parameter during the editing session).

Example 16-4 shows the text of the modify_services script.

Example 16-4 modify_services Script

# pwd <Return>
/var/adm/PSE/pse-remote-install
# cd ../scripts <Return>
# ls <Return>
mycluster_configure_nodes  mycluster_modify_services  mycluster_todo_list
# cat mycluster_modify_services <Return>

#!/bin/sh

rsh hoods.xyz.abc.qwe.com -l root -n \
    \(cd /var/yp/src\; \
      cp services services.sav\; \
      sed -e '/^mycluster/d' services.sav \>services\; \
      echo '"mycluster 6666/tcp"' \>\> services\; \
      echo '"mycluster 6666/udp"' \>\> services\; \
      cd .. \; \
      make services\; \
    \)

#

16.6.2 Running the configure_nodes Script

The pse_configure_nodes script runs the pseconfig facility on each machine (PSE cluster member) you defined for the PSE cluster. The pseconfig facility adds (or deletes) a PSE cluster domain to a node.

Example 16-5 shows the text of the configure_nodes script.

Example 16-5 configure_nodes Script

# cat pse_mycluster_configure_nodes <Return>
#!/bin/sh

echo "Configuring node machine1.xyz.abc.qwe.com. ..."
  rsh mach1.xyz.abc.com. -l root -n /usr/sbin/pseconfig add mycluster
echo Done.
#