<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Luis,<div><br></div><div>Thank you for reply,</div><div><br></div><div>Let me tell you that your blog is wonderful. I have used your method to install frr without any docker container. </div><div><br></div><div>What is the workaround here? Can I tell ovn-bgp-agent to not look for container of frr?</div><div><br></div><div>I have notice one more thing that it’s trying to run “copy /tmp/blah running-config” but that command isn’t supported. </div><div><br></div><div>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. </div><div><br></div><div>Please let me know if any workaround here. Thank you </div><div><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Jul 22, 2022, at 2:41 AM, Luis Tomas Bolivar <ltomasbo@redhat.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Satish,</div><div><br></div><div>The one to use should be <a href="https://opendev.org/x/ovn-bgp-agent" target="_blank">https://opendev.org/x/ovn-bgp-agent</a>. 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.</div><div><br></div><div>Looking at your second logs, it seems you are missing FRR (and its shell, vtysh) in the node.</div><div><br></div><div>Actually, thinking about this:</div><div>"Unexpected error while running command.<br>Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config"</div><div><br></div><div>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/<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 22, 2022 at 6:27 AM Satish Patel <<a href="mailto:satish.txt@gmail.com">satish.txt@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Folks,<br><div><br></div><div>I am trying to create lab of of ovn-bgp-agent using this blog <a href="https://ltomasbo.wordpress.com/2021/02/04/ovn-bgp-agent-testing-setup/" target="_blank">https://ltomasbo.wordpress.com/2021/02/04/ovn-bgp-agent-testing-setup/</a> </div><div><br></div><div>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? </div><div><br></div><div>root@rack-1-host-2:/home/vagrant/bgp-agent# bgp-agent<br>2022-07-22 04:02:39.123 111551 INFO bgp_agent.config [-] Logging enabled!<br>2022-07-22 04:02:39.475 111551 CRITICAL bgp-agent [-] Unhandled error: AssertionError<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent Traceback (most recent call last):<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent File "/usr/local/bin/bgp-agent", line 10, in <module><br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent sys.exit(start())<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent bgp_agent_launcher = service.launch(config.CONF, BGPAgent())<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent self.agent_driver = driver_api.AgentDriverBase.get_instance(<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent agent_driver = stevedore_driver.DriverManager(<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent super(DriverManager, self).__init__(<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent extensions = self._load_plugins(invoke_on_load,<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent ext = self._load_one_plugin(ep,<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent return super(NamedExtensionManager, self)._load_one_plugin(<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent obj = plugin(*invoke_args, **invoke_kwds)<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent self._sb_idl = ovn.OvnSbIdl(<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent super(OvnSbIdl, self).__init__(<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent super(OvnIdl, self).__init__(remote, schema)<br>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__<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent schema = schema_helper.get_idl_schema()<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent self._keep_table_columns(schema, table, columns))<br>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<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent assert table_name in schema.tables<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent AssertionError<br>2022-07-22 04:02:39.475 111551 ERROR bgp-agent<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>After googling I found one more agent at <a href="https://opendev.org/x/ovn-bgp-agent" target="_blank">https://opendev.org/x/ovn-bgp-agent</a> and its also throwing an error. Which agent should I be using?</div><div><br></div><div>root@rack-1-host-2:~# ovn-bgp-agent<br>2022-07-22 04:04:36.780 111761 INFO ovn_bgp_agent.config [-] Logging enabled!<br>2022-07-22 04:04:37.247 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopped<br>2022-07-22 04:04:37.248 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' starting<br>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<br>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']<br>2022-07-22 04:04:37.687 111761 INFO oslo.privsep.daemon [-] Spawned new privsep daemon via rootwrap<br>2022-07-22 04:04:37.598 111769 INFO oslo.privsep.daemon [-] privsep daemon starting<br>2022-07-22 04:04:37.613 111769 INFO oslo.privsep.daemon [-] privsep process running with uid/gid: 0/0<br>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<br>2022-07-22 04:04:37.617 111769 INFO oslo.privsep.daemon [-] privsep daemon running as pid 111769<br>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.<br>Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config<br>Exit code: 1<br>Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'<br>Stderr: ''<br>Traceback (most recent call last):<br> File "/usr/local/lib/python3.8/dist-packages/ovn_bgp_agent/privileged/vtysh.py", line 30, in run_vtysh_config<br> return processutils.execute(*full_args)<br> File "/usr/local/lib/python3.8/dist-packages/oslo_concurrency/processutils.py", line 438, in execute<br> raise ProcessExecutionError(exit_code=_returncode,<br>oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.<br>Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config<br>Exit code: 1<br>Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'<br>Stderr: ''<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service [-] Error starting thread.: oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.<br>Command: /usr/bin/vtysh --vty_socket /run/frr/ -c copy /tmp/tmpiz5s_wvs running-config<br>Exit code: 1<br>Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'<br>Stderr: ''<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Traceback (most recent call last):<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service service.start()<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service self.agent_driver.start()<br>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<br>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)<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service _run_vtysh_config_with_tempfile(vrf_config)<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service ovn_bgp_agent.privileged.vtysh.run_vtysh_config(<a href="http://f.name" target="_blank">f.name</a>)<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service return self.channel.remote_call(name, args, kwargs,<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service raise exc_type(*result[2])<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service oslo_concurrency.processutils.ProcessExecutionError: Unexpected error while running command.<br>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<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Exit code: 1<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Stdout: '% Unknown command: copy /tmp/tmpiz5s_wvs running-config\n'<br></div><div>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service Stderr: ''<br>2022-07-22 04:04:37.990 111761 ERROR oslo_service.service<br>2022-07-22 04:04:37.993 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopping<br>2022-07-22 04:04:37.994 111761 INFO ovn_bgp_agent.agent [-] Service 'BGPAgent' stopped<br></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>LUIS TOMÁS BOLÍVAR<br>Principal Software Engineer<br>Red Hat<br>Madrid, Spain<br><a href="mailto:ltomasbo@redhat.com" target="_blank">ltomasbo@redhat.com</a> <br> <br></div></div></div></div>
</div></blockquote></div></body></html>