[Pacemaker] trouble with crm configure load replace / crm config in a VCS

Marc Fournier marc.fournier at camptocamp.com
Thu Feb 4 04:03:58 EST 2010


Hello,

I'm quite new to pacemaker and I would like to have my cluster
configuration revisioned in a VCS.

My idea is to edit the configuration in a text file, then load it onto a
test cluster. Once I'm happy with my changes, push the file to one of the
production machines via the VCS and load it into the production cluster.

Unfortunately I'm having some issues with "crm configure load replace".
This command seems to stop, then remove all resources before re-creating
and starting them again (maybe I'm wrong).

As show below, just dumping the current configuration to a file, and
loading it again, fails.

I wanted to use "crm_diff" and "cibadmin --patch" instead, but I was unable
to find a way to convert crm resources to xml without passing them through
a running cluster (crm configure load + crm configure save xml).

So my questions are:

 - should "crm configure load replace" work as I naively expect ? Maybe I
   just have something wrong in my configuration ?

 - how can I convert a file containing crm cli commands to an xml cib file ?

 - any suggestions on the best way to have my cluster configuration
   revisioned in a VCS ?

Thanks !
Marc


----8<-------------------------------------------------------------------

crm(live)# status


============
Last updated: Thu Feb  4 09:22:50 2010
Stack: Heartbeat
Current DC: bob (f407f405-e4ec-47b2-8865-b22c322d208e) -
partition with quorum 2 Nodes configured, unknown expected votes
5 Resources configured.
============

Online: [ alice bob ]

Resource Group: mysql
    fs_mysql    (ocf::heartbeat:Filesystem):    Started bob
    svc_mysql   (lsb:mysqld):   Started bob
Resource Group: tomcat
    fs_lucene   (ocf::heartbeat:Filesystem):    Started bob
    svc_tomcat  (lsb:tomcat-gedscr):    Started bob
Master/Slave Set: ms_drbd_lucene
        Masters: [ bob ]
        Slaves: [ alice ]
Master/Slave Set: ms_drbd_mysql
        Masters: [ bob ]
        Slaves: [ alice ]
Resource Group: frontend
    svc_apache  (ocf::heartbeat:apache):        Started bob
    ip_gedscr   (ocf::heartbeat:IPaddr2):       Started bob


crm(live)# configure save /tmp/test.cli
crm(live)# configure load replace /tmp/test.cli

crm(live)# status 


============
Last updated: Thu Feb  4 09:37:30 2010
Stack: Heartbeat
Current DC: bob (f407f405-e4ec-47b2-8865-b22c322d208e) - partition with quorum
2 Nodes configured, unknown expected votes
5 Resources configured.
============

Online: [ alice bob ]

Master/Slave Set: ms_drbd_mysql
    drbd_mysql:1        (ocf::linbit:drbd):     Slave bob (unmanaged) FAILED
        Stopped: [ drbd_mysql:0 ]

Failed actions:
    drbd_mysql:1_demote_0 (node=bob, call=300, rc=6, status=complete): not configured
    drbd_mysql:1_stop_0 (node=bob, call=303, rc=6, status=complete): not configured
    drbd_lucene:1_demote_0 (node=bob, call=304, rc=6, status=complete): not configured






More information about the Pacemaker mailing list