PreviousNextIndex

Appendix A: Implementation Specifics


There are two key components to Clinfo: the clinfo daemon and the API library.

The clinfo daemon is an SNMP-based monitor. SNMP is a industry-wide set of standards for monitoring and managing TCP/IP-based networks. SNMP includes a protocol, a database specification, and sets of data objects.

The sets of data objects form a Management Information Base (MIB). SNMP provides a standard MIB that includes information such as IP addresses and the number of active TCP connections. The actual MIB definitions are encoded into the agents running on a system. The standard SNMP agent in AIX 5L is the SNMP daemon, snmpd.

Programmers use SNMP operations to implement programs that will monitor and manage networks. These programs can receive information about the state of a network from snmpd, and pass the information on to clients and applications.

SNMP can be extended using the SNMP Multiplexing (SMUX) protocol to include enterprise-specific MIBs that contain information relating to a discrete environment or application. A management agent (a SMUX peer daemon) retrieves and maintains information about the objects defined in its MIB, and makes this information available to a specialized network monitor or network management station.

The HACMP software provides this SMUX peer function through the Cluster manager daemon. The clinfo daemon retrieves this information from the HACMP MIB (and indirectly) through the Cluster Manager.

The Clinfo API library (in all its variations) interacts with the clinfo daemon to provide access to the cluster information. Although the same information is available directly through SNMP, the Clinfo library provides a greatly simplified programming model allowing client programs to avoid the complexities of the SNMP API. The Clinfo API provides routines to retrieve all information related to cluster entities like nodes or resource groups (SNMP requires you to fetch these items one at a time) and routines to register for specific cluster events (SNMP requires traps to implement similar function). Variations of the library—C, C++, thread safe, and so forth—provide a consistent model for a variety of runtime environments.

The clinfo daemon and library can run on HACMP cluster nodes or on a non-cluster node, provided the daemon can access SNMP on a cluster node through TCP/IP.

Note: HACMP 5.3 integrates the functionality of the SMUX Peer daemon (clsmuxpd) into the Cluster Manager. This integrated function eliminates the clsmuxpd daemon.

The following sections provide additional details on how Clinfo operates in the HACMP environment:

  • Cluster Manager and Clinfo
  • SNMP Community Name and Clinfo.
  • Cluster Manager and Clinfo

    The Cluster Manager daemon (clstrmgr) is an HACMP subsystem that monitors a cluster and initiates recovery actions if necessary. The Cluster Manager reports on cluster behavior so that other programs can determine if changes have occurred within the cluster and if necessary, respond to those changes.

    Once the Cluster Manager gets the cluster information, it maintains an updated topology of the cluster in the HACMP for AIX 5L MIB, as it tracks events and resulting states of the cluster. Clinfo, running on a client machine or on a cluster node, queries the MIB for updated cluster information, and gives an application access to the HACMP for AIX 5L MIB information, through an application programming interface.

    By default, Clinfo periodically polls SNMP processes for updated information on events (every 15 seconds). It is possible to start Clinfo with an option (-a), which enables Clinfo to receive this information as soon as an event occurs. In this case, the Cluster Manager sends trap messages when it receives the event information. Clinfo then immediately queries the MIB for the event information instead of waiting for the next polling period.

    Note: When Clinfo is started with the -a option, you cannot run NetView for AIX 5L or any other application that expects to receive SNMP trap messages.

    When Clinfo starts, it reads the /usr/sbin/cluster/etc/clhosts file. This file lists the service network interface IP address or IP label of all available nodes in each cluster of interest. Clinfo searches through this file for an active SNMP process on a node, starting at the first IP address in the clhosts file. Once it locates a SNMP process, Clinfo receives information about the topology and state of the cluster from that SNMP process.

    If this connection is broken (the node goes down, for example), Clinfo tries to establish a connection to another node’s SNMP process. Clinfo holds cluster topology information internally, in dynamically allocated data structures on the local node, once it has received cluster information from the SNMP process with which it first established communication. Therefore, it knows about other nodes in the cluster.

    Note: HACMP 5.3 eliminates Clinfo shared memory. The clinfo daemon stores data internally and the client API retrieves data from the daemon through a UNIX domain socket connection.

    The following figure shows the relationship between the Cluster Manager, Clinfo and the cluster nodes.

    Cluster Manager and Clinfo Implementation 
    

    For Clinfo to work as expected, the clhosts file must contain the IP addresses of all HACMP server and client nodes to which Clinfo can communicate. The Clinfo daemon retrieves its information through SNMP from an HACMP server node—a node on which the Cluster Manager daemon (clstrmgr) is running. During startup, the clinfo daemon reads in the clhosts file to determine which nodes can communicate through SNMP as follows:

  • For clinfo daemons running on the same server as the clstrmgr daemon, it reads in the local server-based /usr/es/sbin/cluster/etc/clhosts file, which only contains the IP address associated with the loopback address.
  • For clinfo daemons running on client nodes, that is, nodes on which the clstrmgr daemon is not running, for highest availability, the client-based /usr/es/sbin/cluster/etc/clhosts file should contain the IP addresses of all of the HACMP server nodes. In this way, if a particular HACMP server node is unavailable (for example, powered down), then the clinfo daemon on the client node can attempt to connect to another HACMP server node through SNMP.
  • Note: For more information about the clhosts file see the Concepts and Facilities Guide.

    If Clinfo does not succeed in communicating with a local SNMP process at startup, it does not get the cluster map and therefore cannot try to connect to another SNMP process.

    SNMP Community Name and Clinfo

    HACMP supports a SNMP Community Name other than “public”. If the default SNMP Community Name is changed in /etc/snmpd.conf to something different from the default of “public” HACMP functions correctly.

    Note: The version of /etc/snmpd.conf depends on which version of AIX 5L you are using. For AIX 5L 5.2 or up, the default version used in HACMP is snmpdv3.conf.

    The SNMP Community Name used by HACMP is the first name found that is not “private” or “system” using the lssrc -ls snmpd command. The Clinfo service gets the SNMP Community Name in the same manner.

    The Clinfo service still supports the -c option for specifying SNMP Community Name but its use is not required. Using of the -c option is considered a security risk because running a ps command could find the SNMP Community Name.

    Warning: If it is important to keep the SNMP Community Name protected in Clinfo, change permissions on /tmp/hacmp.out, /etc/snmpd.conf, /smit.log and /usr/tmp/snmpd.log to not be world readable (for example, 600).


    PreviousNextIndex