On Tue, 5 Sep 2017 10:47:11 +0200 Martin Pieuchot <[email protected]> wrote:
> On 04/09/17(Mon) 14:53, Gerhard Roth wrote:
> > Hi Martin,
> >
> >
> > On Mon, 4 Sep 2017 14:18:50 +0200 Martin Pieuchot <[email protected]> wrote:
> > > On 04/09/17(Mon) 13:10, Gerhard Roth wrote:
> > > > Hi,
> > > >
> > > > I noticed a problem with the routing table that is easy to reproduce:
> > > > put
> > > > multiple IPs on the same carp interface:
> > >
> > > Great bug analysis, however returning EAGAIN for every route update is a
> > > no go if you have a big routing table like BGP full feeds.
> > >
> > > We should return EAGAIN only if the multipath list contains multiple
> > > elements.
> > >
> > > But since we're now returning EAGAIN much often we want to skip route
> > > entries that have already been borough UP/taken down.
> > >
> > > Diff below does that, does it work for you? Do you mind adding a
> > > regression test?
> >
> > I can confirm that your version works for me. Thanks for the improvement.
> >
> > Regarding the regression test: gimme some time ;)
>
> I wrote this test but I can't reproduce your behavior on -current.
>
> Since I don't see the 'P' flag in your route output I believe you're not
> running current, right?
No, it's current I'm running.
>
> Can you trigger the bug with this test? Or can you adjust it to trigger
> the bug?
Jupp. The problem is that the UP flag on the carp routes does not
appear immediately. And then you put the underlying inferface down
before the carp routes had the RTF_UP set.
Put a short sleep before the "ifconfig vether0 down" and you should be
able to spot the bug.
Gerhard
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/src/regress/sbin/route/Makefile,v
> retrieving revision 1.19
> diff -u -p -r1.19 Makefile
> --- Makefile 10 Aug 2017 13:08:39 -0000 1.19
> +++ Makefile 5 Sep 2017 08:41:30 -0000
> @@ -329,6 +329,23 @@ RTTEST_TARGETS+:=rttest${n}
> rttest${n}:
> ! ${RCMD} change -expire 30 192.0.2.1 192.0.2.2
>
> +
> +#
> +n= 30
> +RTTEST_TARGETS+:=rttest${n}
> +rttest${n}:
> + ${SUDO} ifconfig vether0 rdomain ${RDOMAIN} up
> + ${SUDO} ifconfig carp0 rdomain ${RDOMAIN} carpdev vether0 vhid 3 up
> + ${SUDO} ifconfig carp0 inet alias 10.1.255.1/14
> + ${SUDO} ifconfig carp0 inet alias 10.1.255.2/14
> + ${SUDO} ifconfig vether0 10.1.254.56/14
> + ${SUDO} ifconfig carp0 inet alias 10.1.255.3/14
> + ${SUDO} ifconfig vether0 down
> + ${RCMD} -n show -inet
> + ${SUDO} ifconfig carp0 destroy
> + ${SUDO} ifconfig vether0 destroy
> +
> +
> REGRESS_TARGETS=netmask ${RTTEST_TARGETS}
> REGRESS_ROOT_TARGETS=${REGRESS_TARGETS}
> .PHONY: ${REGRESS_TARGETS}