Re: [ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-18 Thread Lentes, Bernd


- On Jul 18, 2016, at 7:29 PM, Ken Gaillot kgail...@redhat.com wrote:


>> 
>> Hi Ken,
>> 
>> thanks for your help.
>> 
>> Can i edit them directly ? Or do i have to make a circuit with constraints ?
> 
> Constraints are how they are edited.
> 
> Stop/start aren't used in normal operation, typically only when you're
> doing some sort of maintenance. Normally, you just leave everything
> "started", and the cluster starts/stops services as needed.
> 
> Constraints let you set scores for conditions you desire, such as
> preferring a more powerful node, keeping two resources together, etc.
> 
>> Is pcs available for Suse SLES 11 SP4 ?
>> I searched for it but didn't find it.
>> Is it a good idea to use pcs because i read crm is deprecated ?
> 
> No, crm is still actively maintained and fully supported on SuSE. Pcs is
> used on Fedora/RHEL/CentOS. The two are largely equivalent in
> functionality; only the syntax is different.
> 

I managed to get it run. I deleted the "target-role" in the meta-Attributes 
from the primitive and from the
ms resource. Then the resource started immediately.
You recommended to leave target-role in default (which is started, i think).
I thought target-role=stopped would be sensfull because then after configuring 
the resource it would not start
immediately and so maybe disturb the cluster.


I have now this situation:

sunhb58820:~ # ptest -sLV
Allocation scores:
   error: unpack_rsc_op:Preventing prim_hawk from re-starting anywhere: 
operation start failed 'not configured' (6)
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: 10001
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: 10001
native_color: prim_drbd_r0:0 allocation score on sunhb58820: 10001
native_color: prim_drbd_r0:0 allocation score on sunhb65277: 0
native_color: prim_drbd_r0:1 allocation score on sunhb58820: -INFINITY
native_color: prim_drbd_r0:1 allocation score on sunhb65277: 10001
prim_drbd_r0:1 promotion score on sunhb65277: 1
prim_drbd_r0:0 promotion score on sunhb58820: 1


sunhb58820:~ # crm resource status
 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]
 Masters: [ sunhb65277 ]
 Slaves: [ sunhb58820 ]



Just for the sake of clarity:

The scores from clone_color and native_color 
are added together ? So E.g. prim_drbd_r0:0 on sunhb58820 has a total of 20002 ?
And prim_drbd_r0:1 is the master and prim_drbd_r0:0 is the slave ?


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


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-18 Thread Lentes, Bernd


- On Jul 18, 2016, at 4:04 PM, Ken Gaillot kgail...@redhat.com wrote:


>> 
>> 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.
> 

Hi Ken,

thanks for your help.

Can i edit them directly ? Or do i have to make a circuit with constraints ?
Is pcs available for Suse SLES 11 SP4 ?
I searched for it but didn't find it.
Is it a good idea to use pcs because i read crm is deprecated ?

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


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-18 Thread Ken Gaillot
On 07/15/2016 07:08 PM, Lentes, Bernd wrote:
> 
> 
> - Am 15. Jul 2016 um 23:48 schrieb Ken Gaillot kgail...@redhat.com:
> 
>> On 07/15/2016 03:54 PM, Lentes, Bernd wrote:
>>>
>>>
>>> - Am 13. Jul 2016 um 14:25 schrieb Kristoffer Grönlund 
>>> kgronl...@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

