Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRR]: Update frr to frr-7.0.1 #2899

Merged
merged 7 commits into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
[submodule "src/sonic-frr/frr"]
path = src/sonic-frr/frr
url = https://github.com/Azure/sonic-frr.git
branch = frr/7.0
[submodule "platform/p4/p4-hlir/p4-hlir-v1.1"]
path = platform/p4/p4-hlir/p4-hlir-v1.1
url = https://github.com/p4lang/p4-hlir.git
Expand Down
4 changes: 3 additions & 1 deletion dockers/docker-fpm-frr/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update

# Install required packages
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute2 libpython2.7 libjson-c3 logrotate libunwind8

{% if docker_fpm_frr_debs.strip() -%}
# Copy locally-built Debian package dependencies
Expand All @@ -30,6 +30,8 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %}
{%- endif %}

RUN chown -R ${frr_user_uid}:${frr_user_gid} /etc/frr/

# Clean up
RUN apt-get clean -y
RUN apt-get autoclean -y
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ supervisorctl start bgpcfgd

# Start Quagga processes
supervisorctl start zebra
supervisorctl start staticd
supervisorctl start bgpd

if [ "$CONFIG_TYPE" == "unified" ]; then
Expand Down
9 changes: 9 additions & 0 deletions dockers/docker-fpm-frr/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog

[program:staticd]
command=/usr/lib/frr/staticd -A 127.0.0.1
priority=4
autostart=false
autorestart=false
startsecs=0
stdout_logfile=syslog
stderr_logfile=syslog
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lguohan @pavel-shirshov can we force this fix with a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Collaborator

@nazariig nazariig May 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavel-shirshov our regression fails because frr is missing staticd which is essential part of this suite, so i would like to ask you to force this fix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nazarii-gnydyn
Can you please share some output?
On our side I see:

# ps ax
  PID TTY      STAT   TIME COMMAND
    1 pts/0    Ss+    0:01 /usr/bin/python /usr/bin/supervisord
   25 pts/0    Sl     0:00 /usr/sbin/rsyslogd -n
   30 pts/0    S      0:00 python /usr/bin/bgpcfgd
   33 pts/0    Sl     0:08 /usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm
   36 pts/0    S      0:00 /usr/lib/frr/staticd -A 127.0.0.1
   39 pts/0    Sl     0:02 /usr/lib/frr/bgpd -A 127.0.0.1
   47 pts/0    Sl     0:27 fpmsyncd
   49 pts/1    Ss     0:00 bash
   65 pts/1    R+     0:00 ps ax

Copy link
Collaborator

@nazariig nazariig May 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavel-shirshov On our side (without this fix):

root@sonic:/home/admin# docker exec -ti bgp bash
root@sonic:/# ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.5  0.2  58600 20444 pts/0    Ss+  13:03   0:00 /usr/bin/python /usr/bin/supervisord
root        29  0.0  0.0 250136  2860 pts/0    Sl   13:03   0:00 /usr/sbin/rsyslogd -n
root        34  0.0  0.1  45556 13788 pts/0    S    13:03   0:00 python /usr/bin/bgpcfgd
frr         37  0.1  0.0 298552  5884 pts/0    Sl   13:03   0:00 /usr/lib/frr/zebra -A 127.0.0.1 -s 90000000 -M fpm
frr         39  0.1  0.1 299900  8964 pts/0    Sl   13:03   0:00 /usr/lib/frr/bgpd -A 127.0.0.1
root        45  0.5  0.0 101356  4096 pts/0    Sl   13:03   0:00 fpmsyncd
root        47  2.5  0.0  18184  3152 pts/1    Ss   13:05   0:00 bash
root        53  0.0  0.0  36632  2748 pts/1    R+   13:05   0:00 ps -aux
root@sonic:/# supervisorctl status
bgpcfgd                          RUNNING   pid 34, uptime 0:02:00
bgpd                             RUNNING   pid 39, uptime 0:01:59
fpmsyncd                         RUNNING   pid 45, uptime 0:01:59
rsyslogd                         RUNNING   pid 29, uptime 0:02:00
start.sh                         EXITED    May 17 01:03 PM
vtysh_b                          STOPPED   Not started
zebra                            RUNNING   pid 37, uptime 0:01:59


[program:bgpd]
command=/usr/lib/frr/bgpd -A 127.0.0.1
priority=5
Expand Down
2 changes: 1 addition & 1 deletion rules/docker-fpm-frr.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DOCKER_FPM_FRR = docker-fpm-frr.gz
$(DOCKER_FPM_FRR)_PATH = $(DOCKERS_PATH)/docker-fpm-frr
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(FRR_PYTHONTOOLS) $(SWSS)
$(DOCKER_FPM_FRR)_DEPENDS += $(FRR) $(SWSS) $(LIBYANG)
$(DOCKER_FPM_FRR)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_FPM_FRR)

