Skip to content

Commit

Permalink
[Frr]: Frr bookworm upgrade (sonic-net#18233)
Browse files Browse the repository at this point in the history

Co-authored-by: Kalimuthu Velappan <kalimuthu.velappan@broadcom.com>
  • Loading branch information
hasan-brcm and Kalimuthu-Velappan authored Jun 3, 2024
1 parent ab08b78 commit 9cbaf42
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
FROM docker-swss-layer-bullseye-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
FROM docker-swss-layer-bookworm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}

ARG docker_container_name
ARG frr_user_uid
Expand Down
10 changes: 5 additions & 5 deletions rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ $(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/$(DOCKER_FPM_FRR_STEM)
$(DOCKER_FPM_FRR)_PYTHON_WHEELS += $(SONIC_BGPCFGD) $(SONIC_FRR_MGMT_FRAMEWORK)

$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_SNMP) $(SWSS) $(LIBYANG2) $(SONIC_RSYSLOG_PLUGIN)
$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_DEPENDS)
$(DOCKER_FPM_FRR)_DBG_DEPENDS = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_DEPENDS)
$(DOCKER_FPM_FRR)_DBG_DEPENDS += $(SWSS_DBG) $(LIBSWSSCOMMON_DBG) \
$(FRR_DBG) $(FRR_SNMP_DBG) $(LIBYANG2_DBG) $(SONIC_RSYSLOG_PLUGIN)

$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BULLSEYE)_DBG_IMAGE_PACKAGES)
$(DOCKER_FPM_FRR)_DBG_IMAGE_PACKAGES = $($(DOCKER_SWSS_LAYER_BOOKWORM)_DBG_IMAGE_PACKAGES)

$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BULLSEYE)
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_SWSS_LAYER_BOOKWORM)

$(DOCKER_FPM_FRR)_VERSION = 1.0.0
$(DOCKER_FPM_FRR)_PACKAGE_NAME = fpm-frr
Expand Down Expand Up @@ -42,5 +42,5 @@ $(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TSC:/usr/bin/TSC
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += TS:/usr/bin/TS
$(DOCKER_FPM_FRR)_BASE_IMAGE_FILES += idf_isolation:/usr/bin/idf_isolation

SONIC_BULLSEYE_DOCKERS += $(DOCKER_FPM_FRR)
SONIC_BULLSEYE_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG)
SONIC_BOOKWORM_DOCKERS += $(DOCKER_FPM_FRR)
SONIC_BOOKWORM_DBG_DOCKERS += $(DOCKER_FPM_FRR_DBG)
3 changes: 0 additions & 3 deletions rules/libyang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ LIBYANG = libyang_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb
$(LIBYANG)_SRC_PATH = $(SRC_PATH)/libyang
# introduce artifical dependency between LIBYANG and FRR
# make sure LIBYANG is compile after FRR
# TODO: Remove once snmp build has been updated
ifeq ($(BLDENV),bullseye)
$(LIBYANG)_AFTER = $(FRR)
endif
SONIC_MAKE_DEBS += $(LIBYANG)

LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)_$(CONFIGURED_ARCH).deb
Expand Down
5 changes: 3 additions & 2 deletions src/sonic-bgpcfgd/tests/test_bbr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from copy import deepcopy
from . import swsscommon_test

import sys
sys.modules["swsscommon"] = swsscommon_test

with patch.dict("sys.modules", swsscommon=swsscommon_test):
from bgpcfgd.managers_bbr import BBRMgr
from bgpcfgd.managers_bbr import BBRMgr

global_constants = {
"bgp": {
Expand Down
6 changes: 4 additions & 2 deletions src/sonic-bgpcfgd/tests/test_setsrc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from . import swsscommon_test
from swsscommon import swsscommon

with patch.dict("sys.modules", swsscommon=swsscommon_test):
from bgpcfgd.managers_setsrc import ZebraSetSrc
import sys
sys.modules["swsscommon"] = swsscommon_test

from bgpcfgd.managers_setsrc import ZebraSetSrc

TEMPLATE_PATH = os.path.abspath('../../dockers/docker-fpm-frr/frr')

Expand Down
3 changes: 3 additions & 0 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG) $(FRR_SNMP) $(FRR_SNMP_DBG)
SUFFIX = $(shell date +%Y%m%d\.%H%M%S)
STG_BRANCH = stg_temp.$(SUFFIX)

# DEBEMAIL required by gpb dch
export DEBEMAIL := sonicproject@googlegroups.com

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Build the package
pushd ./frr
Expand Down

0 comments on commit 9cbaf42

Please sign in to comment.