Re: [ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-15 Thread Lentes, Bernd


- Am 13. Jul 2016 um 14:25 schrieb Kristoffer Grönlund kgronl...@suse.com:

> "Lentes, Bernd"  writes:
> 
>> Starting or stopping drbd with start/stop does not work neither for the ms
>> ressource nor for the primitive.
>> If i try to stop it keeps running. Also if i do a cleanup before (for both
>> resources).
>> Which resource should i stop first ? The primitive or the ms ?
> 
> You should always act on the container, so the ms in this case (or the
> clone, or the group).
> 

Ok.

>> I tried both, but none worked. Other resources, like an ip, can start/stop 
>> with
>> crm.
>> When i change the target-role of of the primitive via "crm configure edit" 
>> and
>> commit that, it starts/stops immediately.
>> But that can't be the prefered way to start/stop a drbd resource ?
> 
> All crm resource stop  does is set the target-role... so there
> is something else going on.
> 
>>
>> If you need more information ask me.
> 
> You can run crm with the -d argument to get more information about what
> it does, and -dR to get a full trace of all the commands it executes.
> 
> Grepping the logs on the DC node (see crm status output) will probably
> get you more hints as well.
> 

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 ?
What means native_color and clone_color ? I read something about different 
functions in the allocation ?
Why are the values different ? Is the score changing depending on the time ?
And why is there a prim_drbd_r0:0 and a prim_drbd_r0:1 ?

Thanks.


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


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-13 Thread Kristoffer Grönlund
"Lentes, Bernd"  writes:

> Starting or stopping drbd with start/stop does not work neither for the ms 
> ressource nor for the primitive.
> If i try to stop it keeps running. Also if i do a cleanup before (for both 
> resources).
> Which resource should i stop first ? The primitive or the ms ?

You should always act on the container, so the ms in this case (or the
clone, or the group).

> I tried both, but none worked. Other resources, like an ip, can start/stop 
> with crm.
> When i change the target-role of of the primitive via "crm configure edit" 
> and commit that, it starts/stops immediately.
> But that can't be the prefered way to start/stop a drbd resource ?

All crm resource stop  does is set the target-role... so there
is something else going on.

>
> If you need more information ask me.

You can run crm with the -d argument to get more information about what
it does, and -dR to get a full trace of all the commands it executes.

Grepping the logs on the DC node (see crm status output) will probably
get you more hints as well.

Finally, you can run "crm report" or hb_report to collect and analyse
the logs on all your nodes, to get a better overview of what is going on
in the cluster.

But really, I would recommend looking at a tutorial or guide for setting
up DRBD in a pacemaker cluster, as there are multiple steps that have to
be correct for it to work.

Cheers,
Kristoffer

>
> Thanks.
>
>
> Bernd
>
> -- 
> Bernd Lentes 
>
> Systemadministration 
> institute of developmental genetics 
> Gebäude 35.34 - Raum 208 
> HelmholtzZentrum München 
> bernd.len...@helmholtz-muenchen.de 
> phone: +49 (0)89 3187 1241 
> fax: +49 (0)89 3187 2294 
>
> Wer glaubt das Projektleiter Projekte leiten 
> der glaubt auch das Zitronenfalter 
> Zitronen falten
>  
>
> 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
>
>
> ___
> Users mailing list: Users@clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

-- 
// Kristoffer Grönlund
// kgronl...@suse.com

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] can't start/stop a drbd resource with pacemaker

2016-07-13 Thread Lentes, Bernd
Hi,

i'm new to HA-cluster. I'm currently establishing a two-node cluster and 
playing around with it.
I habe a primitive drdb resource and a corresponding ms one:

crm(live)resource# status

 Master/Slave Set: ms_drbd_r0 [prim_drbd_r0]
 Masters: [ sunhb58820 ]
 Slaves: [ sunhb65278 ]


Starting or stopping drbd with start/stop does not work neither for the ms 
ressource nor for the primitive.
If i try to stop it keeps running. Also if i do a cleanup before (for both 
resources).
Which resource should i stop first ? The primitive or the ms ?
I tried both, but none worked. Other resources, like an ip, can start/stop with 
crm.
When i change the target-role of of the primitive via "crm configure edit" and 
commit that, it starts/stops immediately.
But that can't be the prefered way to start/stop a drbd resource ?

If you need more information ask me.

Thanks.


Bernd

-- 
Bernd Lentes 

Systemadministration 
institute of developmental genetics 
Gebäude 35.34 - Raum 208 
HelmholtzZentrum München 
bernd.len...@helmholtz-muenchen.de 
phone: +49 (0)89 3187 1241 
fax: +49 (0)89 3187 2294 

Wer glaubt das Projektleiter Projekte leiten 
der glaubt auch das Zitronenfalter 
Zitronen falten
 

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


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org