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