Expand Down
24 changes: 15 additions & 9 deletions rules/frr.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# FRRouting (frr) package

FRR_VERSION = 6.0.2
export FRR_VERSION
FRR_VERSION = 7.0.1
FRR_SUBVERSION = 0
export FRR_VERSION FRR_SUBVERSION

FRR = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV)

FRR = frr_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
$(FRR)_DEPENDS += $(LIBSNMP_DEV) $(LIBYANG_DEV)
$(FRR)_RDEPENDS += $(LIBYANG)
$(FRR)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR)
SONIC_STRETCH_DEBS += $(FRR)

FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_all.deb
$(eval $(call add_derived_package,$(FRR),$(FRR_PYTHONTOOLS)))

FRR_DBG = frr-dbgsym_$(FRR_VERSION)-sonic-$(FRR_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(FRR),$(FRR_DBG)))

# FRRouting pythontools
FRR_PYTHONTOOLS = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
$(FRR_PYTHONTOOLS)_DEPENDS += $(LIBSNMP_DEV)
$(FRR_PYTHONTOOLS)_SRC_PATH = $(SRC_PATH)/sonic-frr
SONIC_MAKE_DEBS += $(FRR_PYTHONTOOLS)
export FRR FRR_PYTHONTOOLS FRR_DBG
20 changes: 20 additions & 0 deletions rules/libyang.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# libyang

LIBYANG_VERSION_BASE = 0.16
LIBYANG_VERSION = $(LIBYANG_VERSION_BASE).105
LIBYANG_SUBVERSION = 1

export LIBYANG_VERSION_BASE
export LIBYANG_VERSION
export LIBYANG_SUBVERSION

LIBYANG = libyang$(LIBYANG_VERSION_BASE)_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(LIBYANG)_SRC_PATH = $(SRC_PATH)/libyang
$(LIBYANG)_DEPENDS += $(SWIG_BASE) $(SWIG)
SONIC_MAKE_DEBS += $(LIBYANG)
SONIC_STRETCH_DEBS += $(LIBYANG)

LIBYANG_DEV = libyang-dev_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(LIBYANG),$(LIBYANG_DEV)))

export LIBYANG LIBYANG_DEV
22 changes: 22 additions & 0 deletions rules/swig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# swig

SWIG_VERSION_BASE = 3.0
SWIG_VERSION = $(SWIG_VERSION_BASE).12
SWIG_SUBVERSION = 2

export SWIG_VERSION_BASE
export SWIG_VERSION
export SWIG_SUBVERSION

SWIG_BASE = swig$(SWIG_VERSION_BASE)_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(SWIG_BASE)_SRC_PATH = $(SRC_PATH)/swig
SONIC_MAKE_DEBS += $(SWIG_BASE)
SONIC_STRETCH_DEBS += $(SWIG_BASE)

SWIG = swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(SWIG_BASE),$(SWIG)))

SWIG_DBG = swig$(SWIG_VERSION_BASE)-dbgsym_$(SWIG_VERSION)-$(SWIG_SUBVERSION)_amd64.deb
$(eval $(call add_derived_package,$(SWIG_BASE),$(SWIG_DBG)))

export SWIG_BASE SWIG SWIG_DBG
2 changes: 1 addition & 1 deletion rules/swss-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LIBSWSSCOMMON = libswsscommon_1.0.0_amd64.deb
$(LIBSWSSCOMMON)_SRC_PATH = $(SRC_PATH)/sonic-swss-common
$(LIBSWSSCOMMON)_DEPENDS += $(LIBHIREDIS_DEV) $(LIBNL3_DEV) $(LIBNL_GENL3_DEV) \
$(LIBNL_ROUTE3_DEV) $(LIBNL_NF3_DEV) \
$(LIBNL_CLI_DEV)
$(LIBNL_CLI_DEV) $(SWIG)
$(LIBSWSSCOMMON)_RDEPENDS += $(LIBHIREDIS) $(LIBNL3) $(LIBNL_GENL3) \
$(LIBNL_ROUTE3) $(LIBNL_NF3) $(LIBNL_CLI)
SONIC_DPKG_DEBS += $(LIBSWSSCOMMON)
Expand Down
6 changes: 5 additions & 1 deletion sonic-slave-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ RUN apt-get update && apt-get install -y \
libjson-c-dev \
libsystemd-dev \
python-ipaddr \
libcmocka-dev \
python3-all-dev \
python3-all-dbg \
install-info \
logrotate \
# For libnl3 (local) build
cdbs \
# For SAI meta build
Expand Down Expand Up @@ -109,7 +114,6 @@ RUN apt-get update && apt-get install -y \
dpatch \
libdb-dev \
iptables-dev \
swig \
pavel-shirshov marked this conversation as resolved.
Show resolved Hide resolved
ctags \
# For mellanox sai build
libtool-bin \
Expand Down
21 changes: 21 additions & 0 deletions src/libyang/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(LIBYANG)
DERIVED_TARGETS = $(LIBYANG_DEV)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./libyang-$(LIBYANG_VERSION)
wget -O libyang_$(LIBYANG_VERSION).orig.tar.gz 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105.orig.tar.gz?sv=2015-04-05&sr=b&sig=yTWDhl6B9TTXWAQ46zpLiNxUib61W7U0%2F%2FGvhRibKOc%3D&se=2046-09-30T22%3A10%3A27Z&sp=r'
wget -O libyang_$(LIBYANG_VERSION).dsc 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105-1.dsc?sv=2015-04-05&sr=b&sig=eLkO5wzB1C5oKNIaUPro4gwrgEC3EygIO6eCyTzHmeI%3D&se=2046-09-30T22%3A10%3A12Z&sp=r'
wget -O libyang_$(LIBYANG_VERSION)-$(LIBYANG_SUBVERSION).debian.tar.xz 'https://sonicstorage.blob.core.windows.net/packages/libyang_0.16.105-1.debian.tar.xz?sv=2015-04-05&sr=b&sig=AH18p7pKK0xIBVxZuA8EMv9%2FhXbCFKmbWAn7Za8%2BZW4%3D&se=2046-09-30T22%3A09%3A36Z&sp=r'
dpkg-source -x libyang_$(LIBYANG_VERSION).dsc

