On Thu, Apr 07, 2011 at 03:02:51PM +0200, Alain.Moulle wrote: > Hi Dejan, > all my responses below ... > > Dejan Muhamedagic a écrit : > > 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. > > > OK I understand, I did not think that the pb was at the second level of > crm . > > > >> 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. > > > > > Yep, sorry, you're right, it is formatted as an output of crm configure > show , > not like in the cib itself. > >> 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. > > > OK I understand, so I tried quite the same thing : > time crm configure < all-configure-commands > 6s !!! > time crm resource < all-resource-commands > 38s
Actually, with crm resource it doesn't matter so much. Though the crm itself takes around .5s to load. > So you're right that 's the best way to do it !!! except that > I'll remove my crm resource commands just to delete some target-role, > in place, I'll set the maintenance-mode at true during all the > configuration, > and set it to false at the end, enabling to set a meta target-role=Stopped > only on the group, and no target-role on the primitives configuration. > Thanks a lot Dejan for this piece of advice, it 's very worthy for me > > > >> 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? > > > You mean on each crm command ? no, I have'nt ... I meant: crm -F|--force ... Note that there are no crm commands which take unix-style command line options. > But if I stop/start Pacemaker before to configure all groups again, > it never returns any of above errors ... it seems as if something > is changing with regard to the time since Pacemaker is started, > or since many previous crm events have been passed ... don't know ... Don't know either. BTW, you can also use shadow CIBs as an alternative to configure load ... Thanks, Dejan > Alain > > > > >> 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 > > > > > > > > _______________________________________________ > 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
