[Pacemaker] Setting up routing for a virtual ip

Stephan-Frank Henry Frank.Henry at gmx.net
Thu Sep 2 09:40:13 UTC 2010


Hello everyone,

I am currently stuck trying to set up routing for a configured virtual ip to the static ip on the same host.

static ip: 150.158.1.2
(I have two nics in use, but this is the important one)
virtual ip: 1.2.3.4
nic: eth0

versions:
Debian Lenny 2.6.33.3 x86_64
corosync : 1.2.1-1
libheartbeat2 : 3.0.3-2

Here are the relevant parts:
<primitive id="ip_resource" class="ocf" type="IPaddr2" provider="heartbeat">
  <instance_attributes id="virtual-ip-attribs">
    <attributes>
      <nvpair id="virtual-ip-addr" name="ip" value="1.2.3.4"/>
      <nvpair id="virtual-ip-addr-nic" name="nic" value="eth0"/>
      <nvpair id="virtual-ip-addr-netmask" name="cidr_netmask" value="22"/>
    </attributes>
  </instance_attributes>
  <operations>
    <op id="virtual-ip-monitor-10s" interval="10s" name="monitor"/>
  </operations>
</primitive>
<primitive id="ip_gateway" class="ocf" type="Route" provider="heartbeat">
  <instance_attributes id="route-ip-attribs">
    <attributes>
      <nvpair id="gateway-ip-source" name="source" value="1.2.3.4"/>
      <nvpair id="gateway-ip-gateway" name="gateway" value="150.158.1.2"/>
      <nvpair id="gateway-ip-destination" name="destination" value="0.0.0.0/0"/>
      <nvpair id="gateway-ip-device" name="device" value="eth0"/>
    </attributes>
  </instance_attributes>
  <operations>
    <op id="gateway-ip-monitor-10s" timeout="20s" interval="10s" name="monitor"/>
  </operations>
</primitive>

But when I run it, it prints out messages like:
Route[25503]: ERROR: ip_gateway Failed to add network route: to 0.0.0.0/0 via 150.158.1.2 src 1.2.3.5
WARN: unpack_rsc_op: Processing failed op ip_gateway_start_0 on nodealpha: unknown error (1)

I have tried it with variations (f.i. leaving out the device) but without success.

If I remove the routing config, it works fine.

What am I missing?

Could it be related to the fact that I do not see a virtual interface via ifconfig (-a)?

thanks

Frank
-- 
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 &euro;/mtl.!*
http://portal.gmx.net/de/go/dsl



More information about the Pacemaker mailing list