From 007c2791d92d50994d8f6732a75f76345725f40c Mon Sep 17 00:00:00 2001 From: Matthias Hartmann Date: Thu, 21 May 2026 10:03:35 +0200 Subject: [PATCH] fix: re-introduce bgp restart for community sonic to ensure default route --- Makefile | 16 ++++++++++++---- README.md | 2 +- ....capms.yaml => mini-lab.capms.dell_sonic.yaml | 0 3 files changed, 13 insertions(+), 5 deletions(-) rename mini-lab.capms.yaml => mini-lab.capms.dell_sonic.yaml (100%) diff --git a/Makefile b/Makefile index 190c64a4..3c58bfb3 100644 --- a/Makefile +++ b/Makefile @@ -36,8 +36,8 @@ MONITORING_ENABLED := $(or $(MONITORING_ENABLED),true) else ifeq ($(MINI_LAB_FLAVOR),dell_sonic) LAB_TOPOLOGY=mini-lab.dell_sonic.yaml MINI_LAB_SONIC_IMAGE=r.metal-stack.io/vrnetlab/dell_sonic:$(MINI_LAB_DELL_SONIC_VERSION) -else ifeq ($(MINI_LAB_FLAVOR),capms) -LAB_TOPOLOGY=mini-lab.capms.yaml +else ifeq ($(MINI_LAB_FLAVOR),capms_dell_sonic) +LAB_TOPOLOGY=mini-lab.capms.dell_sonic.yaml MINI_LAB_SONIC_IMAGE=r.metal-stack.io/vrnetlab/dell_sonic:$(MINI_LAB_DELL_SONIC_VERSION) else ifeq ($(MINI_LAB_FLAVOR),kamaji) LAB_TOPOLOGY=mini-lab.kamaji.yaml @@ -86,6 +86,14 @@ up: env gen-certs control-plane-bake partition-bake ssh -F files/ssh/config leaf01 'systemctl restart metal-core' ssh -F files/ssh/config leaf02 'systemctl restart metal-core' +# for community SONiC versions > 202311 a bgp restart is needed in the virtual environment +# TODO: should be investigated and fixed if possible +ifeq ($(filter $(MINI_LAB_FLAVOR),dell_sonic capms_dell_sonic),) + sleep 15 + ssh -F files/ssh/config leaf01 'systemctl restart bgp' + ssh -F files/ssh/config leaf02 'systemctl restart bgp' +endif + .PHONY: restart restart: down up @@ -135,7 +143,7 @@ partition-bake: external_network ifeq ($(CI),true) docker pull $(MINI_LAB_SONIC_IMAGE) endif -ifneq ($(filter $(MINI_LAB_FLAVOR),dell_sonic capms),$(MINI_LAB_FLAVOR)) +ifneq ($(filter $(MINI_LAB_FLAVOR),dell_sonic capms_dell_sonic),$(MINI_LAB_FLAVOR)) docker pull $(MINI_LAB_SONIC_IMAGE) endif @if ! sudo $(CONTAINERLAB) --topo $(LAB_TOPOLOGY) inspect | grep -i leaf01 > /dev/null; then \ @@ -178,7 +186,7 @@ cleanup-partition: mkdir -p clab-mini-lab sudo --preserve-env $(CONTAINERLAB) destroy --topo mini-lab.dell_sonic.yaml sudo --preserve-env $(CONTAINERLAB) destroy --topo mini-lab.sonic.yaml - sudo --preserve-env $(CONTAINERLAB) destroy --topo mini-lab.capms.yaml + sudo --preserve-env $(CONTAINERLAB) destroy --topo mini-lab.capms.dell_sonic.yaml sudo --preserve-env $(CONTAINERLAB) destroy --topo mini-lab.kamaji.yaml docker network rm --force mini_lab_ext diff --git a/README.md b/README.md index 4ad787af..8e585819 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ All available mini-lab flavors are listed below: - `sonic`: runs two Community SONiC switches - `dell_sonic`: runs two Enterprise SONiC switches with a [locally built vrnetlab image](https://github.com/srl-labs/vrnetlab/tree/master/dell/dell_sonic) -- `capms`: runs the `dell_sonic` flavor but with four instead of two machines (this is used for [cluster-provider-metal-stack](https://github.com/metal-stack/cluster-api-provider-metal-stack) in order to have dedicated hosts for control plane / worker / firewall) +- `capms_dell_sonic`: runs the `dell_sonic` flavor but with four instead of two machines (this is used for [cluster-provider-metal-stack](https://github.com/metal-stack/cluster-api-provider-metal-stack) in order to have dedicated hosts for control plane / worker / firewall) - `kamaji`: runs a variation of the `sonic` flavor. The working example is available at the [cluster-provider-metal-stack](https://github.com/metal-stack/cluster-api-provider-metal-stack)'s `capi-lab`. - `gardener`: runs the `sonic` flavor and installs the [Gardener](https://gardener.cloud) in the mini-lab diff --git a/mini-lab.capms.yaml b/mini-lab.capms.dell_sonic.yaml similarity index 100% rename from mini-lab.capms.yaml rename to mini-lab.capms.dell_sonic.yaml