[Pacemaker] right way to update resource configuration on a live cluster?

MA Martin Andrews (5542) MAndrews at ag.com
Fri Dec 9 16:25:56 EST 2011


I have several heartbeat clusters running Centos 5 and heartbeat 2.1.4.
We have been struggling to manage configuration updates to these
clusters without losing service - particularly when we are adding or
removing ip addresses. After experimentation I found the "cibadmin -R"
command. Then the following post led me to a method that seems to work:

http://oss.clusterlabs.org/pipermail/pacemaker/2009-June/001992.html

So now to make changes to /etc/ha.d/haresource take effect online I do
the following:

  /usr/lib/heartbeat/haresources2cib.py --stdout >/etc/ha.d/cib.xml
  cibadmin -Q >/etc/ha.d/cib-run.xml

  # get the admin_epoch from cib-run.xml and put one higher epoch into
our cib.xml
  ADMIN_EPOCH=`perl -ne \
                '/admin_epoch="(\d+)"/ && do {print $1+1,"\n"; exit}' \
                /etc/ha.d/cib-run.xml`
  export ADMIN_EPOCH
  perl -pi -e 's/admin_epoch="\d+"/admin_epoch="$ENV{ADMIN_EPOCH}"/' \
                /etc/ha.d/cib.xml

  # Load the new cib
  cibadmin -R -x /etc/ha.d/cib.xml

Is this procedure correct? I was surprised I couldn't find any
discussion of this process online. If I was using a newer pacemaker
would the process be simpler?

Thanks,
Martin






More information about the Pacemaker mailing list