[ClusterLabs] Order set troubles

Andrei Borzenkov arvidjaar at gmail.com
Wed Mar 24 14:25:34 EDT 2021


On 24.03.2021 20:56, Ken Gaillot wrote:
> On Wed, 2021-03-24 at 09:27 +0000, Strahil Nikolov wrote:
>> Hello All,
>>  
>> I have a trouble creating an order set .
>> The end goal is to create a 2 node cluster where nodeA will mount
>> nfsA , while nodeB will mount nfsB.On top of that a depended cloned
>> resource should start on the node only if nfsA or nfsB has started
>> locally.
>>  
>> A prototype code would be something like:
>> pcs constraint order start (nfsA or nfsB) then start resource-clone
>>  
>> I tried to create a set like this, but it works only on nodeB:
>> pcs constraint order set nfsA nfsB resource-clone
>>
>> Any idea how to implement that order constraint ?
>> Thanks in advance.
>>
>> Best Regards,
>> Strahil Nikolov
> 
> Basically you want two sets, one with nfsA and nfsB with no ordering
> between them, and a second set with just resource-clone, ordered after
> the first set.
> 
> I believe the pcs syntax is:
> 
> pcs constraint order set nfsA nfsB sequential=false require-all=false
> set resource-clone
> 
> sequential=false says nfsA and nfsB have no ordering between them, and
> require-all=false says that resource-clone only needs one of them.
> 

Won't that start clone instances on all nodes when either nfsA or nfsB
is active? While he wants to start clone instance on A only if nfsA was
started on A and start clone instance on B only if nfsB was started on B.

The closest I can come up with is making nfsA/B a clone and
ordering/colocating clones. That works during brief test. If nfs
instance cannot be started on a node, resource-clone instance is not
started either, but both are started on another node.

> (I don't remember for sure the order of the sets in the command, i.e.
> whether it's the primary set first or the dependent set first, but I
> think that's right.)
> 



More information about the Users mailing list