luis5tb / bgp-agent Goto Github PK
View Code? Open in Web Editor NEWBGP Agent to expose VMs through BGP on OVN environments
License: Apache License 2.0
BGP Agent to expose VMs through BGP on OVN environments
License: Apache License 2.0
So after leaving the agent running a few hours we had podman dying on us with the following error:
Error: error creating libpod runtime: error configuring CNI network plugin: could not create new watcher too many open files
The problem is that bgp-agent used up all the inotify watchers on the system:
find /proc/*/fd -lname anon_inode:inotify |wc -l
Showed that ~1020 something watchers were being used by the bgp agent container:
root 163246 43.2 21.1 38132540 3425504 ? Ssl Mar16 463:00 _ /usr/bin/python3 /usr/local/bin/bgp-agent
Default numbers:
[root@ctrl-2-0 ~]# cat /proc/sys/fs/inotify/max_*
16384
1024
8192
Hi,
I am following your blog to create my lab the way you did here https://ltomasbo.wordpress.com/2021/02/04/ovn-bgp-agent-testing-setup/ but i am using Ubuntu 20.04 instead of CentOS8 which is dead and hard to install devstack.
Everything went well but i stuck here when installing bgp-agent
$ python3 setup.py install
Encounter following error when i execute bgp-agent
root@rack-1-host-2:/usr/local/bin# bgp-agent
2022-07-22 03:41:31.321 111323 INFO bgp_agent.config [-] Logging enabled!
2022-07-22 03:41:31.666 111323 CRITICAL bgp-agent [-] Unhandled error: AssertionError
2022-07-22 03:41:31.666 111323 ERROR bgp-agent Traceback (most recent call last):
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/bin/bgp-agent", line 10, in <module>
2022-07-22 03:41:31.666 111323 ERROR bgp-agent sys.exit(start())
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/agent.py", line 76, in start
2022-07-22 03:41:31.666 111323 ERROR bgp-agent bgp_agent_launcher = service.launch(config.CONF, BGPAgent())
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/agent.py", line 44, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent self.agent_driver = driver_api.AgentDriverBase.get_instance(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/platform/driver_api.py", line 25, in get_instance
2022-07-22 03:41:31.666 111323 ERROR bgp-agent agent_driver = stevedore_driver.DriverManager(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/stevedore/driver.py", line 54, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent super(DriverManager, self).__init__(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/stevedore/named.py", line 78, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent extensions = self._load_plugins(invoke_on_load,
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/stevedore/extension.py", line 221, in _load_plugins
2022-07-22 03:41:31.666 111323 ERROR bgp-agent ext = self._load_one_plugin(ep,
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/stevedore/named.py", line 156, in _load_one_plugin
2022-07-22 03:41:31.666 111323 ERROR bgp-agent return super(NamedExtensionManager, self)._load_one_plugin(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/stevedore/extension.py", line 257, in _load_one_plugin
2022-07-22 03:41:31.666 111323 ERROR bgp-agent obj = plugin(*invoke_args, **invoke_kwds)
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/platform/osp/ovn_bgp_driver.py", line 64, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent self._sb_idl = ovn.OvnSbIdl(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/platform/osp/utils/ovn.py", line 62, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent super(OvnSbIdl, self).__init__(
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/bgp_agent/platform/osp/utils/ovn.py", line 31, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent super(OvnIdl, self).__init__(remote, schema)
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 283, in __init__
2022-07-22 03:41:31.666 111323 ERROR bgp-agent schema = schema_helper.get_idl_schema()
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 2323, in get_idl_schema
2022-07-22 03:41:31.666 111323 ERROR bgp-agent self._keep_table_columns(schema, table, columns))
2022-07-22 03:41:31.666 111323 ERROR bgp-agent File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 2330, in _keep_table_columns
2022-07-22 03:41:31.666 111323 ERROR bgp-agent assert table_name in schema.tables
2022-07-22 03:41:31.666 111323 ERROR bgp-agent AssertionError
2022-07-22 03:41:31.666 111323 ERROR bgp-agent
Hi,
What is the reason for using gateway chassis for self-service network routing? If the SNAT is not enabled for the Routers, the host routes of the VM can be advertised to the underlay.
And also, for the BGP agent, instead of using kernel space for BGP next-hop, the solution BGP floating IPs over l2 segmented network seems a promising feature. It allows a BGP next-hop address space that can be used for advertising the routes. While creating the router, using this feature, a unique ip address can be assigned to every DVR where FRR will use this ip address as a BGP next-hop. This unique address can also be used for distributed SNAT.
Heya Luis,
just to not lose track of this one. On a TLS-E env I see the following traceback with the agent:
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent Traceback (most recent call last):
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/bin/bgp-agent", line 10, in <module>
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent sys.exit(start())
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/agent.py", line 76, in start
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent bgp_agent_launcher = service.launch(config.CONF, BGPAgent())
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/agent.py", line 45, in __init__
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent CONF.driver)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/platform/driver_api.py", line 28, in get_insta
nce
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent invoke_on_load=True
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/driver.py", line 62, in __init__
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent warn_on_missing_entrypoint=warn_on_missing_entrypoint
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/named.py", line 81, in __init__
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent verify_requirements)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/extension.py", line 233, in _load_plugins
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent self._on_load_failure_callback(self, ep, err)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/extension.py", line 225, in _load_plugins
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent verify_requirements,
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/named.py", line 158, in _load_one_plugin
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent verify_requirements,
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/stevedore/extension.py", line 257, in _load_one_plugin
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent obj = plugin(*invoke_args, **invoke_kwds)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/platform/osp/ovn_driver.py", line 66, in __ini
t__
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent events=events)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/platform/osp/utils/ovn.py", line 46, in __init
__
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent helper = self._get_ovsdb_helper(connection_string)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/local/lib/python3.6/site-packages/bgp_agent/platform/osp/utils/ovn.py", line 61, in _get_o
vsdb_helper
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent return idlutils.get_schema_helper(connection_string, self.SCHEMA)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/ovsdbapp/backend/ovs_idl/idlutils.py", line 183, in get_schema
_helper
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent stream.Stream.open(c))
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib64/python3.6/site-packages/ovs/stream.py", line 192, in open
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent error, sock = cls._open(suffix, dscp)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib64/python3.6/site-packages/ovs/stream.py", line 795, in _open
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent ctx.use_privatekey_file(Stream._SSL_private_key_file)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/OpenSSL/SSL.py", line 985, in use_privatekey_file
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent keyfile = _path_string(keyfile)
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent File "/usr/lib/python3.6/site-packages/OpenSSL/_util.py", line 107, in path_string
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent raise TypeError("Path must be represented as bytes or unicode string")
/var/log/containers/stdouts/bgp_agent.log:2021-03-17T14:54:37.922802270+00:00 stdout F 2021-03-17 14:54:37.918 1 ERROR bgp-agent TypeError: Path must be represented as bytes or unicode string
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.