Hi Luis,

As you suggested, checkout 5 commits back to avoid the Load_Balancer issue that made good progress. 

But now i am seeing very odd behavior where floating IP can get exposed to BGP but when i am trying to expose VM Tenant IP then I get a strange error. Here is the full logs output; https://paste.opendev.org/show/buRbY415guvHFUtSapFK/ 


On Fri, Jul 22, 2022 at 8:55 AM Satish Patel <satish.txt@gmail.com> wrote:
Hi Luis,

Thank you for reply,

Let me tell you that your blog is wonderful. I have used your method to install frr without any docker container. 

What is the workaround here? Can I tell ovn-bgp-agent to not look for container of frr?

I have notice one more thing that it’s trying to run “copy /tmp/blah running-config” but that command isn’t supported. 

I have tried to run copy command manually on vtysh shell to see what options are available for copy command but there is only one command available with copy which is “copy running-config startup-config”  do you think I have wrong version of frr running? I’m running 7.2. 

Please let me know if any workaround here. Thank you 

Sent from my iPhone

On Jul 22, 2022, at 2:41 AM, Luis Tomas Bolivar <ltomasbo@redhat.com> wrote:


Hi Satish,

The one to use should be https://opendev.org/x/ovn-bgp-agent. The one on my personal github repo was the initial PoC for it. But the opendev one is the upstream effort to develop it, and is the one being maintained/updated.

Looking at your second logs, it seems you are missing FRR (and its shell, vtysh) in the node.

Actually, thinking about this:
"Unexpected error while running command.
Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config"

The ovn-bgp-agent has been developed with "deploying on containers" in mind, meaning it is assuming there is a frr container running, and the container running the agent is trying to connect to the same socket so that it can run the vtysh commands. Perhaps in your case the frr socket is in a different location than /run/frr/

On Fri, Jul 22, 2022 at 6:27 AM Satish Patel <satish.txt@gmail.com> wrote:
Folks,

I am trying to create lab of of ovn-bgp-agent using this blog https://ltomasbo.wordpress.com/2021/02/04/ovn-bgp-agent-testing-setup/ 

So far everything went well but I'm stuck at the bgp-agent installation and I encounter following error when running bgp-agent. Any suggestions? 

