Hi,

On Thu, Apr 07, 2011 at 11:41:14AM +0200, Alain.Moulle wrote:
> Hi ,
> (pacemaker 1.1.2.7 on el6)
> 
> on serveral  HA clusters, I have 60 resources  to configure and for
> each one I have to configure group etc.
> And as it take a lot of time to be configured, I'm trying to simulate 
> similar
> configuration with Dummy resources .
> 
> Basically, for each group, I do (example is for 12th group):
> Configuring r12-1-resname
> Configuring r12-2-resname
> Configuring group r12
> Configuring delete target-role of both primitives
> Deleted r12-1-resname option: 
> id=r12-1-resname-meta_attributes-target-role name=target-role
> Deleted r12-2-resname option: 
> id=r12-2-resname-meta_attributes-target-role name=target-role
> Configuring add two locations for group
> 
> And so I script a loop for 60 groups with successive crm commands, and 
> execute the script.
> 
> When it works (see at the end of email some errors) , and the loop ended 
> successfully,
> I measure the time of each group configuration and it takes between 
> around 5s for
> the first group, and around 45s for the 60th last one,  which seems to 
> be a huge offset.
> In fact, each time a new group is configured, it takes more and more 
> seconds.
> 
> So at the end , when it works until the end of loop, it takes between 22 
> and 30mn
> to all configure, which is quite long.
> 
> Note that, to be sure, I also measure the time by using crm < 
> all-configure-commands
> with all the configure commands for the 60 groups in the file 
> "all-configure-commands"
> and it takes quite the same time : 21mn.
> 
> Any idea to lessen the time it takes to configure is welcome ...

What happens is that after each configure command there is an
implicit commit which makes pengine/crmd machinery calculate and
execute new transition.

> By the way, I tried your command Dejan :
> time cat config-show-full | crm -F configure load replace -
> And it takes only  5s to set all the configuration with the 60 groups !!!
> So it is really really efficient !!! But it has the cons that I have to 
> manage directly
> all the xml records, without your crm interface ... so later, if you 

Hmm, why xml? configure load replace takes CLI input.

> make any change
> in the xml records format or options or etc. , I'll have to carrefully 
> keep on eye
> on any change and report it in the way I build the file to give to crm 
> -F configure load replace
> so I'm not really for this solution ... except if there is no other way 
> to reduce configuration time.

Did you try:

crm configure <<EOF
....
EOF

That's similar to "load replace" or, rather, "load update". The
point is always _not_ to constantly enter and leave the configure
level.

> Note also that during the execution, I'm facing random different problems
> which stops the configuration loop, such as :
> 
> WARNING: CIB changed in the meantime: won't touch it!
>     (This one stop the configuration loop)
> or

Could be that sometimes the cluster does some operations which
changes the status part of the CIB. crm relies on the epoch
counter to detect CIB changes. With -F (--force) you should be
OK.

> Call cib_replace failed (-43): Application of an update diff failed

I think that Andrew can comment on this one.

> <null>
> ERROR: could not replace cib
> INFO: offending xml: <configuration>
>     <crm_config>
>        ... followed by the display of the configuration  .
>    (This one does not stop the loop but it takes more than 2mn for the 
> group currently in configuration)
> 
> or
> 
> Call cib_replace failed (-41): Remote node did not respond

Wasn't this a problem that has been fixed in the meantime?

> ERROR: could not replace cib
> INFO: offending xml: <configuration>
> <crm_config>
>        ... followed by the display of the configuration  .
>    (This one does not stop the loop but it takes more than 2mn for the 
> group currently in configuration)
> 
> I can't execute the all loop without at least one or two errors like 
> both last ones, excepting if
> I stop and start again Pacemaker on both nodes just before executing the 
> loop, in this case
> I never had any error .
> 
> And sometimes I got the first one (WARNING: CIB changed in the meantime: 
> won't touch it!)
> which stop definitively the configuration loop.

Did you try with --force?

> Is there a patch on crm about these configuration problems ?

The latter two are not coming from crm.

Thanks,

Dejan

> Thanks a lot
> Alain
> 
> 
> 
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to