On Mon, Feb 28, 2022 at 07:32:01AM -0700, Claudio Jeker wrote:
> CVSROOT:      /cvs
> Module name:  src
> Changes by:   clau...@cvs.openbsd.org 2022/02/28 07:32:01
> 
> Modified files:
>       usr.sbin/bgpd  : rde_rib.c 
> 
> Log message:
> Instead of handrolling what is mostly prefix_link/prefix_unlink in
> prefix_move() and prefix_adjout_update() use the functions by
> refactoring them a bit so they work in these cases.
> Move the pftable update and prefix evaluate call to prefix_add
> make nexthop_link() a noop for prefixes of the Adj-RIB-Out and
> in prefix_unlink() don't clear p->pt after the pt_unref() call.
> In prefix_adjout_* functions make sure to call prefix_unlink() when
> a prefix is linked and gets removed or replaced.
> OK tb@

Some of yesterday's changes caused the following two tests to fail
consistently here. Seeing the following in /var/log/messages:

Mar  1 07:23:43 amd64-regress bgpd[27294]: RTR: Lost connection to RDE
Mar  1 07:23:43 amd64-regress bgpd[66506]: peer closed imsg connection
Mar  1 07:23:43 amd64-regress bgpd[48466]: main: Lost connection to RDE
Mar  1 07:23:43 amd64-regress bgpd[66506]: SE: Lost connection to RDE
Mar  1 07:23:43 amd64-regress bgpd[27294]: peer closed imsg connection
Mar  1 07:23:43 amd64-regress bgpd[66506]: peer closed imsg connection
Mar  1 07:23:43 amd64-regress bgpd[27294]: fatal in RTR: Lost connection to 
parent
Mar  1 07:23:43 amd64-regress bgpd[66506]: SE: Lost connection to RDE control
Mar  1 07:23:43 amd64-regress bgpd[66506]: peer closed imsg connection
Mar  1 07:23:43 amd64-regress bgpd[66506]: SE: Lost connection to parent
Mar  1 07:23:43 amd64-regress bgpd[66506]: neighbor 10.12.57.1 (RDOMAIN1): 
sending notification: Cease, administratively down
Mar  1 07:23:43 amd64-regress bgpd[66506]: neighbor 10.12.57.1 (RDOMAIN1): 
state change Established -> Idle, reason: Stop
Mar  1 07:23:43 amd64-regress bgpd[66506]: session engine exiting
Mar  1 07:23:43 amd64-regress bgpd[48466]: route decision engine terminated; 
signal 6

> usr.sbin/bgpd:
Exit: 1
Duration: 00:01:46
Log: 237-usr.sbin-bgpd.log

