On 15/06/17 00:12 +0530, ashutosh tiwari wrote:
> Also wanted to know that is there a way to add multiple resources in a go,
> presently we are doing the resource addition serially.
> 
> the command we use to create resources is
> "pcs resource create resname ocf:abc:IPaddr ip=x.x.x.x cidr_netmask=32 op
> monitor interval="0s"."

Yes, there's a way to instruct pcs to add resources in one go, at
least from the perspective of the cluster (which is what matters),
despite it compounds several manipulation steps (but they are just
an accumulative preparation for the final propagation):

  pcs cluster cib tmp-cib.xml
  pcs -f tmp-cib.xml resource create ...
  pcs -f ...
  pcs cluster cib-push tmp-cib.xml --config
  # tmp-cib.xml temporary file can be deleted now

> Also we add some some colocation constraint.

You can enque such change before the final push using:

  pcs -f constraint colocation add ...

as well.


To overcome multiple parallel sources of change mutually overwriting
the desired final configurations in the "critical section" (between
the initial fetch of the current cib and propagation of the
predestined after-changes monolithic configuration), newer pcs [1]
supports pushing just the differentials, but I am mentioning that
more for the sake of completeness.

[1] http://lists.clusterlabs.org/pipermail/users/2017-February/005103.html
    (see second item)

-- 
Jan (Poki)

Attachment: pgpOtjgU9T3vL.pgp
Description: PGP signature

_______________________________________________
Users mailing list: [email protected]
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to