[Pacemaker] all pacemaker configuration at one time

Jake Smith jsmith at argotec.com
Fri Feb 22 16:23:23 EST 2013


----- Original Message -----
> From: "Felipe Gutierrez" <felipe.o.gutierrez at gmail.com>
> To: "Jake Smith" <jsmith at argotec.com>, "The Pacemaker cluster resource manager" <pacemaker at oss.clusterlabs.org>
> Cc: pacemaker at clusterlabs.org
> Sent: Friday, February 22, 2013 3:34:46 PM
> Subject: Re: [Pacemaker] all pacemaker configuration at one time
> 
> Hi Jake,
> 
> thanks for reply!
> 
> To create my xml file I used the first configuration and this
> command:
> 
> cibadmin -Q > Documentos/pacemaker-drbd7-02.xml
> 
> is that right? I mean, the better way.
> 

I don't know if there is a 'better' way.  I usually have saved a prior config (crm save mycrmconfigfile) and now want to revert back to it with crm load replace mycrmconfigfile.  I don't usually save/load in xml format I just use the cli format.  The crm file is pretty much identical to what you have below.  I don't think it's any better to load as XML vs CLI syntax.

Try saving your crm config in both formats and you'll know what the config is supposed to look like.

Also you probably want to stop all resources or put all nodes in standby before loading or you'll likely generate tons of errors if you're trying to modify already running resources.

Jake

> Thanks,
> Felipe
> 
> 
> On Fri, Feb 22, 2013 at 3:45 PM, Jake Smith < jsmith at argotec.com >
> wrote:
> 
> 
> 
> 
> ----- Original Message -----
> > From: "Felipe Gutierrez" < felipe.o.gutierrez at gmail.com >
> > To: "The Pacemaker cluster resource manager" <
> > pacemaker at oss.clusterlabs.org >, pacemaker at clusterlabs.org
> > Sent: Friday, February 22, 2013 1:38:07 PM
> > Subject: [Pacemaker] all pacemaker configuration at one time
> > 
> > 
> > Hi all
> > 
> > I have on configuration that I want to push in the pacemaker at one
> > time. How do I do it? Instead to use crm configure command and type
> > all configurations?
> > 
> 
> crm configure load [replace|update] mycrmconfigfile
> 
> More here:
> crm(live)configure# help load
> 
> Load a part of configuration (or all of it) from a local file or
> a network URL. The `replace` method replaces the current
> configuration with the one from the source. The `update` tries to
> import the contents into the current configuration.
> The file may be a CLI file or an XML file.
> 
> Usage:
> ...............
> load [xml] <method> URL
> 
> method :: replace | update
> ...............
> Example:
> ...............
> load xml update myfirstcib.xml
> load xml replace http://storage.big.com/cibs/bigcib.xml
> ...............
> 
> crm(live)configure#
> 
> 
> HTH
> 
> Jake
> 
> 
> 
> > 
> > 
> > # crm configure property no-quorum-policy=ignore
> > # crm configure property stonith-enabled=false
> > 
> > 
> > primitive net_conn ocf:pacemaker:ping \
> > params pidfile="/var/run/ping.pid" \
> > host_list="192.168.188.1" \
> > op start interval="0" timeout="60s" \
> > op stop interval="0" timeout="20s" \
> > op monitor interval="10s" timeout="60s"
> > 
> > primitive cluster_ip ocf:heartbeat:IPaddr2 \
> > params ip="192.168.188.20" cidr_netmask="32"\
> > op monitor interval="10s"
> > primitive cluster_mon ocf:pacemaker:ClusterMon \
> > params pidfile="/var/run/crm_mon.pid"
> > htmlfile="/var/tmp/crm_mon.html"\
> > op start interval="0" timeout="20s"\
> > op stop interval="0" timeout="20s"\
> > op monitor interval="10s" timeout="20s"
> > 
> > primitive drbd_r8 ocf:linbit:drbd \
> > params drbd_resource="r8"\
> > op monitor interval="60s" role="Master"\
> > op monitor interval="59s" role="Slave"
> > 
> > primitive drbd_r8_fs ocf:heartbeat:Filesystem \
> > params device="/dev/drbd8" directory="/mnt/drbd8" fstype="ext3"
> > 
> > clone clone_net_conn net_conn \
> > meta clone-node-max="1" clone-max="2"
> > 
> > ms drbd_r8_ms drbd_r8 \
> > meta master-max="1" master-node-max="1" clone-max="2"
> > clone-node-max="1" notify="true"
> > location ms_drbd_r8-no-conn drbd_r8_ms \
> > rule $id="ms_drbd_r8-no-conn-rule" $role="Master" -inf: not_defined
> > pingd or pingd number:lte 0
> > colocation fs_on_drbd inf: drbd_r8_fs drbd_r8_ms:Master
> > order fs_after_drbd inf: drbd_r8_ms:promote drbd_r8_fs:start
> > 
> > Thanks in advance!
> > Felipe
> > 
> > --
> > --
> > -- Felipe Oliveira Gutierrez
> > -- Felipe.o.Gutierrez at gmail.com
> > -- https://sites.google.com/site/lipe82/Home/diaadia
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> > 
> > Project Home: http://www.clusterlabs.org
> > Getting started:
> > http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> > 
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started:
> http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 
> 
> 
> --
> --
> -- Felipe Oliveira Gutierrez
> -- Felipe.o.Gutierrez at gmail.com
> -- https://sites.google.com/site/lipe82/Home/diaadia




More information about the Pacemaker mailing list