==== network_statement ====
doas -n ksh 
/home/src/regress/usr.sbin/bgpd/integrationtests/network_statement.sh 
/usr/sbin/bgpd /home/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 
pair12
check if rdomains are busy
check if interfaces are busy
+ echo setup
setup
+ ifconfig pair11 rdomain 11 10.12.57.1/30 up
+ ifconfig pair12 rdomain 12 10.12.57.2/30 up
+ ifconfig pair11 patch pair12
+ ifconfig lo11 inet 127.0.0.1/8
+ ifconfig lo12 inet 127.0.0.1/8
+ echo add routes
add routes
+ route -T 12 add 10.12.58.0/24 10.12.57.1
add net 10.12.58.0/24: gateway 10.12.57.1
+ ifconfig pair12 alias 10.12.59.1/24
+ route -T 12 add -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1
add net 10.12.60.0/24: gateway 10.12.57.1
+ route -T 12 add -priority 55 10.12.61.0/24 10.12.57.1
add net 10.12.61.0/24: gateway 10.12.57.1
+ route -T 11 exec /usr/sbin/bgpd -v -f 
/home/src/regress/usr.sbin/bgpd/integrationtests/bgpd.network_statement.rdomain1.conf
+ route -T 12 exec /usr/sbin/bgpd -v -f 
/home/src/regress/usr.sbin/bgpd/integrationtests/bgpd.network_statement.rdomain2.conf
+ wait_until
+ << EOF 
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ echo test 1
test 1
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep 10.12.58.0/24
*>      N 10.12.58.0/24        10.12.57.2        100     0 4200000002 i
+ route -T 11 exec bgpctl sh rib 10.12.59.0/24
+ grep 10.12.59.0/24
*>      N 10.12.59.0/24        10.12.57.2        100     0 4200000002 i
+ route -T 11 exec bgpctl sh rib 10.12.60.0/24
+ grep 10.12.60.0/24
*>      N 10.12.60.0/24        10.12.57.2        100     0 4200000002 i
+ route -T 11 exec bgpctl sh rib 10.12.61.0/24
+ grep 10.12.61.0/24
*>      N 10.12.61.0/24        10.12.57.2        100     0 4200000002 i
+ route -T 11 exec bgpctl sh rib 10.12.62.0/24
+ grep 10.12.62.0/24
*>      N 10.12.62.0/24        10.12.57.2        100     0 4200000002 i
+ echo delete routes
delete routes
+ route -T 12 delete 10.12.58.0/24 10.12.57.1
delete net 10.12.58.0/24: gateway 10.12.57.1
+ ifconfig pair12 -alias 10.12.59.1
+ route -T 12 delete -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1
delete net 10.12.60.0/24: gateway 10.12.57.1
+ route -T 12 delete -priority 55 10.12.61.0/24 10.12.57.1
delete net 10.12.61.0/24: gateway 10.12.57.1
+ wait_until
+ << EOF 
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ echo test 2
test 2
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.59.0/24
+ grep 10.12.59.0/24
+ route -T 11 exec bgpctl sh rib 10.12.60.0/24
+ grep 10.12.60.0/24
+ route -T 11 exec bgpctl sh rib 10.12.61.0/24
+ grep 10.12.61.0/24
+ sleep 1
+ echo add routes
add routes
+ route -T 12 add 10.12.58.0/24 10.12.57.1
add net 10.12.58.0/24: gateway 10.12.57.1
+ ifconfig pair12 alias 10.12.59.1/24
+ route -T 12 add -label PAIR2RTABLE 10.12.60.0/24 10.12.57.1
add net 10.12.60.0/24: gateway 10.12.57.1
+ route -T 12 add -priority 55 10.12.61.0/24 10.12.57.1
add net 10.12.61.0/24: gateway 10.12.57.1
+ wait_until
+ << EOF 
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
+ route -T 11 exec bgpctl sh rib 10.12.58.0/24
+ grep -q 10.12.58.0/24
timeout
+ error_notify 1
cleanup
FAILED
*** Error 1 in integrationtests (Makefile:14 'network_statement')
FAILED

