[ClusterLabs] can't start/stop a drbd resource with pacemaker
Ken Gaillot
kgaillot at redhat.com
Mon Jul 18 14:04:02 UTC 2016
On 07/15/2016 07:08 PM, Lentes, Bernd wrote:
>
>
> ----- Am 15. Jul 2016 um 23:48 schrieb Ken Gaillot kgaillot at redhat.com:
>
>> On 07/15/2016 03:54 PM, Lentes, Bernd wrote:
>>>
>>>
>>> ----- Am 13. Jul 2016 um 14:25 schrieb Kristoffer Grönlund kgronlund at suse.com:
>>>
>
>
>
>>>>
>>>
>>> Hi,
>>>
>>> i found that:
>>>
>>> crm(live)resource# scores
>>>
>>> Current cluster status:
>>> Online: [ sunhb58820 sunhb65277 ]
>>>
>>> prim_ip_hawk (ocf::heartbeat:IPaddr): (target-role:Stopped) Stopped
>>> prim_fs_drbd_r0 (ocf::heartbeat:Filesystem): (target-role:Stopped)
>>> Stopped
>>> prim_hawk (lsb:hawk): Stopped
>>> Master/Slave Set: ms_drbd_r0 [prim_drbd_r0]
>>> Stopped: [ sunhb58820 sunhb65277 ]
>>>
>>> Allocation scores:
>>> native_color: prim_ip_hawk allocation score on sunhb58820: -INFINITY
>>> native_color: prim_ip_hawk allocation score on sunhb65277: -INFINITY
>>> native_color: prim_fs_drbd_r0 allocation score on sunhb58820: -INFINITY
>>> native_color: prim_fs_drbd_r0 allocation score on sunhb65277: -INFINITY
>>> native_color: prim_hawk allocation score on sunhb58820: -INFINITY
>>> native_color: prim_hawk allocation score on sunhb65277: -INFINITY
>>> clone_color: ms_drbd_r0 allocation score on sunhb58820: 0
>>> clone_color: ms_drbd_r0 allocation score on sunhb65277: 0
>>> clone_color: prim_drbd_r0:0 allocation score on sunhb58820: 0
>>> clone_color: prim_drbd_r0:0 allocation score on sunhb65277: 0
>>> clone_color: prim_drbd_r0:1 allocation score on sunhb58820: 0
>>> clone_color: prim_drbd_r0:1 allocation score on sunhb65277: 0
>>> native_color: prim_drbd_r0:0 allocation score on sunhb58820: -INFINITY
>>> native_color: prim_drbd_r0:0 allocation score on sunhb65277: -INFINITY
>>> native_color: prim_drbd_r0:1 allocation score on sunhb58820: -INFINITY
>>> native_color: prim_drbd_r0:1 allocation score on sunhb65277: -INFINITY
>>> prim_drbd_r0:0 promotion score on none: 0
>>> prim_drbd_r0:1 promotion score on none: 0
>>>
>>> When the score is -INFINITY, the resource can't run on both nodes. Yes ?
>>
>> Correct, a score of -INFINITY for a particular resource on a particular
>> node means that resource can't run there. In this case, the
>> "target-role:Stopped" explains it -- you've explicitly disabled
>> prim_ip_hawk and prim_fs_drbd_r0 in the configuration, and the cluster
>> implements that by setting -INFINITY scores on all nodes.
>>
>>> What means native_color and clone_color ? I read something about different
>>> functions in the allocation ?
>>
>> Right, it's just an internal detail indicating where the score was
>> calculated. The important information is the resource name, node name,
>> and score.
>>
>>> Why are the values different ? Is the score changing depending on the time ?
>>
>> No, it just means different functions contribute to the score. For
>> clones, both the clone as a whole and the individual clone instances
>> have scores. Scores are added together to get a final value.
>>
>>> And why is there a prim_drbd_r0:0 and a prim_drbd_r0:1 ?
>>
>> Those are the individual clone instances. It's possible for individual
>> clone instances to have different scores. For example, you might have a
>> constraint saying that the master role prefers a certain node.
>>
>
> Is there a way to manipulate the scores ? Is the score -INFINITY because the resource is stopped
> or is the resource stopped because the score is -INFINITY ?
Yes, yes and yes ;-)
You can manipulate the scores in the configuration. The different
high-level tools (crm, pcs, etc.) have their own syntax for specifying
scores, but each constraint has a score, and resource stickiness is a
score. The cluster sums up all the scores that apply to a given resource
per node, and places the resource on the node with the highest score.
>From the cluster's point of view, the resource is stopped because the
score is negative on all nodes.
However, the crm command's syntax uses "stop" and "start" indirectly.
"crm stop" (and "pcs resource disable") simply adds constraints with
negative scores to all nodes, to make the cluster stop the resource.
"crm start" (and "pcs resource enable") simply removes those
constraints. So, from the point of view of using crm, "stopping" the
resource creates the negative scores, which then makes the cluster
actually stop the resource.
> E.g. if i stop a resource with crm resource start xxx does this set the INFINITY to minus ?
> And what happens if i want to start a resource ? Does it set the score to a "normal" value and
> start it afterwars or
> does the cluster refuse to start it because of -INFINITY ?
>
> I read two books about clusters before beginning to play with it.
> But i still underrated the complexity. And the amount of tools does not simplify it.
> But it's interesting and exciting.
>
>
> Bernd
>
>
> Helmholtz Zentrum Muenchen
> Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH)
> Ingolstaedter Landstr. 1
> 85764 Neuherberg
> www.helmholtz-muenchen.de
> Aufsichtsratsvorsitzende: MinDir'in Baerbel Brumme-Bothe
> Geschaeftsfuehrer: Prof. Dr. Guenther Wess, Dr. Alfons Enhsen, Renate Schlusen (komm.)
> Registergericht: Amtsgericht Muenchen HRB 6466
> USt-IdNr: DE 129521671
More information about the Users
mailing list