Re: [ClusterLabs] service flap as nodes join and leave

2016-04-18 Thread Christopher Harvey
On Thu, Apr 14, 2016, at 11:12 AM, Ken Gaillot wrote:
> On 04/14/2016 09:33 AM, Christopher Harvey wrote:
> > MsgBB-Active is a dummy resource that simply returns OCF_SUCCESS on
> > every operation and logs to a file.
> 
> That's a common mistake, and will confuse the cluster. The cluster
> checks the status of resources both where they're supposed to be running
> and where they're not. If status always returns success, the cluster
> won't try to start it where it should,, and will continuously try to
> stop it elsewhere, because it thinks it's already running everywhere.
> 
> It's essential that an RA distinguish between running
> (OCF_SUCCESS/OCF_RUNNING_MASTER), cleanly not running (OCF_NOT_RUNNING),
> and unknown/failed (OCF_ERR_*/OCF_FAILED_MASTER).

Solved. Thanks!

> See pacemaker's Dummy agent as an example/template:
> 
> https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/Dummy
> 
> It touches a temporary file to know whether it is "running" or not.
> 
> ocf-shellfuncs has a ha_pseudo_resource() function that does the same
> thing. See the ocf:heartbeat:Delay agent for example usage.
> 
> ___
> 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

___
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] Moving Related Servers

2016-04-18 Thread ‪H Yavari‬ ‪
Hi,
This is servers maps:
App 3-> App 1    (Active)
App 4 -> App 2   (Standby)


Now App1 and App2 are in a cluster with IP failover. 

I need when IP failover will run and App2 will be Active node, service "X" on 
server App3 will be stop and App 4 will be Active node.In the other words, App1 
works only with App3 and App 2 works with App 4.
I have a web application on App1 and some services on App 3 (this is same for 
App2 and App 4)

Sorry for heavy description.


  From: Ken Gaillot 
 To: users@clusterlabs.org 

On 04/18/2016 02:34 AM, ‪H Yavari‬ ‪ wrote:
> Hi,
> 
> I have 4 CentOS servers (App1,App2.App3 and App4). I created a cluster
> for App1 and App2 with a IP float and it works well.
> In our infrastructure App1 works only with App3 and App2 only works with
> App4. I mean we have 2 server sets (App1 and App3) , (App2 and App4).
> So I want when server app1 is down and app2 will Online node, App3 will
> offline too and App4 will Online and vice versa, I mean when App3 is
> down and App4 will Online, App1 will offline too.
> 
> 
> How can I do with pacemaker ? we have our self service on servers so how
> can I user Pacemaker for monitoring these services?
> 
> Thanks for reply.
> 
> Regards.
> H.Yavari

I'm not sure I understand your requirements.

There's no way to tell one node to leave the cluster when another node
is down, and it would be a bad idea if you could: the nodes could never
start up, because each would wait to see the other before starting; and
in your cluster, two nodes shutting down would make the cluster lose
quorum, so the other nodes would refuse to run any resources.

However, it is usually possible to use constraints to enforce any
desired behavior. So even those the node might not leave the cluster,
you could make the cluster not place any resources on that node.

Can you give more information about your resources and what nodes they
are allowed to run on? What makes App1 and App3 dependent on each other?

___
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


  ___
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] Utilization zones

2016-04-18 Thread Ferenc Wágner
Hi,

I'm using the "balanced" placement strategy with good success.  It
distributes our VM resources according to memory size perfectly.
However, I'd like to take the NUMA topology into account.  That means
each host should have several capacity pools (of each capacity type) to
arrange the resources in.  Can Pacemaker do something like this?
-- 
Thanks,
Feri

___
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] Moving Related Servers

2016-04-18 Thread Ken Gaillot
On 04/18/2016 02:34 AM, ‪H Yavari‬ ‪ wrote:
> Hi,
> 
> I have 4 CentOS servers (App1,App2.App3 and App4). I created a cluster
> for App1 and App2 with a IP float and it works well.
> In our infrastructure App1 works only with App3 and App2 only works with
> App4. I mean we have 2 server sets (App1 and App3) , (App2 and App4).
> So I want when server app1 is down and app2 will Online node, App3 will
> offline too and App4 will Online and vice versa, I mean when App3 is
> down and App4 will Online, App1 will offline too.
> 
> 
> How can I do with pacemaker ? we have our self service on servers so how
> can I user Pacemaker for monitoring these services?
> 
> Thanks for reply.
> 
> Regards.
> H.Yavari

I'm not sure I understand your requirements.

There's no way to tell one node to leave the cluster when another node
is down, and it would be a bad idea if you could: the nodes could never
start up, because each would wait to see the other before starting; and
in your cluster, two nodes shutting down would make the cluster lose
quorum, so the other nodes would refuse to run any resources.

However, it is usually possible to use constraints to enforce any
desired behavior. So even those the node might not leave the cluster,
you could make the cluster not place any resources on that node.

Can you give more information about your resources and what nodes they
are allowed to run on? What makes App1 and App3 dependent on each other?

___
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] Fw: Moving Related Servers

2016-04-18 Thread ‪H Yavari‬ ‪


Hi,
I have 4 CentOS servers (App1,App2.App3 and App4). I created a cluster for App1 
and App2 with a IP float and it works well. In our infrastructure App1 works 
only with App3 and App2 only works with App4. I mean we have 2 server sets 
(App1 and App3) , (App2 and App4).So I want when server app1 is down and app2 
will Online node, App3 will offline too and App4 will Online and vice versa, I 
mean when App3 is down and App4 will Online, App1 will offline too.

How can I do with pacemaker ? we have our self service on servers so how can I 
user Pacemaker for monitoring these services?

Thanks for reply.
Regards.H.Yavari


   ___
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] Moving Related Servers

2016-04-18 Thread ‪H Yavari‬ ‪
Hi,
I have 4 CentOS servers (App1,App2.App3 and App4). I created a cluster for App1 
and App2 with a IP float and it works well. In our infrastructure App1 works 
only with App3 and App2 only works with App4. I mean we have 2 server sets 
(App1 and App3) , (App2 and App4).So I want when server app1 is down and app2 
will Online node, App3 will offline too and App4 will Online and vice versa, I 
mean when App3 is down and App4 will Online, App1 will offline too.

How can I do with pacemaker ? we have our self service on servers so how can I 
user Pacemaker for monitoring these services?

Thanks for reply.
Regards.H.Yavari
___
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