Customizing The Translation Syntax For Converting Load And Unload Scripts - Novell OPEN ENTERPRISE SERVER 2 SP 2 - CLUSTER SERVICES 1.8.7 FOR LINUX Manual

Table of Contents

Advertisement

6.7 Customizing the Translation Syntax for
Converting Load and Unload Scripts
The syntax for load and unload scripts differs for NetWare and Linux platforms. A script that is valid
for the NetWare platform is not necessarily recognized on the OES 2 Linux platform. In a mixed-
platform cluster, a cluster resource's load script and unload script must be translated to use the
proper syntax when running on the NetWare or Linux nodes. Translation occurs in-memory while
the cluster contains mixed-platform nodes, and during the final cluster conversion of the cluster
from NetWare to Linux.
The translation between NetWare and Linux versions of the load and unload scripts is performed by
the Cluster Translation Library script (
translations in the library are described in
Mixed NetWare and Linux Clusters," on page
unload scripts are not part of the translation library, the cluster resource can end up in a comatose
state.
Beginning in OES 2 SP2, Novell Cluster Services allows you to customize the translation syntax
that is used for load and unload scripts in mixed-platform situations by defining new syntax
translations in the
/var/opt/novell/ncs/customized_translation_syntax
create. The
clstrlib.py
processes them in addition to the normal translations in the Cluster Translation Library.
The customized translation supports using Python regular expressions to search for strings (
digits (
), and other data types. The search is case insensitive.
(\d+)
NOTE: Refer to information about Python regular expressions to learn how to create searches for
other data types.
In a text editor, create the
syntax that you need, then copy the file to the
node in the mixed-platform cluster.
The syntax file should contain a four-line command for each type of translation you want to add:
<R|D>
search_string
[replacement_data]
[preceding_data]
You can have any number of the four-line commands in the file. Use the following guidelines for
creating the syntax translation commands:
Line
<R|D>
search_string
[replacement_data]
/opt/novell/ncs/bin/clstrlib.py
Section 6.6, "Translation of Cluster Resource Scripts for
82. If the commands in cluster resource's load or
script reads the additional translation syntax from the syntax file, and
customized_translation_syntax
/var/opt/novell/ncs/ directory
Description
Specify whether to replace (R) all matches or to delete (D) all matches of
the data type you are looking for in the load or unload script.
Specify the search string that is used to locate a line in the scripts.
Specify the replacement data used to replace a line matched by the
search performed.
Leave this line empty if there is no replacement.
). The normal
file with the additional translation
Converting NetWare 6.5 Clusters to OES 2 Linux
file that you
),
(\S+)
on each Linux
87

Advertisement

Table of Contents
loading

Table of Contents