[ClusterLabs] Possible circular constraints

Andrei Borzenkov arvidjaar at gmail.com
Sat Mar 31 08:28:16 UTC 2018


31.03.2018 06:10, David Parker пишет:
> Hello,
> 
> I have a two-node cluster running MySQL with DRBD.  I recently tried to
> fail over from the first node (mysql1) to the second (mysql2) but it failed
> because the promotion of DRBD on mysql2 failed.  After the failure, I found
> this in the Corosync log:
> 
> (drbd_r0:0_promote_0) on mysql2 failed (target: 0 vs. rc: -2): Error
> 

Apparently resource agent was called but returned an error so you need
to investigate why it happened.

> While looking into the problem, I discovered what appears to be a circular
> colocation dependency between my MySQL resource group and my DRBD
> resource.  There's an order constraint which says DRBD should go first,
> though, so I'm not positive this is the problem.  I was hoping for a second
> opinion before I go making any changes.
> 
> The constraints in the CIB are as follows:
> 
>     <constraints>
>       <rsc_colocation id="drbd-mysql-ha" rsc="ms-drbd_r0" rsc-role="Master"
> score="INFINITY" with-rsc="mysql_resources"/>

This sounds really backwards to me.

>       <rsc_order id="drbd-before-mysql" first="ms-drbd_r0"
> first-action="promote" score="INFINITY" then="mysql_resources"
> then-action="start"/>
>     </constraints>
>     <rsc_defaults>
>       <meta_attributes id="rsc-options">
>         <nvpair id="rsc-options-resource-stickiness"
> name="resource-stickiness" value="100"/>
>       </meta_attributes>
>     </rsc_defaults>
> 
> And from crm_resource:
> 
> root at mysql1:~# crm_resource -a -r ms-drbd_r0
> * ms-drbd_r0
>     mysql_resources                                (score=INFINITY,
> id=drbd-mysql-ha)
> root at mysql1:~# crm_resource -a -r mysql_resources
>     ms-drbd_r0                                     (score=INFINITY,
> id=drbd-mysql-ha)
> * mysql_resources
> 

My understanding it that it prints resources that are colocated with
given argument then argument location then resources given argument is
colocated with. So there is no loop in the above output.

Would be nice if manual actually explained how to interpret output ...


More information about the Users mailing list