root@rack-1-host-2:/home/vagrant/bgp-agent# bgp-agent
2022-07-22 04:02:39.123 111551 INFO bgp_agent.config [-] Logging enabled!
2022-07-22 04:02:39.475 111551 CRITICAL bgp-agent [-] Unhandled error: AssertionError
2022-07-22 04:02:39.475 111551 ERROR bgp-agent Traceback (most recent call last):
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/bin/bgp-agent", line 10, in <module>
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     sys.exit(start())
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/bgp_agent/agent.py", line 76, in start
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     bgp_agent_launcher = service.launch(config.CONF, BGPAgent())
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/bgp_agent/agent.py", line 44, in __init__
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     self.agent_driver = driver_api.AgentDriverBase.get_instance(
2022-07-22 04:02:39.475 111551 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 04:02:39.475 111551 ERROR bgp-agent     agent_driver = stevedore_driver.DriverManager(
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/stevedore/driver.py", line 54, in __init__
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     super(DriverManager, self).__init__(
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/stevedore/named.py", line 78, in __init__
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     extensions = self._load_plugins(invoke_on_load,
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/stevedore/extension.py", line 221, in _load_plugins
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     ext = self._load_one_plugin(ep,
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/stevedore/named.py", line 156, in _load_one_plugin
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     return super(NamedExtensionManager, self)._load_one_plugin(
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/stevedore/extension.py", line 257, in _load_one_plugin
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     obj = plugin(*invoke_args, **invoke_kwds)
2022-07-22 04:02:39.475 111551 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 04:02:39.475 111551 ERROR bgp-agent     self._sb_idl = ovn.OvnSbIdl(
2022-07-22 04:02:39.475 111551 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 04:02:39.475 111551 ERROR bgp-agent     super(OvnSbIdl, self).__init__(
2022-07-22 04:02:39.475 111551 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 04:02:39.475 111551 ERROR bgp-agent     super(OvnIdl, self).__init__(remote, schema)
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 283, in __init__
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     schema = schema_helper.get_idl_schema()
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 2323, in get_idl_schema
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     self._keep_table_columns(schema, table, columns))
2022-07-22 04:02:39.475 111551 ERROR bgp-agent   File "/usr/local/lib/python3.8/dist-packages/ovs/db/idl.py", line 2330, in _keep_table_columns
2022-07-22 04:02:39.475 111551 ERROR bgp-agent     assert table_name in schema.tables
2022-07-22 04:02:39.475 111551 ERROR bgp-agent AssertionError
2022-07-22 04:02:39.475 111551 ERROR bgp-agent




After googling I found one more agent at https://opendev.org/x/ovn-bgp-agent and its also throwing an error. Which agent should I be using?

root@rack-1-host-2:~# ovn-bgp-agent
2022-07-22 04:04:36.780 111761 INFO ovn_bgp_agent.config [-] Logging enabled!
2022-07-22 04:04:37.247 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopped
2022-07-22 04:04:37.248 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' starting
2022-07-22 04:04:37.248 111761 INFO ovn_bgp_agent.drivers.openstack.utils.frr [-] Add VRF leak for VRF ovn-bgp-vrf on router bgp 64999
2022-07-22 04:04:37.248 111761 INFO oslo.privsep.daemon [-] Running privsep helper: ['sudo', 'privsep-helper', '--privsep_context', 'ovn_bgp_agent.privileged.vtysh_cmd', '--privsep_sock_path', '/tmp/tmp4cie9eiz/privsep.sock']
2022-07-22 04:04:37.687 111761 INFO oslo.privsep.daemon [-] Spawned new privsep daemon via rootwrap
2022-07-22 04:04:37.598 111769 INFO oslo.privsep.daemon [-] privsep daemon starting
2022-07-22 04:04:37.613 111769 INFO oslo.privsep.daemon [-] privsep process running with uid/gid: 0/0
2022-07-22 04:04:37.617 111769 INFO oslo.privsep.daemon [-] privsep process running with capabilities (eff/prm/inh): CAP_NET_ADMIN|CAP_SYS_ADMIN/CAP_NET_ADMIN|CAP_SYS_ADMIN/none
2022-07-22 04:04:37.617 111769 INFO oslo.privsep.daemon [-] privsep daemon running as pid 111769
2022-07-22 04:04:37.987 111769 ERROR ovn_bgp_agent.privileged.vtysh [-] Unable to execute vtysh with ['/usr/bin/vtysh', '--vty_socket', '/run/frr/', '-c', 'copy /tmp/tmpiz5s_wvs running-config']. Exception: Unexpected error while running command.
Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config
Exit code: 1
Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'
Stderr: ''
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/privileged/vtysh.py", line 30, in run_vtysh_config
    return processutils.execute(*full_args)
  File "/usr/local/lib/python3.8/dist-packages/oslo_concurrency/processutils.py", line 438, in execute
    raise ProcessExecutionError(exit_code=_returncode,
oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config
Exit code: 1
Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'
Stderr: ''
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service [-] Error starting thread.: oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config
Exit code: 1
Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'
Stderr: ''
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Traceback (most recent call last):
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/oslo_service/service.py", line 806, in run_service
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     service.start()
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/agent.py", line 50, in start
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     self.agent_driver.start()
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/drivers/openstack/ovn_bgp_driver.py", line 73, in start
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     frr.vrf_leak(constants.OVN_BGP_VRF, CONF.bgp_AS, CONF.bgp_router_id)
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/drivers/openstack/utils/frr.py", line 110, in vrf_leak
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     _run_vtysh_config_with_tempfile(vrf_config)
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/drivers/openstack/utils/frr.py", line 93, in _run_vtysh_config_with_tempfile
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     ovn_bgp_agent.privileged.vtysh.run_vtysh_config(f.name)
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/oslo_privsep/priv_context.py", line 271, in _wrap
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     return self.channel.remote_call(name, args, kwargs,
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service   File "/usr/local/lib/python3.8/dist-packages/oslo_privsep/daemon.py", line 215, in remote_call
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service     raise exc_type(*result[2])
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Exit code: 1
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Stderr: ''
2022-07-22 04:04:37.990 111761 ERROR oslo_service.service
2022-07-22 04:04:37.993 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopping
2022-07-22 04:04:37.994 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopped


--
LUIS TOMÁS BOLÍVAR
Principal Software Engineer
Red Hat
Madrid, Spain
ltomasbo@redhat.com