[Pacemaker] How to start resources in a Resource Group in parallel

Andrew Beekhof andrew at beekhof.net
Thu Feb 2 04:28:16 EST 2012


On Tue, Jan 31, 2012 at 9:52 PM, Dejan Muhamedagic <dejanmm at fastmail.fm> wrote:
> Hi,
>
> On Tue, Jan 31, 2012 at 10:29:14AM +0000, Kashif Jawed Siddiqui wrote:
>> Hi Andrew,
>>
>>           It is the LRMD_MAX_CHILDREN limit which by default is 4.
>>
>>           I see in forums that this parameter is tunable by adding /etc/sysconfig/pacemaker
>> with the following line as content
>>    LRMD_MAX_CHILDREN=8
>>
>>           But the above works only for Hearbeat. How do we do it for Corosync?
>>
>>           can you suggest?
>
> It is not heartbeat or corosync specific, but depends on support
> in the init script (/etc/init.d/corosync). The init script should
> read the sysconfig file and then invoke lrmadmin to set the max
> children parameter.

Just a reminder, but systemd unit files cannot do this.
SLES wont be affected for a while, but openSUSE users will presumably
start complaining soon.

I recommend:

diff -r 0285b706fcde lrm/lrmd/lrmd.c
--- a/lrm/lrmd/lrmd.c	Tue Sep 28 19:10:38 2010 +0200
+++ b/lrm/lrmd/lrmd.c	Thu Feb 02 20:27:33 2012 +1100
@@ -832,6 +832,13 @@ main(int argc, char ** argv)
 		init_stop(PID_FILE);
 	}

+        if(getenv("LRMD_MAX_CHILDREN")) {
+            int tmp = atoi(getenv("LRMD_MAX_CHILDREN"));
+            if(tmp > 4) {
+                max_child_count = tmp;
+            }
+        }
+
 	return init_start();
 }



>
> Thanks,
>
> Dejan
>
>> Regards
>> KASHIF
>>
>> ________________________________________
>> From: Andrew Beekhof [andrew at beekhof.net]
>> Sent: Tuesday, January 31, 2012 2:34 PM
>> To: The Pacemaker cluster resource manager
>> Subject: Re: [Pacemaker] How to start resources in a Resource Group in  parallel
>>
>> On Tue, Jan 31, 2012 at 6:46 PM,  <manish.gupta at ionidea.com> wrote:
>> > Hi All,
>> >  I am using pacemaker 1.0.11 + corosync 1.4.2 for a 2 node cluster
>> >  I have configured one Group, which is having 12 resources,
>> >  Ordered parameter is set to false but all 12 resource are not started
>> > parallel.
>> >  At a time only four resource started parallel.
>>
>> This is probably the lrmd limit.
>>
>> >  Resource 1,2,3,4 starts then 5,6,7,8 starts, then 9,10,11,12
>> >  If 5 second sleep is their in Resource-Agent's start method.
>> >  Then All the resources will start in 15 second.
>> >
>> >  Please can you suggest how can I solve the same,
>> >
>> >  It seems, only four thread starts at a time for a group's resource,
>> >
>> > Regards
>> > Manish
>> >
>> > On Fri, December 2, 2011 4:23 pm, Andreas Kurz wrote:
>> >> Hello Kashif,
>> >>
>> >>
>> >> On 12/02/2011 06:04 AM, Kashif Jawed Siddiqui wrote:
>> >>
>> >>> Hi All,
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> I am using pacemaker 1.0.11 + corosync 1.4.2 for a 2 node cluster.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> The old cib.xml for Heartbeat based cluster had an option
>> >>> "ordered=true | false" for "group" tag which supported starting of
>> >>> resources in series or parallel.
>> >>
>> >> this meta attribute is still available ... when in crm shell add:
>> >>
>> >> meta ordered=false
>> >>
>> >> to your group resource ... or you could also use a colocation set.
>> >>
>> >> Regards,
>> >> Andreas
>> >>
>> >>
>> >> --
>> >> Need help with Pacemaker?
>> >> http://www.hastexo.com/now
>> >>
>> >>
>> >>>
>> >>>
>> >>>
>> >>> By default, resources in Resource Group start in serial order for
>> >>> Pacemaker based clusters.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Is there a way to start multiple resources in parallel?
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> Regards
>> >>>
>> >>>
>> >>> KASHIF
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> 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
>> >>
>> >>
>> >
>> >
>> >
>> > _______________________________________________
>> > 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
>>
>> _______________________________________________
>> 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




More information about the Pacemaker mailing list