Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route Refresh restarts peer #1237

Open
djb610 opened this issue Sep 24, 2024 · 6 comments
Open

Route Refresh restarts peer #1237

djb610 opened this issue Sep 24, 2024 · 6 comments
Assignees
Labels

Comments

@djb610
Copy link

djb610 commented Sep 24, 2024

** Bug Report **
Similar issue to #708

When route-refresh is requested the BGP Peer restarts.

Tue, 24 Sep 2024 10:42:22 18     outgoing-1    peer reset, message [] error[]
Tue, 24 Sep 2024 10:42:22 18     outgoing-1    outgoing-1 172.16.20.36-172.16.24.20, closing connection
Tue, 24 Sep 2024 10:42:22 18     reactor       initialising connection to peer-1
Tue, 24 Sep 2024 10:42:22 18     outgoing-5    attempting connection to 172.16.24.20:179
<< message of type ROUTE_REFRESH
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       EXABGP MISBEHAVED / HELP US FIX IT
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       Sorry, you encountered a problem with ExaBGP, as the problem only affects one
Tue, 24 Sep 2024 10:42:22 18     reactor       peer, we are trying to keep the program running.
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       There are a few things you can do to help us (and yourself):
Tue, 24 Sep 2024 10:42:22 18     reactor       - make sure you are running the latest version of the code available at
Tue, 24 Sep 2024 10:42:22 18     reactor         https://github.com/Exa-Networks/exabgp/releases/latest
Tue, 24 Sep 2024 10:42:22 18     reactor       - if so report the issue on https://github.com/Exa-Networks/exabgp/issues
Tue, 24 Sep 2024 10:42:22 18     reactor         so it can be fixed (github can be searched for similar reports)
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       PLEASE, when reporting, do include as much information as you can:
Tue, 24 Sep 2024 10:42:22 18     reactor       - do not obfuscate any data (feel free to send us a private  email with the
Tue, 24 Sep 2024 10:42:22 18     reactor         extra information if your business policy is strict on information sharing)
Tue, 24 Sep 2024 10:42:22 18     reactor         https://github.com/Exa-Networks/exabgp/wiki/FAQ
Tue, 24 Sep 2024 10:42:22 18     reactor       - if you can reproduce the issue, run ExaBGP with the command line option -d
Tue, 24 Sep 2024 10:42:22 18     reactor         it provides us with much needed information to fix problems quickly
Tue, 24 Sep 2024 10:42:22 18     reactor       - include the information presented below
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       Should you not receive an acknowledgment of your issue on github (assignement,
Tue, 24 Sep 2024 10:42:22 18     reactor       comment, or similar) within a few hours, feel free to email us to make sure
Tue, 24 Sep 2024 10:42:22 18     reactor       it was not overlooked. (please keep in mind the authors are based in GMT/Europe)
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       -- Please provide ALL the information below on :
Tue, 24 Sep 2024 10:42:22 18     reactor       -- https://github.com/Exa-Networks/exabgp/issues
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       ExaBGP version : 4.2.22
Tue, 24 Sep 2024 10:42:22 18     reactor       Python version : 3.8.10 (default, May  6 2021, 06:30:44)  [GCC 9.3.0]
Tue, 24 Sep 2024 10:42:22 18     reactor       System Uname   : #1 SMP Tue Oct 12 11:32:07 PDT 2021
Tue, 24 Sep 2024 10:42:22 18     reactor       System MaxInt  : 9223372036854775807
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       <class 'TypeError'>
Tue, 24 Sep 2024 10:42:22 18     reactor       'RouteRefresh' object is not iterable
Tue, 24 Sep 2024 10:42:22 18     reactor       Traceback (most recent call last):
Tue, 24 Sep 2024 10:42:22 18     reactor         File "/usr/lib/python3.8/site-packages/exabgp/reactor/peer.py", line 554, in _run
Tue, 24 Sep 2024 10:42:22 18     reactor           for action in self._main():
Tue, 24 Sep 2024 10:42:22 18     reactor         File "/usr/lib/python3.8/site-packages/exabgp/reactor/peer.py", line 502, in _main
Tue, 24 Sep 2024 10:42:22 18     reactor           six.next(new_routes)
Tue, 24 Sep 2024 10:42:22 18     reactor         File "/usr/lib/python3.8/site-packages/exabgp/reactor/protocol.py", line 372, in new_update
Tue, 24 Sep 2024 10:42:22 18     reactor           for message in update.messages(self.negotiated, include_withdraw):
Tue, 24 Sep 2024 10:42:22 18     reactor         File "/usr/lib/python3.8/site-packages/exabgp/bgp/message/update/__init__.py", line 116, in messages
Tue, 24 Sep 2024 10:42:22 18     reactor           for nlri in sorted(self.nlris):
Tue, 24 Sep 2024 10:42:22 18     reactor       TypeError: 'RouteRefresh' object is not iterable
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       -- Please provide _ALL_ the information above on :
Tue, 24 Sep 2024 10:42:22 18     reactor       -- https://github.com/Exa-Networks/exabgp/issues
Tue, 24 Sep 2024 10:42:22 18     reactor       ********************************************************************************
Tue, 24 Sep 2024 10:42:22 18     reactor       
Tue, 24 Sep 2024 10:42:22 18     outgoing-1    peer reset, message [] error[]
Tue, 24 Sep 2024 10:42:22 18     outgoing-1    outgoing-1 172.16.20.36-172.16.24.20, closing connection
Tue, 24 Sep 2024 10:42:22 18     reactor       initialising connection to peer-1
Tue, 24 Sep 2024 10:42:22 18     outgoing-5    attempting connection to 172.16.24.20:179

