Skip to content

RHEL Cluster Discovery

Mat Davis edited this page Nov 12, 2019 · 2 revisions

Release Information

Product: RHEL cluster discovery for TADDM
Release Number: beta
Release Date: April, 2014

Overview

This custom sensor discovers Red Hat Enterprise Linux clusters. There are no RHEL cluster specific data model classes in the TADDM common data model, so the ComputerSystemCluster class is used to model the data. For TADDM 7.2.2.1, the data management portal does not show much for this class by default, so there is quite a bit of customization that needs to occur for the data to be viewed in the UI. More recent versions of TADDM, including version 7.3 have the proper UI settings to display cluster information, so no customization is needed.

DISCLAIMER: This is a beta release. Use at your own risk and test in a non-production environment.

This release is provided as-is but feedback is welcome at mdavis5@us.ibm.com.

Important Caveats

  • The sensor code assumes that the cluster name is unique within the enterprise. If there are two clusters defined with the same name merging will occur and the data will not be valid.
  • The clusters do not show up in inventory summary panel of the data management portal.
  • To view the cluster topology, you must use the "Explore" feature by selecting the cluster in the browser and clicking "Explore"
  • If cluster services are defined with multiple tags they may not be discovered properly
  • If the cluster.conf file is not readable by the discovery service account than no extended attributes are set
  • Any changes made to TADDM configuration files for the UI will be overwritten during upgrades and will need to be reapplied or migrated

Installation Notes

System Requirements

  • Tested on TADDM 7.2.2 FP1 and 7.3 FP2

Installation

  1. Download and place the following files in TADDM dist directory on the discovery server(s).

  2. Define extended attributes by running support/bin/rhel_cluster_ext_attrs.jy (this only needs done once). If the script fails, open the script to see the extended attributes and create them manually through the UI for ComputerSystemCluster. Use String for attribute type.

  3. Add the following line to LinuxComputerSystemTemplate under etc/templates/commands

    SCRIPT:etc/templates/commands/extension-scripts/redhat_cluster.py
    
  4. Start the Discovery Management Console and click on Computer Systems. If LinuxComputerSystemTemplate is disabled, then enable it.

  5. Add the following to the bottom of etc/collation.properties

    # cluster commands for RHEL cluster discovery  
    com.collation.discover.agent.command.cman.Linux=cman_tool  
    com.collation.discover.agent.command.cman.Linux.1.2.3.4=sudo cman_tool
    
  6. If a non-root discovery service account is being used, change the property just added to collation.properties to use 'sudo cman_tool'

NOTE: You do not need to restart the TADDM server.

Data Management Portal Configuration

