-1

I am having trouble setting up the following with pacemaker:

a 2-node cluster where the master server always has IP address A, and the slave server always has IP address B.

This is a failover cluster, so when the servers switch roles, the IP addresses need to change correspondingly.

Sounds like it should be a simple configuration, but so far, no luck.

3
  • 3
    Yikes. I read the question title and my first thought was that there had been innovations in cardiovascular upgrades. (Bluetooth, perhaps?)
    – JMD
    Oct 5, 2009 at 21:33
  • Can you post your current configuration? Oct 5, 2009 at 21:36
  • At this point we don't have a "current configuration". I am still in the planning phase. Just can't figure out how to do it.
    – Brent
    Oct 7, 2009 at 16:45

2 Answers 2

1

Based on your updated question and comments, I think you're trying to go about this the wrong way. In general, in a failover configuration, each host should have a fixed IP that does not change regardless of its role. So server A is always reachable at x.x.x.a and server B is always reachable at x.x.x.b.

If you want to have an IP by which you always reach the master server, then you want to add an IPaddr resource to your Pacemaker cluster, for an IP that would be x.x.x.c. Pacemaker will then bring up the IP on the interface you specify (or as an alias of an existing interface) and the master will always be reachable by that address.

You could probably also set up another IPaddr resource in the cluster to always run on the secondary node (just set up a rule that it cannot be located on the same node as the primary IPaddr resource, pacemaker should just push it to the secondary node if it is up). However, I've never had a reason to do this in any of the clusters I've set up. Generally the service you're interested in is running on the master node, so that's all you really care about.

This is pretty much the most basic setup and is shown in the examples. If it's not what you're going for, you're going to need to explain your intentions a little more.

Edit:

Based on your latest comments, I think basically what you need to do is create two IPaddr resources, one for the master, one for the slave. On the master resource, add a colocation constraint with a score of INFINITY along side your other cluster resources. For the slave IPaddr, add a colocation constraint of -INFINITY with the master IPaddr.

This will ensure the master IPaddr always runs alongside your cluster resources, and that the slave IPaddr is never on the same node as the master.

2
  • Okay, you're close. Yes, I already have permanent addresses on both servers. I am trying to configure eth0:0 using the master/slave address. I suppose I could just have pacemaker control the Master IP address, and a secondary script control the slave IP address. I was thinking more along the lines of a "multi-state-resource" as described under "clones" in the documentation, so it could all be handled by pacemaker. I guess I figured this was a more common practice.
    – Brent
    Oct 7, 2009 at 18:46
  • ...or alternatively, is there a "resource type" that will bring an IP address up when the cluster member goes "down", and down when it goes up?
    – Brent
    Oct 7, 2009 at 18:48
-2

If a particular server should always have a certain resource, then there's no need for pacemaker. Simplest configuration evah!

4
  • I was about to answer the same thing, but I can think of cases where the requirement makes sense. For example if you are setting up a resource dependency tree in your Pacemaker cluster and you want a resource like an IP address to be unique to a node but only brought up when the node is in active cluster membership. Oct 5, 2009 at 23:57
  • I can't see why you'd ever want that -- it's the difference between "Connection Refused" and "Destination Host Unreachable".
    – womble
    Oct 6, 2009 at 0:15
  • I guess I was unclear - This is a failover situation, so the title of "Master" and "Slave" move back and forth between the two servers. The corresponding IP address needs to change at the same time.
    – Brent
    Oct 7, 2009 at 16:43
  • Then the resource isn't always on the same machine, and this situation doesn't apply.
    – womble
    May 5, 2012 at 5:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .