[Pacemaker] findif.sh
Andrew Beekhof
andrew at beekhof.net
Fri Nov 1 02:03:07 UTC 2013
On 1 Nov 2013, at 12:19 pm, Andrew Beekhof <andrew at beekhof.net> wrote:
> Howdy,
>
> Could we get some documentation for findif.sh?
> Specifically what should and shouldn't work.
>
> I'm seeing various behaviour and its not clear to me whether the results are intended or not.
>
>
> My eth0:
> inet 192.168.122.101/24 scope global eth0
> inet6 fe80::5054:ff:fee8:c8a7/64 scope link
>
> [root at pcmk-1 ~]# ip -o -f inet route list match 192.168.122.101/32 scope link
> 192.168.122.0/24 dev eth0 proto kernel src 192.168.122.101
> [root at pcmk-1 ~]# ip -o -f inet route list match 192.168.122.102/32 scope link
> 192.168.122.0/24 dev eth0 proto kernel src 192.168.122.101
>
> so far so good. floating IPs are often on a different subnet though:
>
> [root at pcmk-1 ~]# ip -o -f inet route list match 192.168.123.102/32 scope link
> [root at pcmk-1 ~]#
>
> Nothing, at which point findif bails out.
> Perhaps we cant exclusively rely on 'ip route list match'?
> Pretty sure this used to work but I could be wrong.
>
> Interestingly, it works if we drop the 'scope link'
>
> [root at pcmk-1 ~]# ip -o -f inet route list match 192.168.123.102/32
> default via 192.168.122.1 dev eth0 proto static metric 1024
>
> Loopback addresses also don't produce anything useful which I found surprising:
>
> [root at pcmk-1 ~]# ip -o -f inet route list match 127.0.0.2/32 scope link
> [root at pcmk-1 ~]# ip -o -f inet route list match 127.0.0.1/32 scope link
> [root at pcmk-1 ~]# ip -o -f inet route list match 127.0.0.1/8 scope link
> [root at pcmk-1 ~]#
>
> But again, dropping 'scope link' seems to work.
>
> [root at pcmk-1 ~]# ip -o -f inet route list match 127.0.0.2/32
> default via 192.168.122.1 dev eth0 proto static metric 1024
>
I'm also not convinced this is true for ipv6:
ocf_log err "'nic' parameter is mandatory for a link local address [$match]."
'route list match' seems to function just fine without it
More information about the Pacemaker
mailing list