Genders 1.5-2 review
DownloadGenders is a static cluster configuration database used for cluster configuration management
|
|
Genders is a static cluster configuration database used for cluster configuration management. Genders is used by a variety of tools and scripts for management of large clusters.
The genders database is accessed by every node in a cluster, either through a networked file system or by replicating the database on every node of the cluster. The database describes the layout and configuration of the cluster so that tools and scripts can sense the variations of cluster nodes. By abstracting this information into a plain text file, it becomes possible to change the configuration of a cluster by modifying only one file.
The Genders package comes with a C API, Perl API, and a command-line tool named nodeattr. The APIs are available for user programs or scripts to parse and query the genders database. The APIs have been developed so that localized versions of the APIs can easily be developed on top of the base APIs.
Nodeattr, the genders query tool, can be called upon to provide a list of nodes that have a particular attribute, which can be fed into other tools or scripts. It is commonly called from configuration or system administration scripts to test whether a node has a particular characteristic before performing some operation.
The genders database has a simple format. Each line of the database contains a list of cluster nodes followed by attributes for those nodes. The cluster nodes can be listed as a comma separated list or specified in hostrange format. Each attribute listed may optionally have a value. Multiple nodes can be listed on each line separated by commas or by listing the nodes in host range format. The following is a short example genders database:
# slc cluster genders file
# '%n' substitutes nodename into value
slci,slcj,slc[0-15] eth2=e%n,cluster=slc,all
slci,slcj management
slci dhcp
slc[1-15] compute
The above example illustrates how genders might be used to describe an 18-node cluster called "slc". The nodes in this cluster are slci, slcj, and slc[0-15]. The node has two management nodes and 16 compute nodes. Each of the nodes has a management NIC with a different hostname than the primary NIC.
The management NIC's hostname is the primary hostname prefixed with an ?e?. As the comments indicate, a "%n" is used to substitue a nodename into an attribute value.
The genders database can be used in a variety of ways that can be extremely powerful for cluster configuration and management. The following lists some of the ways it is currently used:
Genders is often used as a "master list" of cluster nodes. They allow tools to quickly access every hostname in the cluster. For example, pdsh is a parallel remote shell utility. It uses genders to determine every node in a cluster for its -a and -A options.
Genders can also be used to identify a subset of cluster nodes so that they may be quickly configured or accessed.
For example, suppose an rpm package needs to be updated on the subset of cluster nodes handling I/O traffic. If the genders database lists an "iorouter" attribute for these cluster nodes, pdsh can be used to update the rpm on just the iorouter nodes by specifying -g iorouter on the command line.
Similarly, the dist2 script uses genders to quickly identify which cluster nodes require different sets of configuration files. Minor modifications to the genders database allows dist2 to completely reconfigure a node. (See information below regarding Gendersllnl for more information on dist2.)
Using genders attributes and values, tools can use genders to quickly access information that otherwise might be difficult to calculate. For example, suppose every node in your cluster has two ethernet cards. If the host names of both ethernet cards are listed in the genders database, the hostname of one card can quickly be determined based on the other.
This is currently used by both pdsh and whatsup to determine the host name of the management NIC in cluster nodes. Scripts can be written to perform different tasks based on the attributes and values listed in the genders database. For example, an attribute such as 'ipforw' can be used to indicate to a startup script that a node should be setup with IP forwarding enabled. IP forwarding can be enabled or disabled on any cluster node simply adding or removing the 'ipforw' attribute to a node in the genders database.
The Gendersllnl package is a local genders package that contains libraries with extra helper functions for LLNL-specific needs. They illustrate how local APIs can be developed on top of the genders base API. The LLNL tool dist2 is also included in the Gendersllnl package.
Dist2 is an rdist preprocessor that expands specially formatted macros with embedded genders attributes into node lists. When the genders database changes, dist2 can be rerun to redistribute appropriate configuration file variations. Dist2 assumes a particular file system setup for rdisted files. The tool should be considered to be an illustration of how Genders can be used for powerful cluster management. It will most likely not work by default for a non-LLNL environment.
What's New in This Release:
This release adds nodeattr --diff to compare genders databases.
It adds a nodeattr -X option and AIX support.
Genders 1.5-2 search tags