[Pacemaker] Several problems with simple virtual-IP config

Florian Haas florian.haas at linbit.com
Tue Feb 8 12:20:25 EST 2011


On 02/08/2011 06:03 PM, Klaus Darilion wrote:
> Hi!
> 
> I'm a newbie and have a problem with a simple virtual-IP config. I want
> the virtual-IP to be either on server1 or server2, depending on which of
> the server is having network connectivity (ping) to the outside. My
> config is:
> 
> node server1 \
>         attributes standby="off"
> node server2 \
>         attributes standby="off"
> primitive failover-ip ocf:heartbeat:IPaddr \
>         params ip="11.222.32.161" \
>         op monitor interval="3s"
> primitive pingtest ocf:pacemaker:pingd \
>         params host_list="11.222.53.113" multiplier="10" dampen="5s" \
>         op monitor interval="10s"
> clone clonePing pingtest
> location aktiverLB failover-ip \
>         rule $id="aktiverLB-rule" pingd: defined pingd
> property $id="cib-bootstrap-options" \
>         dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
>         cluster-infrastructure="openais" \
>         expected-quorum-votes="2" \
>         stonith-enabled="false" \
>         no-quorum-policy="ignore"
> 
> I use Debian Lenny with packages from backports. My problems are:
> 
> 1. After starting /etc/init.d/corosync it takes around 60s until
> pacemaker comes online. Which timer is that? Is it safe to reduce it to
> few seconds?

Why? That would be unsafe if your bootup times differed by, well, a few
seconds. You'd boot up both nodes and boom, your cluster would form two
separate single-node memberships.

> 
> 2. Everything is running and Server1 has the virtual-IP:
> 
>   Online: [ server1 server2 ]
> 
>   failover-ip     (ocf::heartbeat:IPaddr):        Started server1
>    Clone Set: clonePing
>        Started: [ server1 server2 ]
> 
> 
> Then I changed node server2 to standby: # crm node standby server2.
> 
> 
>   Node server2: standby
>   Online: [ server1 ]
> 
>   failover-ip     (ocf::heartbeat:IPaddr):        Started server1
>    Clone Set: clonePing
>        Started: [ server1 ]
>        Stopped: [ pingtest:0 ]
> 
> Why is the output "Stopped: [ pingtest:0 ]" and not as I would expect
> "Stopped: [ server2 ]"?

pingtest is a clone, pingtest:0 is one of two instances of this clone,
and that instance is the one that is currently stopped.


> 3. Now, server1, hosting the virtual-IP, loost connectivity to the ping
> target (I inserted a firewall rule) -> The virtual-IP stayed with server1.

Which is fine, it has no way to go to as server2 is currently in standby.

> Now I put server2 online again: # crm node online server2.
> That means, server2 is online and has ping connectivity, server1 is
> online and doesn't have ping connectivity. But the virtual-IP stayed
> with server1:
> 
>   Online: [ server1 server2 ]
> 
>   failover-ip     (ocf::heartbeat:IPaddr):        Started server1
>    Clone Set: clonePing
>        Started: [ server2 server1 ]
> 
> What do I have to change in the config to have here a failover to server2?

IIUC your pingd attribute is still defined, albeit with a value of 0.
Thus the location constraint is still fulfilled and the pingd score is 0
on both nodes. Equal score means Pacemaker gets to decide where the
resource runs, and currently there is no reason to migrate.

Try this:

location aktiverLB failover-ip \
        rule $id="aktiverLB-rule" -inf: pingd lte 0

or:

location aktiverLB failover-ip \
        rule $id="aktiverLB-rule" inf: pingd gt 0

> 4. IIUC the "clone clonePing pingtest" is necessary to have the ping
> service running on every node. Is this correct? (I'm confused by the
> term 'clone' as this does not seem logical to me).

Yes it is correct, and why is it illogical? It something you define
once, and then Pacemaker creates a "cloned" instance for every node. I
actually think the analogy is quite fitting.

Cheers,
Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110208/d0610559/attachment-0003.sig>


More information about the Pacemaker mailing list