==== med ====
sed -e 's|##OBJDIR##|/home/src/regress/usr.sbin/bgpd/integrationtests/obj|g'  
/home/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.in > 
exabgp.med.conf ||  (rm exabgp.med.conf && exit 1)
doas -n ksh /home/src/regress/usr.sbin/bgpd/integrationtests/med.sh 
/usr/sbin/bgpd /home/src/regress/usr.sbin/bgpd/integrationtests 11 12 pair11 
pair12
check if rdomains are busy
check if interfaces are busy
+ echo setup
setup
+ ifconfig pair11 rdomain 11 10.12.57.1/29 up
+ ifconfig pair12 rdomain 12 10.12.57.2/29 up
+ ifconfig pair12 alias 10.12.57.3/32
+ ifconfig pair12 alias 10.12.57.4/32
+ ifconfig pair12 alias 10.12.57.5/32
+ ifconfig pair11 patch pair12
+ ifconfig lo11 inet 127.0.0.1/8
+ ifconfig lo12 inet 127.0.0.1/8
+ [ -p med.fifo ]
+ mkfifo med.fifo
+ echo run bgpd
run bgpd
+ route -T 11 exec /usr/sbin/bgpd -v -f 
/home/src/regress/usr.sbin/bgpd/integrationtests/bgpd.med.conf
+ sleep 1
+ echo run exabgp
run exabgp
+ sleep 2
+ run_exabgp med exabgp.med.conf
neighbor 10.12.57.1 connected
neighbor 10.12.57.1 connected
neighbor 10.12.57.1 connected
neighbor 10.12.57.1 up
neighbor 10.12.57.1 up
neighbor 10.12.57.1 up
+ echo test 1
test 1
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.2 announce route 10.12.1.0/24 
next-hop self as-path [ 64501 64510 ] med 100
done
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.3 announce route 10.12.1.0/24 
next-hop self as-path [ 64502 64510 ] med 100
done
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.4 announce route 10.12.1.0/24 
next-hop self as-path [ 64501 64510 ] med 50
done
+ sleep 5
+ route -T 11 exec bgpctl sh rib
+ tee med.out
flags: * = Valid, > = Selected, I = via IBGP, A = Announced,
       S = Stale, E = Error
origin validation state: N = not-found, V = valid, ! = invalid
origin: i = IGP, e = EGP, ? = Incomplete

flags ovs destination          gateway          lpref   med aspath origin
*>      N 10.12.1.0/24         10.12.57.3        100   100 64502 64510 i
*       N 10.12.1.0/24         10.12.57.4        100    50 64501 64510 i
*       N 10.12.1.0/24         10.12.57.2        100   100 64501 64510 i
+ sleep .2
+ diff -u /home/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok med.out
+ echo OK
OK
+ exacmd clear adj-rib out all peers
done
neighbor 10.12.57.1 down - peer reset, message [notification sent (1,0)] 
error[Message header error / Unspecific / can not decode update message of type 
"3"]
neighbor 10.12.57.1 down - peer reset, message [notification sent (1,0)] 
error[Message header error / Unspecific / can not decode update message of type 
"3"]
neighbor 10.12.57.1 down - peer reset, message [notification sent (1,0)] 
error[Message header error / Unspecific / can not decode update message of type 
"3"]
+ echo test 2
test 2
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.4 announce route 10.12.1.0/24 
next-hop self as-path [ 64501 64510 ] med 50
done
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.3 announce route 10.12.1.0/24 
next-hop self as-path [ 64502 64510 ] med 100
done
+ exacmd neighbor 10.12.57.1 router-id 10.12.57.2 announce route 10.12.1.0/24 
next-hop self as-path [ 64501 64510 ] med 100
done
+ sleep 5
+ route -T 11 exec bgpctl sh rib
+ tee med.out
bgpctl: connect: /var/run/bgpd.sock.11: Connection refused
+ sleep .2
+ diff -u /home/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok med.out
--- /home/src/regress/usr.sbin/bgpd/integrationtests/exabgp.med.ok      Tue Jan 
12 09:59:03 2021
+++ med.out     Tue Mar  1 06:02:33 2022
@@ -1,9 +0,0 @@
-flags: * = Valid, > = Selected, I = via IBGP, A = Announced,
-       S = Stale, E = Error
-origin validation state: N = not-found, V = valid, ! = invalid
-origin: i = IGP, e = EGP, ? = Incomplete
-
-flags ovs destination          gateway          lpref   med aspath origin
-*>      N 10.12.1.0/24         10.12.57.3        100   100 64502 64510 i
-*       N 10.12.1.0/24         10.12.57.4        100    50 64501 64510 i
-*       N 10.12.1.0/24         10.12.57.2        100   100 64501 64510 i
+ error_notify 1
cleanup
FAILED
*** Error 1 in integrationtests (Makefile:51 'med')
FAILED

Reply via email to