[Pacemaker] Finally. A REAL question.

Andrew Beekhof andrew at beekhof.net
Mon Nov 18 03:48:09 UTC 2013


On 18 Nov 2013, at 12:43 pm, Rob Thomas <xrobau at gmail.com> wrote:

> Previously, using crm, it was reasonably painless to ensure that
> resource groups ran on the same node.
> 
> I'm having difficulties figuring out what the 'right' way to do this is with pcs

You tried:

   pcs constraint colocation add asterisk with httpd

?

> 
> Specifically, I want the 'asterisk' group to run on the same node as
> the 'httpd' group.
> 
> Basically, this should never happen:
> 
> pcs status
> Cluster name: freepbx-ha
> Last updated: Mon Nov 18 11:38:27 2013
> Last change: Mon Nov 18 11:30:44 2013 via cibadmin on freepbx-a
> Stack: cman
> Current DC: freepbx-a - partition with quorum
> Version: 1.1.10-1.el6_4.4-368c726
> 2 Nodes configured
> 16 Resources configured
> 
> 
> Online: [ freepbx-a freepbx-b ]
> 
> Full list of resources:
> 
> floating_ip    (ocf::heartbeat:IPaddr2):       Started freepbx-b
> Master/Slave Set: ms-asterisk [drbd_asterisk]
>     Masters: [ freepbx-b ]
>     Slaves: [ freepbx-a ]
> Master/Slave Set: ms-mysql [drbd_mysql]
>     Masters: [ freepbx-a ]
>     Slaves: [ freepbx-b ]
> Master/Slave Set: ms-httpd [drbd_httpd]
>     Masters: [ freepbx-a ]
>     Slaves: [ freepbx-b ]
> Resource Group: mysql
>     mysql_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a
>     mysql_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a
>     mysql_service      (ocf::heartbeat:mysql): Started freepbx-a
> Resource Group: asterisk
>     asterisk_fs        (ocf::heartbeat:Filesystem):    Started freepbx-b
>     asterisk_ip        (ocf::heartbeat:IPaddr2):       Started freepbx-b
>     asterisk_service   (ocf::heartbeat:freepbx):       Started freepbx-b
> Resource Group: httpd
>     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a
>     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a
>     httpd_service      (ocf::heartbeat:apache):        Started freepbx-a
> 
> 
> Note that asterisk and httpd are running on different nodes, after I
> caused asterisk to fail across (by shutting it down)
> 
> What I want to happen is that when asterisk fails (or httpd), the
> cluster should shut down the other non failing resource, and move it
> 
> I can do this by making a single resource group that contains both the
> asterisk_ and httpd_ resources, but, it seems untidy to me.
> 
> I've tried a colocation set, which does let you add groups, but it
> doesn't seem to do what I'm after.
> 
> Attached is the dump of my current config.
> 
> Any advice or help would be appreciated!
> 
> (Currently on CentOS 6.4, with pacemaker 1.1.10, and pcs 0.9.90)
> 
> --Rob
> <cibadmin.xml>_______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131118/ef513ee5/attachment-0004.sig>


More information about the Pacemaker mailing list