pushd ./libyang-$(LIBYANG_VERSION)
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd

mv $(DERIVED_TARGETS) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
2 changes: 1 addition & 1 deletion src/lldpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DEBIAN_FILE_URL = $(LLDP_URL)/$(DEBIAN_FILE)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf ./lldpd
rm -rf lldpd-$(LLDPD_VERSION)

# download debian LLDPDD
wget -NO "$(DSC_FILE)" $(DSC_FILE_URL)
Expand Down
24 changes: 5 additions & 19 deletions src/sonic-frr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,15 @@
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = frr_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
TOOLS_TARGET = frr-pythontools_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
MAIN_TARGET_DBG = frr-dbgsym_$(FRR_VERSION)-1~sonic.debian9+1_amd64.deb
DERIVED_TARGET = $(TOOLS_TARGET) $(MAIN_TARGET_DBG)
MAIN_TARGET = $(FRR)
DERIVED_TARGET = $(FRR_PYTHONTOOLS) $(FRR_DBG)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :

# Build the package
pushd ./frr

# This could very well be tools/tarsource.sh -V -e sonic
tools/tarsource.sh -V
# This is a no-op but here in case the changelog stops being a symlink
debchange -b -v $(FRR_VERSION)-1~sonic.debian9+1 'SONiC FRR debian package build'
sudo apt-get -y install install-info
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib
cd ..
mv frr_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET)
mv frr-pythontools_$(FRR_VERSION)-*_all.deb $(TOOLS_TARGET)
mv frr-dbgsym_$(FRR_VERSION)-*_amd64.deb $(MAIN_TARGET_DBG)
mv $(DERIVED_TARGET) $* $(DEST)/

tools/tarsource.sh -V -e '-sonic'
dpkg-buildpackage -rfakeroot -b -us -uc -Ppkg.frr.nortrlib -j$(SONIC_CONFIG_MAKE_JOBS)
popd
mv $(DERIVED_TARGET) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGET)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)

2 changes: 1 addition & 1 deletion src/sonic-frr/frr
Submodule frr updated from 5a35fd to cd305c
21 changes: 21 additions & 0 deletions src/swig/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(SWIG_BASE)
DERIVED_TARGETS = $(SWIG) $(SWIG_DBG)

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
rm -fr ./swig-$(SWIG_VERSION) *.deb
wget -O swig_$(SWIG_VERSION).orig.tar.gz 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12.orig.tar.gz?sv=2015-04-05&sr=b&sig=kcSKFvlTQZst8Dbb8MUfckGbVEZU5sptFqT2HbwOUtA%3D&se=2046-09-30T22%3A11%3A59Z&sp=r'
wget -O swig_$(SWIG_VERSION).dsc 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12-2.dsc?sv=2015-04-05&sr=b&sig=k3eLfmWgmCz1Kx8SYcirX18FSQdJ76ifo%2B9rbJBnrf8%3D&se=2046-09-30T22%3A11%3A45Z&sp=r'
wget -O swig_$(SWIG_VERSION)-$(SWIG_SUBVERSION).debian.tar.xz 'https://sonicstorage.blob.core.windows.net/packages/swig_3.0.12-2.debian.tar.xz?sv=2015-04-05&sr=b&sig=SQICTE%2BR1BO7npUBNwTQjo447OaFz%2BooX6VAm912c7g%3D&se=2046-09-30T22%3A11%3A32Z&sp=r'
dpkg-source -x swig_$(SWIG_VERSION).dsc

pushd ./swig-$(SWIG_VERSION)
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd

mv $(DERIVED_TARGETS) $* $(DEST)/

$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)