[Pacemaker] Shouldn't colocation -inf: be mandatory?

Vadym Chepkov vchepkov at gmail.com
Mon Jun 7 08:04:55 EDT 2010


On Jun 7, 2010, at 5:05 AM, Dejan Muhamedagic wrote:

> Hi,
> 
> On Sat, Jun 05, 2010 at 10:38:17AM -0400, Vadym Chepkov wrote:
>> 
>> On Jun 3, 2010, at 9:16 AM, Vadym Chepkov wrote:
>> 
>>> Hi,
>>> 
>>> Not sure what I am doing wrong
>>> 
>>> primitive dummy1 ocf:pacemaker:Dummy
>>> primitive dummy2 ocf:pacemaker:Dummy
>>> primitive dummy3 ocf:pacemaker:Dummy
>>> 
>>> only two nodes alive in 3 node cluster, so I can see two dummy resources started on one node:
>>> 
>>> dummy2	(ocf::pacemaker:Dummy):	Started c20
>>> dummy1	(ocf::pacemaker:Dummy):	Started c20
>>> dummy3	(ocf::pacemaker:Dummy):	Started c22
>>> 
>>> Now I want to have only one resource running on one node at any given time, so I created a constraint:
>>> 
>>> # crm configure show one-dummy
>>> colocation one-dummy -inf: ( dummy1 dummy2 dummy3 )
>>> 
>>> # cibadmin -Q -o constraints
>>> <constraints>
>>> <rsc_colocation id="one-dummy" score="-INFINITY">
>>>   <resource_set id="one-dummy-0" sequential="false">
>>>     <resource_ref id="dummy1"/>
>>>     <resource_ref id="dummy2"/>
>>>     <resource_ref id="dummy3"/>
>>>   </resource_set>
>>> </rsc_colocation>
>>> </constraints>
>>> 
>>> I would expect one of the dummies to be down at this point. But it is not.
>>> Maybe pacemaker can't decide which one, I thought, so I set a priority:
>>> 
>>> # crm resource dummy1 meta priority="10"
>>> 
>>> Still no dice.
>>> 
>>> pacemaker-1.0.8-6.1.el5
>>> 
>>> What am I missing?
>> 
>> 
>> I am sorry for being impatient, but it's a really critical bug (or lack of knowledge) for me :(
>> I can't prevent two resources to run on the same host for some reasons. I thought, ok,
>> I recall "groups" had some issues, so I completely stopped using that syntax
>> 
>> But I do have proper constraints, I believe, and resources are still got started on the same host :(
>> 
>> # crm configure show|grep only   
>> colocation only-one-sql -inf: _rsc_set_ ( fs_node00_sql fs_node01_sql )
> 
> If you convert this to a normal two-resource constrain does that
> work? If so, then this seems to be a problem with resource sets
> and you should file a bugzilla. If there are not too many
> resources, you can use a chain of two-resource constraints.

Chains can't be used, if fs_node01_sql won't be available then fs_node00_sql won't be available too :(

I filed bug 2435, glad to hear "it's not me"

By the way, inf: is also broken in resource set and something trivial as this also doesn't work:

node c19.chepkov.lan
node c20.chepkov.lan
node c21.chepkov.lan
primitive dummy1 ocf:pacemaker:Dummy
primitive dummy2 ocf:pacemaker:Dummy
primitive dummy3 ocf:pacemaker:Dummy
primitive dummy4 ocf:pacemaker:Dummy
colocation just-do-it inf: dummy4 ( dummy1 dummy2 dummy3 )

 dummy1	(ocf::pacemaker:Dummy):	Started c19.chepkov.lan
 dummy2	(ocf::pacemaker:Dummy):	Started c19.chepkov.lan
 dummy3	(ocf::pacemaker:Dummy):	Started c21.chepkov.lan
 dummy4	(ocf::pacemaker:Dummy):	Stopped 

dummy4 have never had a chance :(

Vadym


> 
> Thanks,
> 
> Dejan
> 
> 
>> # cibadmin -Q -o constraints
>>  <rsc_colocation id="only-one-sql" score="-INFINITY">
>>    <resource_set id="only-one-sql-0" sequential="false">
>>      <resource_ref id="fs_node00_sql"/>
>>      <resource_ref id="fs_node01_sql"/>
>>    </resource_set>
>>  </rsc_colocation>
>> 
>> # crm_mon -1rf|grep sql
>> fs_node00_sql	(ocf::heartbeat:Filesystem):	Started c21
>> fs_node01_sql	(ocf::heartbeat:Filesystem):	Started c21
>> pgsql_node00	(ocf::heartbeat:pgsql):	Stopped 
>> pgsql_node01	(ocf::heartbeat:pgsql):	Started c21
>>   pgsql_node00: migration-threshold=1000000 fail-count=14 last-failure='Sat Jun  5 14:19:24 2010'
>> 
>> [root at c21 ~]# df -k
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> 
>> /dev/mapper/node01-sql
>>                       2031952     69740   1858996   4% /node01/sql
>> /dev/mapper/node00-sql
>>                       2031952     87016   1841720   5% /node00/sql
>> 





More information about the Pacemaker mailing list