To Reproduce

database is cleared/flushed manually request to route -refresh with exabgp-cli.

announce route-refresh ipv4 unicast

Expected behavior

No BGP restart with route refresh

ExaBGP version : 4.2.22
Python version : 3.8.10

@djb610 djb610 added the bug label Sep 24, 2024
@thomas-mangin thomas-mangin removed their assignment Sep 24, 2024
thomas-mangin added a commit that referenced this issue Sep 25, 2024
@thomas-mangin
Copy link
Member

I can not reproduce the issue, clearer steps are required for me to be able to help.

@thomas-mangin thomas-mangin self-assigned this Sep 25, 2024
@djb610
Copy link
Author

djb610 commented Oct 1, 2024

I am using 2 instances of EXA BGP sending peer to a receiving peer. The receive peer initiates route-refresh using the announce route cli command. we see the EXABGP restart on the sending.

Example BGP Neighbour statement:
neighbor fd00:c1cd:2a4::20 { # Neighbor to peer with
local-address fd00:c1cd:2a3::24; # Our local router-id
router-id 172.16.20.36; # Our local update-source
local-as 2856; # Our local AS
peer-as 36040; # Peer's AS
hold-time 3600;
capability {
route-refresh;
}
family {
ipv6 unicast;
}
}

@thomas-mangin
Copy link
Member

Can you please check the latest master following 7605037

@thomas-mangin
Copy link
Member

I tested using two files:

❯ cat respond.conf request.conf 
neighbor 127.0.0.1 {
	local-address 127.0.0.1;
	router-id 172.16.20.36;
	local-as 1;
	peer-as 1;
	hold-time 3600;

	passive true;
	listen 179;

	capability {
		route-refresh;
	}
	announce {
		ipv4 {
			unicast 10.0.4.0/24 next-hop 10.0.255.254 local-preference 200;
			unicast 10.0.5.0/24 next-hop 10.0.255.254 local-preference 200;
		}
	}
}
neighbor 127.0.0.1 {
	router-id 10.0.0.1;
	local-address 127.0.0.1;
	local-as 1;
	peer-as 1;

	capability {
		route-refresh;
	}

	announce {
		ipv4 {
		}
	}
}
sudo env exabgp.api.cli=false ./sbin/exabgp -d respond.conf
./sbin/exabgp -d request.conf
./sbin/exabgp cli announce route-refresh ipv4 unicast

@djb610
Copy link
Author

djb610 commented Nov 29, 2024

Hi Thomas, thank you for your update. I have tried adding the code in your update but route-refresh does not work. Looking through the code there seems to be quite a few differences even though we are using 4.2.22.
So I can plan ahead with upcoming work, do you know when the next release is planned? if it is likely to be a few months away I will go through and update the files we are using.
Thanks, Dan

@thomas-mangin
Copy link
Member

Yes master is a few years ahead, literally, from 4.2
There is no regular release schedule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants