Bug 456897 - Provide conversion to Pacemaker configuration file format
Provide conversion to Pacemaker configuration file format
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pacemaker (Show other bugs)
6.0
All Linux
high Severity low
: rc
: ---
Assigned To: Lon Hohberger
Cluster QE
: Reopened, TechPreview
Depends On: 493474 727643 729827
Blocks: 456895 756082
  Show dependency treegraph
 
Reported: 2008-07-28 10:42 EDT by Lon Hohberger
Modified: 2016-04-26 10:35 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Technology Preview
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-11 16:12:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lon Hohberger 2008-07-28 10:42:46 EDT
Description of problem:

Rgmanager's configuration (part of cluster.conf) is very different from
Pacemaker's configuration.  In order to preserve rolling upgrade between Red Hat
Enterprise Linux 5 and Red Hat Enterprise Linux 6 from a cluster service
perspective, we will need a translation utility which will give Pacemaker
configuration data in a way Pacemaker would understand it.
Comment 15 Lon Hohberger 2011-08-10 15:02:29 EDT
I have this working for limited sets of resources and STONITH configurations.  The following is known to work:

  * single-instance STONITH devices for a host
    * All parameters must be in the <fencedevice> tag
  * multiple-instance STONITH devices with or without hostlist support
    * caveat: you must only have 'port="X"' in the <device> tag; no other 
      options from the <device> tag are handled; they must be in the 
      <fencedevice> tag
  * IP address resources
  * script resources

I tested:

1) Services running under rgmanager; both cluster nodes online

2) Run ccs2cib

[root@snap ccs2cib]# ./ccs2cib -d -o cib.xml -R
debug: adding . to /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
debug: using ./cluconf2cib.xsl
debug: using /usr/share/java/saxon.jar
 * Converting configuration
 * Calling crm_verify to validate the configuration.
 * Disabling rgmanager in /etc/cluster/cluster.conf
 * Calling cman_tool to update cluster.conf
 * Proposed cib stored in cib.xml
[root@snap ccs2cib]#

3) Wait for rgmanager to finish exiting on both hosts

4) Start pacemaker on both hosts

5) cibadmin --replace --xml-file cib.xml
   NOTE: I had to do this twice; I am not sure why.

Check crm_mon:

[root@snap ccs2cib]# crm_mon -1
============
Last updated: Wed Aug 10 15:00:17 2011
Stack: cman
Current DC: crackle - partition with quorum
Version: 1.1.5-5.el6-01e86afaaa6d4a8c4836f68df80ababd6ca3902f
3 Nodes configured, unknown expected votes
4 Resources configured.
============

Online: [ snap crackle ]
OFFLINE: [ /dev/block/8:1 ]

 Resource Group: service_1
     ip_192_168_122_201 (ocf::redhat:ip.sh):    Started crackle
 Resource Group: service_dang
     script_uhoh        (ocf::redhat:script.sh):        Started snap
 st_virt        (stonith:fence_xvm):    Started crackle

6) Kill 'snap' with 'reboot -fn'

7) Check crm_mon on 'crackle':

============
Last updated: Wed Aug 10 15:01:16 2011
Stack: cman
Current DC: crackle - partition with quorum
Version: 1.1.5-5.el6-01e86afaaa6d4a8c4836f68df80ababd6ca3902f
3 Nodes configured, unknown expected votes
4 Resources configured.
============

Online: [ crackle ]
OFFLINE: [ snap /dev/block/8:1 ]

 Resource Group: service_1
     ip_192_168_122_201 (ocf::redhat:ip.sh):    Started crackle
 Resource Group: service_dang
     script_uhoh        (ocf::redhat:script.sh):        Started crackle
st_virt (stonith:fence_xvm):    Started crackle

Failed actions:
    vm_foo_monitor_0 (node=crackle, call=4, rc=5, status=complete): not installe
d
Comment 16 Lon Hohberger 2011-08-10 15:03:32 EDT
Oops -- the vm_foo_monitor_0 action was present in the crm_mon on snap, too, but it's a dummy resource and can be ignored.
Comment 17 Lon Hohberger 2011-08-10 15:48:41 EDT
I have tagged ccs2cib v0.5; this can be pulled in to other projects as needed.  It still needs a bit more polish and testing, which will be performed in the mainline / master branch for now.

https://github.com/lhh/ccs2cib/tree/v0.5

Note You need to log in before you can comment on or make changes to this bug.