The following are instructions to enable the discovered data to be viewed in the DMP. These configurations need done on the storage server(s) where you intend to use the DMP.

  • STOP! If you are using a release greater than 7.2.2 FP1 then you should first check to see if these configurations already exist in the product before proceeding. It has been verified that 7.3 FP2 already contains these configurations so this section can be skipped.

  • Back up etc/detail/screencontent.xml and etc/detail/screenlayout.xml

  • To enable view of the cluster from the Linux details panel, edit etc/detail/screencontent.xml and add the following under LinuxUnitaryComputerSystem.General tableContent

    <field>
        <nested className="com.collation.platform.model.topology.sys.ComputerSystemCluster" fieldName="systemsCluster">
           <plain displayType="popup" fieldName="displayName" displayName="Cluster Name"/>
        </nested>
    </field>
    
  • To define table content for the cluster, edit etc/detail/screencontent.xml and add the following to the default ComputerSystemCluster tableContent section

    <tableContent className="com.collation.platform.model.topology.sys.ComputerSystemCluster" layout="table" name="ComputerSystemCluster.Hosts">
        <field>
             <nested className="com.collation.platform.model.topology.sys.ComputerSystem" fieldName="computerSystems">
                 <plain displayType="popup" fieldName="name"/>
                 <plain fieldName="fqdn"/>
             </nested>
        </field>
    </tableContent>
    
  • To enable view of the cluster nodes from the cluster detail panel, edit etc/detail/screenlayout.xml and add the following section in bold to the cluster layout.

    <layout displayName="Computer System Cluster" hasAdminInfo="true" hasArtifactInfo="true" hasExtAttrs="true" hasMssInfo="true" name="com.collation.platform.model.topology.sys.ComputerSystemCluster">
        <tab name="General">
            <tabdata displayName="General" name="ComputerSystemCluster.General"/>
        </tab>
        <tab name="Hosts">
            <tabdata displayName="Hosts" name="ComputerSystemCluster.Hosts"/>
        </tab>
    </layout>
    
  • Back up deploy-tomcat/cdm/WEB-INF/classes/com/ibm/cdb/gui/model/meta/resources/gui-items.xml and deploy-tomcat/cdm/WEB-INF/classes/com/ibm/cdb/gui/model/meta/resources/inventory-summary-hierarchy.xml

  • To enable the clusters to show up in the discovered components pane, edit deploy-tomcat/cdm/WEB-INF/classes/com/ibm/cdb/gui/model/meta/resources/gui-items.xml and add the following section at the bottom inside the gui-items tag

    <gui-item id="compsys_cluster">
        <mql-query>select * from only com.collation.platform.model.topology.sys.ComputerSystemCluster</mql-query>
        <icons smallIcon="/cdm/images/otherCluster.png" />
        <label-id>label_cluster</label-id>
    </gui-item>
    
  • To enable the clusters to show up in the discovered components pane, edit deploy-tomcat/cdm/WEB-INF/classes/com/ibm/cdb/gui/model/meta/resources/inventory-summary-hierarchy.xml and add the following section inside the cluster folder tag

    <!-- ComputerSystem Cluster -->
    <folder id="compsys_cluster" labelId="label_cluster">
        <item id="compsys_cluster" guiItemRef="compsys_cluster" />
    </folder>
    
  • To enable the "Explore" topology functionality

    • Go to the dist/lib directory

      cd /opt/IBM/taddm/dist/lib
      
    • Back up viewmgr.jar

      cp viewmgr.jar viewmgr.bak
      
    • Extract the meta file for edit (path to jar may be different in your environment)

      ../external/jdk-Linux-x86_64/bin/jar -xf viewmgr.jar com/collation/proxy/viewmgr/meta/resources/Relationship_Types_Meta.xml
      
    • Edit com/collation/proxy/viewmgr/meta/resources/Relationship_Types_Meta.xml and add the following to the bottom inside the relationships tag

      <nodeType className="com.collation.platform.model.topology.sys.ComputerSystemCluster" inheritClassName="com.collation.platform.model.ModelObject">
          <relType name="rel_label_Nodes">
              <attribute className="com.collation.platform.model.topology.sys.ComputerSystem" fieldName="computerSystems" array="true"/>
          </relType>
      </nodeType>
      
    • Update the jar file with the updated file (path to jar may be different in your environment)

      ../external/jdk-Linux-x86_64/bin/jar -uf viewmgr.jar com/collation/proxy/viewmgr/meta/resources/Relationship_Types_Meta.xml
      
    • Clean up extracted files

      rm -fr com
      
  • The changes above do not take effect until TADDM is restarted. Restart TADDM.

    bin/control restart
    
  • Note: Any changes made to TADDM configuration files for the UI will be overwritten during upgrades and will need to be reapplied or migrated

Target Configuration

The following needs to be done on the target cluster nodes if root is not being used for discovery.

  • /etc/cluster/cluster.conf needs to be readable by TADDM service account in at least one cluster node in order to discover extended attributes. The cluster/node definition and relationships will still be discovered if the cman_tool can be executed properly.
  • sudoers file needs set up for service account with NOPASSWD for cman_tool

Manifest

This release consists of the following items:

  • Jython discovery script (etc/templates/commands/extension-scripts/redhat_cluster.py)
  • Jython convenience script for creating extended attributes (support/bin/rhel_cluster_ext_attrs.jy)

Troubleshooting

  • After a discovery, the extended attributes do not show up in the UI until the topology agent for extended attributes run. Run the following command to force population of extended attributes after a discovery:
    /opt/IBM/taddm/dist/support/bin/runtopobuild.sh -a ExtendedAttributesAgent
  • If none of the extended attributes are being set in the UI then it might be that one of the extended attributes is not defined. In this case TADDM will silently fail to set the values so double-check the extended attribute names.
  • If "no module named java" appears during discovery execution of script in 7.2.2.1 then rename or delete bin/cachedir to resolve. This is an error specific to 7.2.2.1 and only needs done once.
  • If other issues occur with the sensor, do the following.
    • Enable DEBUG discovery logging in collation.properties by changing the following property
      com.collation.log.level.vm.Discover=DEBUG
    • Run the discovery again.
    • Zip up dist/log/sensors//LinuxComputerSystemSensor-*
    • Send log file along with description of error to mdavis5@us.ibm.com. This is not a statement of support. I will take a look at the error as I have the time to do so and the ability to resolve.
Clone this wiki locally