From 4c409ea05f9ee16d7d907c1f78762e2a4ce38fe3 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Fri, 8 May 2026 00:17:46 +0900 Subject: [PATCH 1/4] tests: topotests: switch TopoExaBGP to ExaBGP 5.x Probe and launch exabgp using the 5.x subcommands (`version`, `server` with EXABGP_ENVFILE) and raise the minimum to 5.0.0. Drop the /var/run/exabgp.{in,out} fifos, which 5.x refuses to start against, and redirect the launch stdio to /dev/null so the daemonized exabgp does not block self.run() on an open pipe. Signed-off-by: Yuya Kusakabe --- tests/topotests/lib/topogen.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 821dc8ec5a72..eec72d78debe 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -81,21 +81,21 @@ def is_string(value): def get_exabgp_cmd(commander=None): - """Return the command to use for ExaBGP version >= 4.2.11""" + """Return the command to use for ExaBGP version >= 5.0.0""" if commander is None: commander = Commander("exabgp", logger=logging.getLogger("exabgp")) def exacmd_version_ok(exacmd): - logger.debug("checking %s for exabgp version >= 4.2.11", exacmd) - _, stdout, _ = commander.cmd_status(exacmd + " --version", warn=False) + logger.debug("checking %s for exabgp version >= 5.0.0", exacmd) + _, stdout, _ = commander.cmd_status(exacmd + " version", warn=False) m = re.search(r"ExaBGP\s*:\s*((\d+)\.(\d+)(?:\.(\d+))?)", stdout) if not m: return False version = m.group(1) - if topotest.version_cmp(version, "4.2.11") < 0: + if topotest.version_cmp(version, "5.0.0") < 0: logging.debug( - "found exabgp version < 4.2.11 in %s will keep looking", exacmd + "found exabgp version < 5.0.0 in %s will keep looking", exacmd ) return False logger.info("Using ExaBGP version %s in %s", version, exacmd) @@ -1331,7 +1331,7 @@ def start(self, peer_dir, env_file=None): * Run ExaBGP with env file `env_file` and configuration peer*/exabgp.cfg """ exacmd = self.tgen.get_exabgp_cmd() - assert exacmd, "Can't find a usable ExaBGP (must be version >= 4.2.11)" + assert exacmd, "Can't find a usable ExaBGP (must be version >= 5.0.0)" self.run("mkdir -p /etc/exabgp") self.run("chmod 755 /etc/exabgp") @@ -1342,10 +1342,6 @@ def start(self, peer_dir, env_file=None): self.run("chmod 644 /etc/exabgp/*") self.run("chmod a+x /etc/exabgp/*.py") self.run("chown -R exabgp:exabgp /etc/exabgp") - self.run("[ -p /var/run/exabgp.in ] || mkfifo /var/run/exabgp.in") - self.run("[ -p /var/run/exabgp.out ] || mkfifo /var/run/exabgp.out") - self.run("chown exabgp:exabgp /var/run/exabgp.{in,out}") - self.run("chmod 600 /var/run/exabgp.{in,out}") log_dir = os.path.join(self.logdir, self.name) self.run("chmod 777 {}".format(log_dir)) @@ -1354,10 +1350,15 @@ def start(self, peer_dir, env_file=None): env_cmd = "env exabgp.log.level=INFO " env_cmd += "exabgp.log.destination={} ".format(log_file) + env_cmd += "EXABGP_ENVFILE=/etc/exabgp/exabgp.env " - output = self.run( - env_cmd + exacmd + " -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.cfg " + # Without the stdio redirect the daemonized exabgp keeps the + # launch pipe open and self.run() blocks forever. + invocation = ( + exacmd + " server /etc/exabgp/exabgp.cfg /dev/null 2>&1" ) + + output = self.run(env_cmd + invocation) if output is None or len(output) == 0: output = "" @@ -1530,7 +1531,7 @@ def diagnose_env_linux(rundir): logger.info("LDPd tests will not run (missing mpls-iptunnel kernel module)") if not get_exabgp_cmd(): - logger.warning("Failed to find exabgp >= 4.2.11") + logger.warning("Failed to find exabgp >= 5.0.0") logger.removeHandler(fhandler) fhandler.close() From cdb5fd48a3f30c70b35ec0e54f7b10c3e4cc795d Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Thu, 11 Jun 2026 10:06:25 +0900 Subject: [PATCH 2/4] tests: update topotests Dockerfile for exabgp 5 Install the ExaBGP 5.0.9 release. Newer address families used by the topotests (for example BGP-MUP) require ExaBGP 5.x. Signed-off-by: Yuya Kusakabe --- tests/topotests/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/Dockerfile b/tests/topotests/Dockerfile index 4f1bb32a1a28..a2cdf9bb15a5 100644 --- a/tests/topotests/Dockerfile +++ b/tests/topotests/Dockerfile @@ -83,7 +83,7 @@ RUN apt update -y && apt upgrade -y && \ python3 -m pip install 'pytest>=6.2.4' 'pytest-xdist>=2.3.0' && \ python3 -m pip install 'scapy>=2.4.5' && \ python3 -m pip install xmltodict && \ - python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311 + python3 -m pip install git+https://github.com/Exa-Networks/exabgp@5d36bc40253235a913664599ac5cf85bc7adb996 # ExaBGP 5.0.9 # Install FRR built packages RUN mkdir -p /etc/apt/keyrings && \ From ae53ddaaaa261774493cd560e5fc537249aeab40 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Thu, 11 Jun 2026 10:06:25 +0900 Subject: [PATCH 3/4] docker: update ubuntu template for exabgp 5 Install the ExaBGP 5.0.9 release. Signed-off-by: Yuya Kusakabe --- docker/ubuntu-ci/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/ubuntu-ci/Dockerfile b/docker/ubuntu-ci/Dockerfile index db088dfb0a8f..0a51674e0847 100644 --- a/docker/ubuntu-ci/Dockerfile +++ b/docker/ubuntu-ci/Dockerfile @@ -107,7 +107,7 @@ RUN for i in $(seq 1 ${APT_RETRIES}); do \ python3 -m pip install 'scapy>=2.4.5' && \ python3 -m pip install pyyaml && \ python3 -m pip install xmltodict && \ - python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311 + python3 -m pip install git+https://github.com/Exa-Networks/exabgp@5d36bc40253235a913664599ac5cf85bc7adb996 # ExaBGP 5.0.9 # LTTng tracing dependencies (conditional) RUN if [ "$ENABLE_LTTNG" = "true" ]; then \ From 4df90900940f758cbc33d2f2604eec71ef2f00ea Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Thu, 11 Jun 2026 10:06:25 +0900 Subject: [PATCH 4/4] doc: update for exabgp 5 Point the topotests install instructions at the ExaBGP 5.0.9 release. Signed-off-by: Yuya Kusakabe --- doc/developer/topotests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst index 745224b60628..0ca50db84d6d 100644 --- a/doc/developer/topotests.rst +++ b/doc/developer/topotests.rst @@ -46,7 +46,7 @@ Installing Topotest Requirements python3 -m pip install 'scapy>=2.4.5' python3 -m pip install 'libyang<4' python3 -m pip install pyyaml xmltodict - python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311 + python3 -m pip install git+https://github.com/Exa-Networks/exabgp@5d36bc40253235a913664599ac5cf85bc7adb996 # ExaBGP 5.0.9 useradd -d /var/run/exabgp/ -s /bin/false exabgp The version of protobuf package that is installed on your system will determine