[Pacemaker] Cannot use ocf::heartbeat:IPsrcaddr (RTNETLINK answers: No such process)
Mathieu Peltier
mathieu.peltier at gmail.com
Thu Nov 7 10:06:51 UTC 2013
> I noticed you didn't create a order constraint between the IPaddr and the IPsrcaddr resources. You'll want to guarantee the IP address starts before setting it as the IPsrcaddr.
>
> pcs constraint order VIP_EM1 then PREFERRED_SRC_IP
>
> If that doesn't help anything, we'll need some debug information. After defining the src ip and watching it fail, run this and provide the debug info it provides.
> crm_resource -r PREFERRED_SRC_IP --force-start -VV
Hi,
Yes sorry, I have added the order constraint (and also a colocation constraint):
...
# Define ressources
pcs resource create VIP_EM1 ocf:heartbeat:IPaddr params nic=em1
ip=$VIP_EM1 cidr_netmask=24 op monitor interval=$MONITOR_INTERVAL
pcs resource create PREFERRED_SRC_IP ocf:heartbeat:IPsrcaddr params
ipaddress=$VIP_EM1 op monitor interval=$MONITOR_INTERVAL
pcs constraint order VIP_EM1 then PREFERRED_SRC_IP
pcs constraint colocation add VIP_EM1 PREFERRED_SRC_IP INFINITY
...
I get the same error, but thanks to the debug command you send, I
think I have solved the problem: in fact for some reason, there was a
third network card on the machine attached to the same network. So the
routing table was in fact:
# ip route show
192.168.0.0/24 dev em1 scope link src 192.168.0.106
192.168.0.0/24 dev em2 scope link src 192.168.0.108
192.168.8.0/24 dev em3 proto kernel scope link src 192.168.8.1
When the PREFERRED_SRC_IP resource is started, the following commands
were failing:
> stderr: + 09:21:44: srca_start:184: ip route replace 192.168.0.0/24 dev em2 src 192.168.0.6
> stderr: + 09:21:44: srca_start:187: ip route change to default via 192.168.0.1 dev em1 src 192.168.0.6
It think the wrong nic is returned by findif in this case (is it the
expected behaviour because I am not supposed to have 2 nics affected
to the same network? Or do you think it is a bug?)
# export OCF_RESKEY_ip=192.168.0.6
# /usr/libexec/heartbeat/findif -C
em2 netmask 24 broadcast 192.168.0.255
Anyway deconfiguring the em2 interface solves the error.
Thank you very much for your time.
Mathieu
More information about the Pacemaker
mailing list