How can cluster resource configuration files that have been modified be propagated to all cluster nodes?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux Server 5 (with the High Availability Add on)
  • Red Hat Enterprise Linux Server 6 (with the High Availability Add on)

Issue

  • Can the apache resource configuration files that have been modified be propagated to all cluster nodes?
  • Can the samba resource configuration files that have been modified be propagated to all cluster nodes?

Resolution

Currently there is no way for the modified configuration file to be propagated to all cluster nodes on creation or after they have been modified. The supported method of having all the cluster nodes configuration files in sync is to use GFS or GFS2 as a shared filesystem for configuration files directory that all the cluster nodes can mount at the same time.

If shared storage is not used for the configuration files(other than /etc/cluster/cluster.conf) then the files will need to be manually synced by a user or some type of configuration file manager.

Root Cause

When a clustered resource managed by rgmanager such as apache or samba is started for the first time on a cluster node then it will create a directory under /etc/cluster/ for the configuration files that will be used for those resources.

The clustered resources apache and samba will generate a configuration file in the following directories. Each time the resource is started it will regenerate the configuration unless the configuration file has been modified. Please note that the : in the filename:

  • apache.sh: /etc/cluster/apache/apache:<resource name>/httpd.conf
  • samba.sh : /etc/cluster/samba/samba:<resource name>/smb.conf

This is an example configuration file for the samba resource and the path to the configuration file that is generated.

$ cat /etc/cluster/cluster.conf
<cluster alias="rh5nodesThree" config_version="42" name="rh5nodesThree">
  ....
        <service autostart="0" name="smbexport" recovery="relocate">
            <ip address="192.168.1.205" sleeptime="10"/>
            <fs device="/dev/vdd1" force_unmount="1" fsid="59529" mountpoint="/mnt/ext3vol2/" name="ext4fs"/>
            <samba name="smbwww" shutdown_wait="0"/>
        </service>
  </rm>
</cluster>

$ ls /etc/cluster/samba/samba\:smbwww/smb.conf 
/etc/cluster/samba/samba:smbwww/smb.conf

There is currently no built-in mechanism that keeps configuration files in-sync(other than the /etc/cluster/cluster.conf file) with all the other cluster nodes such as the httpd.conf and smb.conf files.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.