[ClusterLabs] time taken for pcs resource create for IPAddr resource.
jpokorny at redhat.com
Wed Jun 14 21:52:25 CEST 2017
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 ...
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 
supports pushing just the differentials, but I am mentioning that
more for the sake of completeness.
(see second item)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Users