From ec3669752a590768ee3babd11e332da43e573be4 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Mon, 1 Nov 2021 10:42:21 -0700 Subject: [PATCH 01/19] VxLAN Tunnel Counters and Rates implementation (#8369) * Enable flex counters for Vxlan tunnel --- dockers/docker-orchagent/enable_counters.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dockers/docker-orchagent/enable_counters.py b/dockers/docker-orchagent/enable_counters.py index a00bd3facce..0c966593f5b 100755 --- a/dockers/docker-orchagent/enable_counters.py +++ b/dockers/docker-orchagent/enable_counters.py @@ -26,6 +26,8 @@ def enable_rates(): counters_db.set('COUNTERS_DB', 'RATES:PORT', 'PORT_ALPHA', DEFAULT_ALPHA) counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL) counters_db.set('COUNTERS_DB', 'RATES:RIF', 'RIF_ALPHA', DEFAULT_ALPHA) + counters_db.set('COUNTERS_DB', 'RATES:TUNNEL', 'TUNNEL_SMOOTH_INTERVAL', DEFAULT_SMOOTH_INTERVAL) + counters_db.set('COUNTERS_DB', 'RATES:TUNNEL', 'TUNNEL_ALPHA', DEFAULT_ALPHA) def enable_counters(): From 347b2dddcdcda77af655cc828cd472aa15e5dae8 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Mon, 29 Aug 2022 14:08:14 +0800 Subject: [PATCH 02/19] [ci/build]: Upgrade SONiC package versions (#11757) --- .../build/build-sonic-slave-buster/versions-git | 4 ++-- .../build/build-sonic-slave-buster/versions-py3 | 6 +++--- .../build-sonic-slave-buster/versions-py3-all-arm64 | 3 ++- .../build-sonic-slave-buster/versions-py3-all-armhf | 3 ++- files/build/versions/default/versions-docker | 12 ++++++------ files/build/versions/default/versions-git | 6 +++--- files/build/versions/default/versions-web | 2 +- .../dockers/docker-config-engine-buster/versions-py3 | 2 +- files/build/versions/dockers/docker-ptf/versions-py2 | 2 +- .../dockers/docker-sonic-mgmt-framework/versions-py3 | 4 ++-- .../versions/dockers/docker-sonic-vs/versions-py2 | 2 +- .../versions/dockers/docker-sonic-vs/versions-py3 | 4 ++-- .../dockers/sonic-slave-buster/versions-deb-buster | 11 +++++------ .../versions/dockers/sonic-slave-buster/versions-git | 2 +- .../versions/dockers/sonic-slave-buster/versions-py3 | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- files/build/versions/host-image/versions-deb-buster | 2 +- .../versions/host-image/versions-deb-buster-arm64 | 2 +- .../versions/host-image/versions-deb-buster-armhf | 2 +- files/build/versions/host-image/versions-py3 | 8 ++++---- 20 files changed, 41 insertions(+), 40 deletions(-) diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-git b/files/build/versions/build/build-sonic-slave-buster/versions-git index da70e218b7b..0b4ee57fa9e 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -5,10 +5,10 @@ https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f -https://github.com/thom311/libnl==3399f520bae2231c5b6a6c2adce52b383292c520 +https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd00e297c14 -https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee +https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d https://salsa.debian.org/ssh-team/openssh.git==dd1e52af266a53671b162ddd95e4f6b01513e8e5 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3 b/files/build/versions/build/build-sonic-slave-buster/versions-py3 index a8d7da24596..31151b99f69 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3 @@ -1,6 +1,6 @@ -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==7.0 -docker==5.0.3 +docker==6.0.0 ijson==2.6.1 ipaddress==1.0.23 jsondiff==2.0.0 @@ -12,6 +12,6 @@ psutil==5.9.1 pyroute2==0.5.14 python-arptable==0.0.2 tabulate==0.8.10 -websocket-client==1.3.3 +websocket-client==1.4.0 xmltodict==0.12.0 zipp==1.2.0 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 index 1b5ad59ac9d..ab8db0a0df7 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-arm64 @@ -1,3 +1,4 @@ bitarray==1.5.3 lxml==4.6.3 -requests==2.28.1 \ No newline at end of file +requests==2.28.1 +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf index 1b5ad59ac9d..ab8db0a0df7 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3-all-armhf @@ -1,3 +1,4 @@ bitarray==1.5.3 lxml==4.6.3 -requests==2.28.1 \ No newline at end of file +requests==2.28.1 +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index e22333a98bd..06eb9bdc2c4 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -1,10 +1,10 @@ -amd64:amd64/debian:buster==sha256:7e1f93236be2e4a04a2b83e7fda8c0186e72e4c1e8cc830e097710ccc71d2dcf +amd64:amd64/debian:buster==sha256:faa416b9eeda2cbdb796544422eedd698e716dbd99841138521a94db51bf6123 amd64:amd64/debian:stretch==sha256:16ee3e11da473f6565ef94a715f1a38b3079e0664913be78869c336a71cb6085 -amd64:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f +amd64:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 amd64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -arm64:arm64v8/debian:buster==sha256:d0f5ed350e7624e19f0f40c2c0cc31b0b2811f444ca929a083fefe449432333d -arm64:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f +arm64:arm64v8/debian:buster==sha256:46f5b3c07b5e5aa83547cf697dcfe097052ff88018481fe615206c5651d75ba0 +arm64:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -armhf:arm32v7/debian:buster==sha256:1f7bef58f2040ee2d97c1f40eb5ff29f8c2aa51eeaa90931ac11e7c6680103aa -armhf:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f +armhf:arm32v7/debian:buster==sha256:49b349ff803f83f12723092ee7a1052f06156c20fa788f24b795988a614279d6 +armhf:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 armhf:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index debe56e8839..476ab6569fe 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,4 +1,4 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b @@ -11,10 +11,10 @@ https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74 https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479 https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f -https://github.com/thom311/libnl==3399f520bae2231c5b6a6c2adce52b383292c520 +https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd00e297c14 -https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee +https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d https://salsa.debian.org/ssh-team/openssh.git==dd1e52af266a53671b162ddd95e4f6b01513e8e5 \ No newline at end of file diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index 8b638e27a59..83bda16e5d9 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -20,7 +20,7 @@ https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2d https://deb.nodesource.com/node_10.x/dists/stretch/Release==22738118af583db3bfad39d6fcb4fa5a https://deb.nodesource.com/node_14.x/dists/buster/Release==2c6b9d29a3e20816e0ed35475d52e0d3 https://deb.nodesource.com/setup_10.x==6742c0148159980e8f6e886df1f8bbe1 -https://deb.nodesource.com/setup_14.x==badb28cf0604d9ff24c5fc3396b594d4 +https://deb.nodesource.com/setup_14.x==b692a224c718ad6e1cbd17eda8aaa673 https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/bfnplatform_20220221_sai.1.7.1_deb10.deb==65de37f7834823ba69ab5e55acc5c5f4 https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/bfnsdk_20220221_sai.1.7.1_deb10.deb==75df8156b85467b501dc67f1914d6ed7 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 index e71149dad24..80a4396adaf 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-py3 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-py3 @@ -8,5 +8,5 @@ pyangbind==0.8.1 pyyaml==5.4.1 redis==3.5.3 redis-dump-load==1.1 -regex==2022.7.25 +regex==2022.8.17 six==1.16.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-ptf/versions-py2 b/files/build/versions/dockers/docker-ptf/versions-py2 index 87c8a5d16e7..c44749bd76b 100644 --- a/files/build/versions/dockers/docker-ptf/versions-py2 +++ b/files/build/versions/dockers/docker-ptf/versions-py2 @@ -6,7 +6,7 @@ click==7.1.2 contextlib2==0.6.0.post1 cryptography==3.3.2 decorator==4.4.2 -dpkt==1.9.7.2 +dpkt==1.9.8 enum34==1.1.6 exabgp==3.4.17 flask==1.0 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 index 45681906921..583032f524a 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -1,6 +1,6 @@ attrs==22.1.0 certifi==2017.4.17 -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==8.1.3 clickclick==20.10.2 connexion==2.7.0 @@ -12,7 +12,7 @@ importlib-metadata==4.12.0 importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 -jsonschema==4.9.1 +jsonschema==4.14.0 openapi-schema-validator==0.2.3 openapi-spec-validator==0.4.0 pkgutil_resolve_name==1.3.10 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py2 b/files/build/versions/dockers/docker-sonic-vs/versions-py2 index f6389557e01..86bba8faec6 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py2 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py2 @@ -10,4 +10,4 @@ pyroute2==0.5.3 requests==2.27.1 scapy==2.4.0 six==1.16.0 -urllib3==1.26.11 \ No newline at end of file +urllib3==1.26.12 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index ee93e3c615c..005f34eaba7 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,5 +1,5 @@ certifi==2022.6.15 -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==7.0 idna==3.3 ijson==2.6.1 @@ -12,5 +12,5 @@ pyroute2==0.5.14 requests==2.28.1 scapy==2.4.4 tabulate==0.8.10 -urllib3==1.26.11 +urllib3==1.26.12 xmltodict==0.12.0 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index 7892d923399..15e1145efac 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -50,7 +50,7 @@ cmake==3.13.4-1 cmake-data==3.13.4-1 cmocka-doc==1.1.3-1 comerr-dev==2.1-1.44.5-1+deb10u3 -containerd.io==1.6.7-1 +containerd.io==1.6.8-1 cowbuilder==0.88 cowdancer==0.88 cpio==2.12+dfsg-9 @@ -102,9 +102,9 @@ dwz==0.12-3 eatmydata==105-7 emacsen-common==3.0.4 equivs==2.2.0 -exim4-base==4.92-8+deb10u6 -exim4-config==4.92-8+deb10u6 -exim4-daemon-light==4.92-8+deb10u6 +exim4-base==4.92-8+deb10u7 +exim4-config==4.92-8+deb10u7 +exim4-daemon-light==4.92-8+deb10u7 expat==2.2.6-2+deb10u4 exuberant-ctags==1:5.9~svn20110310-12 fakeroot==1.23-1 @@ -556,7 +556,6 @@ libgmpxx4ldbl==2:6.1.2+dfsg-4+deb10u1 libgnutls-dane0==3.6.7-4+deb10u9 libgnutls-openssl27==3.6.7-4+deb10u9 libgnutls28-dev==3.6.7-4+deb10u9 -libgnutls30==3.6.7-4+deb10u9 libgnutlsxx28==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgoogle-perftools4==2.7-1 @@ -664,7 +663,7 @@ libjbig0==2.1-3.1+b2 libjbig2dec0==0.16-1+deb10u1 libjemalloc-dev==5.1.0-3 libjemalloc2==5.1.0-3 -libjetty9-java==9.4.16-0+deb10u1 +libjetty9-java==9.4.16-0+deb10u2 libjpeg62-turbo==1:1.5.2-2+deb10u1 libjs-bootstrap==3.4.1+dfsg-1 libjs-jquery==3.3.1~dfsg-3+deb10u1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index b6445f62935..b891abb29c8 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-git +++ b/files/build/versions/dockers/sonic-slave-buster/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-py3 b/files/build/versions/dockers/sonic-slave-buster/versions-py3 index 6bb93e7b15f..691707dc8da 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-py3 @@ -58,7 +58,7 @@ pytz==2019.1 pyxdg==0.25 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.25 +regex==2022.8.17 requests==2.21.0 roman==2.0.0 secretstorage==2.3.1 diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-git b/files/build/versions/dockers/sonic-slave-stretch/versions-git index b6445f62935..b891abb29c8 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-git +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster b/files/build/versions/host-image/versions-deb-buster index 66df5e12d01..e30005ad69e 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -14,7 +14,7 @@ bzip2==1.0.6-9.2~deb10u1 ca-certificates==20200601~deb10u2 cgroup-tools==0.41-8.1 conntrack==1:1.4.5-2 -containerd.io==1.6.7-1 +containerd.io==1.6.8-1 cpio==2.12+dfsg-9 cpp==4:8.3.0-1 cpp-8==8.3.0-6 diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index 8f0adeed12e..f8897af6337 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -30,6 +30,6 @@ openssl==1.1.1n-0+deb10u1 pkg-config==0.29-6 rsyslog==8.1901.0-1+deb10u1 tsingma-bsp==1.0 -tzdata==2021a-0+deb10u5 +tzdata==2021a-0+deb10u6 xz-utils==5.2.4-1 zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster-armhf b/files/build/versions/host-image/versions-deb-buster-armhf index fdf7ab9b15b..4fcd3403440 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -30,6 +30,6 @@ mrvlprestera==1.0 openssl==1.1.1n-0+deb10u1 pkg-config==0.29-6 rsyslog==8.1901.0-1+deb10u1 -tzdata==2021a-0+deb10u5 +tzdata==2021a-0+deb10u6 xz-utils==5.2.4-1 zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 41d78ade9df..9359a4fb15f 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -4,7 +4,7 @@ azure-storage==0.36.0 bitarray==1.5.3 certifi==2022.6.15 cffi==1.15.1 -charset-normalizer==2.1.0 +charset-normalizer==2.1.1 click==7.0 cryptography==37.0.4 docker==4.3.1 @@ -32,13 +32,13 @@ pyroute2==0.5.14 python-dateutil==2.8.2 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.25 +regex==2022.8.17 requests==2.28.1 scapy==2.4.4 six==1.16.0 tabulate==0.8.10 thrift==0.13.0 -urllib3==1.26.11 +urllib3==1.26.12 watchdog==0.10.3 -websocket-client==1.3.3 +websocket-client==1.4.0 xmltodict==0.12.0 \ No newline at end of file From 8e0393927f7454911529a70d2b19b470d54ac085 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Tue, 30 Aug 2022 16:28:11 +0800 Subject: [PATCH 03/19] [submodules] Upgrade HEAD pointer of sonic-mgmt-framework to fix CG alert (#11871) --- src/sonic-mgmt-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-mgmt-framework b/src/sonic-mgmt-framework index 3c3384cec8d..bd79561c70a 160000 --- a/src/sonic-mgmt-framework +++ b/src/sonic-mgmt-framework @@ -1 +1 @@ -Subproject commit 3c3384cec8d15e493e6889bff6361a5a280a8811 +Subproject commit bd79561c70aa3da2267c8c767a899833f432dd0f From ed68e4c97c9af46e63988d71599a2947114bb247 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 30 Aug 2022 22:44:47 +0800 Subject: [PATCH 04/19] [ci/build]: Upgrade SONiC package versions (#11896) --- files/build/versions/default/versions-git | 2 +- .../dockers/docker-base-buster/versions-deb-buster | 4 ++-- .../dockers/docker-syncd-bfn/versions-deb-buster | 4 ++-- .../dockers/sonic-slave-buster/versions-deb-buster | 12 ++++++------ .../versions/dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- files/build/versions/host-image/versions-deb-buster | 6 +++--- .../versions/host-image/versions-deb-buster-arm64 | 3 +++ .../versions/host-image/versions-deb-buster-armhf | 3 +++ 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 476ab6569fe..0a75d6d99f0 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,4 +1,4 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b diff --git a/files/build/versions/dockers/docker-base-buster/versions-deb-buster b/files/build/versions/dockers/docker-base-buster/versions-deb-buster index 933f061ad6c..b73b037c50c 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -1,9 +1,9 @@ ca-certificates==20200601~deb10u2 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 jq==1.5+dfsg-2+b1 less==487-0.1+b1 libatomic1==8.3.0-6 -libcurl4==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u3 libdaemon0==0.14-7 libdbus-1-3==1.12.20-0+deb10u1 libestr0==0.1.10-2.1 diff --git a/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster index 714e0de0a71..77895b42f41 100644 --- a/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster @@ -3,8 +3,8 @@ bfnsdk==1.0.0 libc-ares2==1.14.0-1+deb10u1 libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl4-gnutls-dev==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl4-gnutls-dev==7.64.0-4+deb10u3 libgoogle-perftools4==2.7-1 libicu63==63.1-6+deb10u3 liblzma-dev==5.2.4-1+deb10u1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index 15e1145efac..3d832de2a61 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -58,7 +58,7 @@ cpp==4:8.3.0-1 cpp-8==8.3.0-6 cppcheck==1.86-1 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 dbus==1.12.20-0+deb10u1 dbus-user-session==1.12.20-0+deb10u1 dconf-gsettings-backend==0.30.1-2 @@ -398,10 +398,10 @@ libcrystalhd3==1:0.0~git20110715.fdd2f19-13 libcups2==2.2.10-6+deb10u6 libcupsfilters1==1.21.6-5 libcupsimage2==2.2.10-6+deb10u6 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl3-nss==7.64.0-4+deb10u2 -libcurl4==7.64.0-4+deb10u2 -libcurl4-nss-dev==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl3-nss==7.64.0-4+deb10u3 +libcurl4==7.64.0-4+deb10u3 +libcurl4-nss-dev==7.64.0-4+deb10u3 libdaemon-dev==0.14-7 libdaemon0==0.14-7 libdata-dump-perl==1.23-1 @@ -755,7 +755,7 @@ libmaven-reporting-impl-java==3.0.0-2 libmaven-resolver-java==1.3.1-1 libmaven-resources-plugin-java==3.1.0-1 libmaven-shared-incremental-java==1.1-3 -libmaven-shared-utils-java==3.3.0-1 +libmaven-shared-utils-java==3.3.0-1+deb10u1 libmaven-site-plugin-java==3.6-3 libmaven3-core-java==3.6.0-1 libmime-tools-perl==5.509-1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index b891abb29c8..7a060c49256 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-git +++ b/files/build/versions/dockers/sonic-slave-buster/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-git b/files/build/versions/dockers/sonic-slave-stretch/versions-git index b891abb29c8..7a060c49256 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-git +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==b7ec673cccc42bce346234209dfd194b7911e169 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster b/files/build/versions/host-image/versions-deb-buster index e30005ad69e..9db16421eed 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -19,7 +19,7 @@ cpio==2.12+dfsg-9 cpp==4:8.3.0-1 cpp-8==8.3.0-6 cron==3.0pl1-134+deb10u1 -curl==7.64.0-4+deb10u2 +curl==7.64.0-4+deb10u3 dbus==1.12.20-0+deb10u1 device-tree-compiler==1.4.7-4 dh-python==3.20190308 @@ -101,8 +101,8 @@ libcap2-bin==1:2.25-2 libcc1-0==8.3.0-6 libcgroup1==0.41-8.1 libcryptsetup12==2:2.1.0-5+deb10u2 -libcurl3-gnutls==7.64.0-4+deb10u2 -libcurl4==7.64.0-4+deb10u2 +libcurl3-gnutls==7.64.0-4+deb10u3 +libcurl4==7.64.0-4+deb10u3 libdbd-sqlite3-perl==1.62-3 libdbi-perl==1.642-1+deb10u2 libdbus-1-3==1.12.20-0+deb10u1 diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index f8897af6337..a559cd4126a 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -1,4 +1,5 @@ binutils-aarch64-linux-gnu==2.31.1-16 +curl==7.64.0-4+deb10u2 dirmngr==2.2.12-1+deb10u1 dpkg-dev==1.19.7 gnupg==2.2.12-1+deb10u1 @@ -13,6 +14,8 @@ gpgconf==2.2.12-1+deb10u1 gpgsm==2.2.12-1+deb10u1 icu-devtools==63.1-6+deb10u3 libcryptsetup12==2:2.3.7-1+deb11u1~bpo10+1 +libcurl3-gnutls==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u2 libdpkg-perl==1.19.7 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 diff --git a/files/build/versions/host-image/versions-deb-buster-armhf b/files/build/versions/host-image/versions-deb-buster-armhf index 4fcd3403440..8516bf3e77b 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -1,4 +1,5 @@ binutils-arm-linux-gnueabihf==2.31.1-16 +curl==7.64.0-4+deb10u2 dirmngr==2.2.12-1+deb10u1 dpkg-dev==1.19.7 gnupg==2.2.12-1+deb10u1 @@ -13,6 +14,8 @@ gpgconf==2.2.12-1+deb10u1 gpgsm==2.2.12-1+deb10u1 icu-devtools==63.1-6+deb10u3 libcryptsetup12==2:2.3.7-1+deb11u1~bpo10+1 +libcurl3-gnutls==7.64.0-4+deb10u2 +libcurl4==7.64.0-4+deb10u2 libdpkg-perl==1.19.7 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 From 932af450ed06138017fbf77d4ec6c67baec93898 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Wed, 31 Aug 2022 16:31:48 +0800 Subject: [PATCH 05/19] [actions] Update github actions label and automerge. (#11736) (#11909) 1. Add auto approve step when adding label to version upgrading PR. 2. Use mssonicbld TOKEN to merge version upgrading PR instead of 'github actions' --- .github/workflows/label.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index f8ae8e7199a..ee4857fe23f 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -20,6 +20,13 @@ jobs: label: runs-on: ubuntu-latest steps: + - name: approve + run: | + set -e + echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token + url=$(echo $GITHUB_CONTEXT | jq -r '.event.pull_request._links.html.href') + echo PR: $url + gh pr review $url --approve - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" From c1712b8c9a556c9b56f9c51af7fcad5d240d0c15 Mon Sep 17 00:00:00 2001 From: Arun Saravanan Balachandran <52521751+ArunSaravananBalachandran@users.noreply.github.com> Date: Wed, 31 Aug 2022 21:36:47 +0530 Subject: [PATCH 06/19] [202012] DellEMC: S6000, S6100, Z9332f - Add capabilities fields in platform.json (#11772) --- .../x86_64-dell_s6000_s1220-r0/platform.json | 238 +++++++-- .../x86_64-dell_s6100_c2538-r0/platform.json | 179 ++++++- .../platform.json | 483 ++++++++++++++---- .../system_health_monitoring_config.json | 2 +- .../z9332f/sonic_platform/chassis.py | 12 +- 5 files changed, 750 insertions(+), 164 deletions(-) diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/platform.json b/device/dell/x86_64-dell_s6000_s1220-r0/platform.json index 62a53fe328f..283906c407e 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/platform.json +++ b/device/dell/x86_64-dell_s6000_s1220-r0/platform.json @@ -1,6 +1,10 @@ { "chassis": { "name": "S6000", + "status_led": { + "controllable": true, + "colors": ["amber", "blinking amber", "green", "blinking green"] + }, "components": [ { "name": "BIOS" @@ -17,55 +21,151 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray1-Fan2" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray2-Fan2" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray3-Fan2" + "name": "FanTray1-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray1-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray1-Fan2" + "name": "FanTray1-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray2-Fan2" + "name": "FanTray2-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": true, + "colors": ["amber", "green", "off"] + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } }, { - "name": "FanTray3-Fan2" + "name": "FanTray3-Fan2", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ] } @@ -73,55 +173,125 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "thermals": [ { - "name": "PSU1-Sensor 1" + "name": "PSU1-Sensor 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "PSU1-Sensor 2" + "name": "PSU1-Sensor 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": true, + "minimum": 40 + }, + "status_led": { + "available": false + } } ], "thermals": [ { - "name": "PSU2-Sensor 1" + "name": "PSU2-Sensor 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "PSU2-Sensor 2" + "name": "PSU2-Sensor 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ] } ], "thermals": [ { - "name": "ASIC On-board" + "name": "ASIC On-board", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "NIC" + "name": "NIC", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "System Front" + "name": "System Front", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "DIMM" + "name": "DIMM", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 0" + "name": "CPU Core 0", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 1" + "name": "CPU Core 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [], diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/platform.json b/device/dell/x86_64-dell_s6100_c2538-r0/platform.json index 24e32b16bb1..8e9a0f17db1 100644 --- a/device/dell/x86_64-dell_s6100_c2538-r0/platform.json +++ b/device/dell/x86_64-dell_s6100_c2538-r0/platform.json @@ -1,6 +1,11 @@ { "chassis": { "name": "S6100-ON", + "status_led": { + "controllable": true, + "colors": ["amber", "blinking amber", "green", "blinking green"] + }, + "thermal_manager" : false, "components": [ { "name": "BIOS" @@ -14,48 +19,108 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray4-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray4", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray4-Fan1" + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } @@ -63,51 +128,113 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } ], "thermals": [ { - "name": "CPU On-board" + "name": "CPU On-board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "ASIC On-board Front" + "name": "ASIC On-board Front", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "System Front" + "name": "System Front", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "ASIC On-board Rear" + "name": "ASIC On-board Rear", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "Front GE board" + "name": "Front GE board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "Front SFP+ board" + "name": "Front SFP+ board", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 0" + "name": "CPU Core 0", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 1" + "name": "CPU Core 1", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 2" + "name": "CPU Core 2", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false }, { - "name": "CPU Core 3" + "name": "CPU Core 3", + "controllable": false, + "low-crit-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [ diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json index 2c603dd722f..98a3322bf33 100644 --- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json +++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/platform.json @@ -1,6 +1,11 @@ { "chassis": { "name": "Z9332F-ON", + "status_led": { + "controllable": true, + "colors": ["green", "flashing green", "yellow", "flashing yellow"] + }, + "thermal_manager" : false, "components": [ { "name": "BIOS" @@ -29,123 +34,312 @@ ], "fans": [ { - "name": "FanTray1-Fan1" - }, - { - "name": "FanTray1-Fan2" - }, - { - "name": "FanTray2-Fan1" - }, - { - "name": "FanTray2-Fan2" - }, - { - "name": "FanTray3-Fan1" - }, - { - "name": "FanTray3-Fan2" - }, - { - "name": "FanTray4-Fan1" - }, - { - "name": "FanTray4-Fan2" - }, - { - "name": "FanTray5-Fan1" - }, - { - "name": "FanTray5-Fan2" - }, - { - "name": "FanTray6-Fan1" - }, - { - "name": "FanTray6-Fan2" - }, - { - "name": "FanTray7-Fan1" - }, - { - "name": "FanTray7-Fan2" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray1-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray2-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray3-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray4-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray5-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray5-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray6-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray6-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray7-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } + }, + { + "name": "FanTray7-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ], "fan_drawers":[ { "name": "FanTray1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray1-Fan1" + "name": "FanTray1-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray1-Fan2" + "name": "FanTray1-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray2-Fan1" + "name": "FanTray2-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray2-Fan2" + "name": "FanTray2-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray3", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray3-Fan1" + "name": "FanTray3-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray3-Fan2" + "name": "FanTray3-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray4", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray4-Fan1" + "name": "FanTray4-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray4-Fan2" + "name": "FanTray4-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, - { + { "name": "FanTray5", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray5-Fan1" + "name": "FanTray5-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray5-Fan2" + "name": "FanTray5-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray6", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray6-Fan1" + "name": "FanTray6-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray6-Fan2" + "name": "FanTray6-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "FanTray7", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "FanTray7-Fan1" + "name": "FanTray7-Fan1", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } }, { - "name": "FanTray7-Fan2" + "name": "FanTray7-Fan2", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } @@ -153,63 +347,158 @@ "psus": [ { "name": "PSU1", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU1 Fan" + "name": "PSU1 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] }, { "name": "PSU2", + "status_led": { + "controllable": false + }, "fans": [ { - "name": "PSU2 Fan" + "name": "PSU2 Fan", + "speed": { + "controllable": false + }, + "status_led": { + "available": false + } } ] } ], "thermals": [ { - "name": "CPU On-board" - }, - { - "name": "Baseboard U3" - }, - { - "name": "SW Internal" - }, - { - "name": "Fan U52" - }, - { - "name": "Fan U17" - }, - { - "name": "SW U52" - }, - { - "name": "SW U16" - }, - { - "name": "PSU1 Inlet" - }, - { - "name": "PSU1 Hotspot" - }, - { - "name": "PSU2 Inlet" - }, - { - "name": "PSU2 Hotspot" - }, - { - "name": "SW U04" - }, - { - "name": "SW U14" - }, - { - "name": "SW U4403" + "name": "CPU On-board", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Baseboard U3", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW Internal", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Fan U52", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "Fan U17", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U52", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U16", + "controllable": false, + "low-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU1 Inlet", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU1 Hotspot", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU2 Inlet", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "PSU2 Hotspot", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U04", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U14", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false + }, + { + "name": "SW U4403", + "controllable": false, + "low-crit-threshold": false, + "high-threshold": false, + "high-crit-threshold": false, + "minimum-recorded": false, + "maximum-recorded": false } ], "modules": [], diff --git a/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json b/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json index d52b24cf905..4f82136007a 100644 --- a/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json +++ b/device/dell/x86_64-dellemc_z9332f_d1508-r0/system_health_monitoring_config.json @@ -6,6 +6,6 @@ "led_color": { "fault": "yellow", "normal": "green", - "booting": "flash_green" + "booting": "flashing green" } } diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py index 72f46653d51..e14ce1ce4dd 100755 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/chassis.py @@ -59,17 +59,17 @@ class Chassis(ChassisBase): SYSLED_COLOR_TO_REG = { "green": 0xd0, "yellow": 0xe0, - "flash_green": 0xd2, - "flash_yellow": 0xe2 + "flashing green": 0xd2, + "flashing yellow": 0xe2 } REG_TO_SYSLED_COLOR = { 0xd0 : "green", 0xe0 : "yellow", - 0xd2 : "flash_green", - 0xd1 : "flash_green", - 0xe2 : "flash_yellow", - 0xe1 : "flash_yellow" + 0xd2 : "flashing green", + 0xd1 : "flashing green", + 0xe2 : "flashing yellow", + 0xe1 : "flashing yellow" } _global_port_pres_dict = {} From 8c57f0521f3be4daca3db94aac35e97db6b285f8 Mon Sep 17 00:00:00 2001 From: Dev Ojha <47282568+developfast@users.noreply.github.com> Date: Wed, 31 Aug 2022 11:08:32 -0700 Subject: [PATCH 07/19] [Arista7050cx3] TD3 SKU changes for pg headroom value after interop testing with cisco 8102 (#11901) Why I did it After PFC interop testing between 8102 and 7050cx3, data packet losses were observed on the Rx ports of the 7050cx3 (inflow from 8102) during testing. This was primarily due to the slower response times to react to PFC pause packets for the 8102, when receiving such frames from neighboring devices. To solve for the packet drops, the 7050cx3 pg headroom size has to be increased to 160kB. How I did it Modified the xoff threshold value to 160kB in the pg_profile file to allow for the buffer manager to read that value when building the image, and configuring the device How to verify it run "mmuconfig -l" once image is built Signed-off-by: dojha --- .../Arista-7050CX3-32S-C32/pg_profile_lookup.ini | 12 ++++++------ .../Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini index dd405301f72..5b4482bc74c 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-C32/pg_profile_lookup.ini @@ -1,8 +1,8 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 50000 5m 4608 4608 33792 0 4608 - 100000 5m 4608 4608 49408 0 4608 - 50000 40m 4608 4608 36352 0 4608 - 100000 40m 4608 4608 54528 0 4608 - 50000 300m 4608 4608 55296 0 4608 - 100000 300m 4608 4608 92672 0 4608 + 50000 5m 4608 4608 160000 0 4608 + 100000 5m 4608 4608 160000 0 4608 + 50000 40m 4608 4608 160000 0 4608 + 100000 40m 4608 4608 160000 0 4608 + 50000 300m 4608 4608 160000 0 4608 + 100000 300m 4608 4608 160000 0 4608 diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini index 8ee7a6714b1..5b4482bc74c 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/pg_profile_lookup.ini @@ -1,8 +1,8 @@ # PG lossless profiles. # speed cable size xon xoff threshold xon_offset - 50000 5m 4608 4608 79872 0 4608 - 100000 5m 4608 4608 54528 0 4608 - 50000 40m 4608 4608 39936 0 4608 - 100000 40m 4608 4608 60416 0 4608 - 50000 300m 4608 4608 61440 0 4608 - 100000 300m 4608 4608 103680 0 4608 + 50000 5m 4608 4608 160000 0 4608 + 100000 5m 4608 4608 160000 0 4608 + 50000 40m 4608 4608 160000 0 4608 + 100000 40m 4608 4608 160000 0 4608 + 50000 300m 4608 4608 160000 0 4608 + 100000 300m 4608 4608 160000 0 4608 From 0bf0133ecc4135095c4a2e58680446bc761f0369 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Thu, 1 Sep 2022 09:53:28 +0300 Subject: [PATCH 08/19] [202012][submodule] Advance sonic-swss-common pointer (#11888) #### Why I did it Update sonic-swss-common submodule pointer to include the following: * [202012] Add docker-mux related table names ([#669](https://github.com/sonic-net/sonic-swss-common/pull/669)) * Transfer organization from Azure to sonic-net ([#658](https://github.com/sonic-net/sonic-swss-common/pull/658)) --- src/sonic-swss-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss-common b/src/sonic-swss-common index fb89310e616..3925249ab50 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit fb89310e616ce4a5331aa024a080d70423131131 +Subproject commit 3925249ab50485bb9e48dbb939a716162911196f From 9d3194c77a32055e639d6ad68c5811c377dfa237 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Wed, 29 Jun 2022 21:34:02 -0700 Subject: [PATCH 09/19] Avoid write_standby in warm restart context (#11283) Avoid write_standby in warm restart context. sign-off: Jing Zhang zhangjing@microsoft.com Why I did it In warm restart context, we should avoid mux state change. How I did it Check warm restart flag before applying changes to app db. How to verify it Ran write_standby in table missing, key missing, field missing scenarios. Did a warm restart, app db changes were skipped. Saw this in syslog: WARNING write_standby: Taking no action due to ongoing warmrestart. --- files/scripts/write_standby.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py index 53cf5265ecd..3a41fe58bbe 100755 --- a/files/scripts/write_standby.py +++ b/files/scripts/write_standby.py @@ -3,8 +3,8 @@ import time from sonic_py_common import logger as log -from swsscommon.swsscommon import ConfigDBConnector, DBConnector, FieldValuePairs, ProducerStateTable, SonicV2Connector -from swsscommon.swsscommon import APPL_DB +from swsscommon.swsscommon import ConfigDBConnector, DBConnector, FieldValuePairs, ProducerStateTable, SonicV2Connector, Table +from swsscommon.swsscommon import APPL_DB, STATE_DB logger = log.Logger('write_standby') @@ -22,6 +22,7 @@ class MuxStateWriter(object): def __init__(self): self.config_db_connector = None self.appl_db_connector = None + self.state_db_connector = None self.asic_db_connector = None @property @@ -45,6 +46,16 @@ def appl_db(self): if self.appl_db_connector is None: self.appl_db_connector = DBConnector(APPL_DB, REDIS_SOCK_PATH, True) return self.appl_db_connector + + @property + def state_db(self): + """ + Returns the state DB connector. + Intializes the connector during the first call + """ + if self.state_db_connector is None: + self.state_db_connector = DBConnector(STATE_DB, REDIS_SOCK_PATH, True) + return self.state_db_connector @property def asic_db(self): @@ -75,6 +86,16 @@ def is_dualtor(self): return 'subtype' in metadata and 'dualtor' in metadata['subtype'].lower() + @property + def is_warmrestart(self): + """ + Checks if a warmrestart is going on + """ + tbl = Table(self.state_db, 'WARM_RESTART_ENABLE_TABLE') + (status, value) = tbl.hget('system', 'enable') + + return status and value == 'true' + def get_auto_mux_intfs(self): """ Returns a list of all mux cable interfaces that are configured to auto-switch @@ -117,6 +138,12 @@ def apply_mux_config(self): if not self.is_dualtor: # If not running on a dual ToR system, take no action return + + if self.is_warmrestart: + # If in warmrestart context, take no action + logger.log_warning("Skip setting mux state due to ongoing warmrestart.") + return + intfs = self.get_auto_mux_intfs() state = 'standby' if self.wait_for_tunnel(): From 4ab83170a592befd2014be1cd99bc88b7e5c8603 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Tue, 9 Aug 2022 14:21:29 -0700 Subject: [PATCH 10/19] [write_standby] update write_standby.py script (#11650) Why I did it The initial value has to be present for the state machines to work. In active-standby dual-tor scenario, or any hardware mux scenario, the value will be updtaed eventually with a delay. However, in active-active dual-tor scenario, there is no other mechanism to initialize the value and get state machines started. So this script will have to write something at start up time. For active-active dualtor, 'active' is a more preferred initial value, the state machine will switch the state to standby soon if link prober found link not in good state. How I did it Update the script to always provide initial values. How to verify it Tested on active-active dual-tor testbed. Signed-off-by: Ying Xie ying.xie@microsoft.com --- files/scripts/write_standby.py | 45 +++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py index 3a41fe58bbe..86d50737b1c 100755 --- a/files/scripts/write_standby.py +++ b/files/scripts/write_standby.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import argparse import time from sonic_py_common import logger as log @@ -19,11 +20,13 @@ class MuxStateWriter(object): Class used to write standby mux state to APP DB """ - def __init__(self): + def __init__(self, activeactive, activestandby): self.config_db_connector = None self.appl_db_connector = None self.state_db_connector = None self.asic_db_connector = None + self.default_active_active_state = activeactive + self.default_active_standby_state = activestandby @property def config_db(self): @@ -96,14 +99,25 @@ def is_warmrestart(self): return status and value == 'true' - def get_auto_mux_intfs(self): + def get_all_mux_intfs_modes(self): """ - Returns a list of all mux cable interfaces that are configured to auto-switch + Returns a list of all mux cable interfaces, with suggested modes + Setting mux initial modes is crucial to kick off the statemachines, + have to set the modes for all mux/gRPC ports. """ + intf_modes = {} all_intfs = self.config_db.get_table('MUX_CABLE') - auto_intfs = [intf for intf, status in all_intfs.items() - if status['state'].lower() == 'auto'] - return auto_intfs + for intf, status in all_intfs.items(): + state = status['state'].lower() + if state in ['active', 'standby']: + intf_modes[intf] = state + elif state in ['auto', 'manual']: + if ('soc_ipv4' in status or 'soc_ipv6' in status or + ('cable_type' in status and status['cable_type'] == 'active-active')): + intf_modes[intf] = self.default_active_active_state + else: + intf_modes[intf] = self.default_active_standby_state + return intf_modes def tunnel_exists(self): """ @@ -144,19 +158,26 @@ def apply_mux_config(self): logger.log_warning("Skip setting mux state due to ongoing warmrestart.") return - intfs = self.get_auto_mux_intfs() - state = 'standby' + modes = self.get_all_mux_intfs_modes() if self.wait_for_tunnel(): - logger.log_warning("Applying {} state to interfaces {}".format(state, intfs)) + logger.log_warning("Applying state to interfaces {}".format(modes)) producer_state_table = ProducerStateTable(self.appl_db, 'MUX_CABLE_TABLE') - fvs = create_fvs(state=state) - for intf in intfs: + for intf, state in modes.items(): + fvs = create_fvs(state=state) producer_state_table.set(intf, fvs) else: logger.log_error("Timed out waiting for tunnel {}, mux state will not be written".format(self.tunnel_name)) if __name__ == '__main__': - mux_writer = MuxStateWriter() + parser = argparse.ArgumentParser(description='Write initial mux state') + parser.add_argument('-a', '--active_active', + help='state: intial state for "auto" and/or "manual" config in active-active mode, default "active"', + type=str, required=False, default='active') + parser.add_argument('-s', '--active_standby', + help='state: intial state for "auto" and/or "manual" config in active-standby mode, default "standby"', + type=str, required=False, default='standby') + args = parser.parse_args() + mux_writer = MuxStateWriter(activeactive=args.active_active, activestandby=args.active_standby) mux_writer.apply_mux_config() From f4e50597e232a25d468e6566e9f9f240a8848a03 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Fri, 2 Sep 2022 14:07:48 +0800 Subject: [PATCH 11/19] [actions] Add github context env in label action. (#11926) --- .github/workflows/label.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index ee4857fe23f..f336367cc52 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -21,6 +21,8 @@ jobs: runs-on: ubuntu-latest steps: - name: approve + env: + GITHUB_CONTEXT: ${{ toJson(github) }} run: | set -e echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token From e821dd855111391cc4fdbd51c8f366ecb9e6fc54 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 2 Sep 2022 13:40:40 -0700 Subject: [PATCH 12/19] [arp_update]: Set failed IPv6 neighbors to incomplete (#11919) After pinging any failed IPv6 neighbor entries, set the remaining failed/incomplete entries to a permanent INCOMPLETE state. This manual setting to INCOMPLETE prevents these entries from automatically transitioning to FAILED state, and since they are now incomplete any subsequent NA messages for these neighbors is able to resolve the entry in the cache. Signed-off-by: Lawrence Lee --- files/scripts/arp_update | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/files/scripts/arp_update b/files/scripts/arp_update index f8704c582b6..cd2b13d0cf7 100755 --- a/files/scripts/arp_update +++ b/files/scripts/arp_update @@ -50,6 +50,17 @@ while /bin/true; do eval `eval $ip6cmd` if [[ $SUBTYPE == "dualtor" ]]; then + # manually set any remaining FAILED/INCOMPLETE entries to permanently INCOMPLETE + # this prevents any remaining INCOMPLETE entries from automatically transitioning to FAILED + # once these entries are incomplete, any subsequent neighbor advertisement messages + # are able to resolve the entry + + # generates the following command for each failed or incomplete IPv6 neighbor + # ip neigh replace dev nud incomplete + neigh_replace_template="sed -e 's/^/ip neigh replace /' -e 's/,/ dev /' -e 's/$/ nud incomplete;/'" + ip_neigh_replace_cmd="ip -6 neigh show | grep -v fe80 | grep Vlan1000 | grep -E 'FAILED|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',' | $neigh_replace_template" + eval `eval $ip_neigh_replace_cmd` + # on dual ToR devices, try to resolve failed neighbor entries since # these entries will have tunnel routes installed, preventing normal # neighbor resolution (SWSS PR #2137) From 3d81b61fa1b4ce219b7f61b3ec561e956268bed3 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 2 Sep 2022 21:09:06 -0700 Subject: [PATCH 13/19] [202012][kernel][swss]: Linux kernel and SWSS submodule update (#11929) Include following new kernel commits: - 815cb34 [patch]: Add accept_untracked_na kernel param (#291) - fbb76cc Remove kernel config SERIAL_8250_RUNTIME_UARTS (#286) Introduce following SWSS commits: - eedf59d [intfmgr]: Enable `accept_untracked_na` kernel param (#2439) - bbd4eb7 [BFD]Clean up state_db BFD entries on swss restart (#2434) (#2435) - aa7b546 [FDB] [202012] Fix fbdorch to properly handle syncd FDB FLUSH Notif (#2401) - 4190c13 Support for platforms based on Clounix Networks' device (#2399) Signed-off-by: Lawrence Lee --- src/sonic-linux-kernel | 2 +- src/sonic-swss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index 01e55081d87..815cb349544 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit 01e55081d87550db52f6abd7ee10074ca0f68147 +Subproject commit 815cb349544338a16d2f7740aee87db13bb8bc1a diff --git a/src/sonic-swss b/src/sonic-swss index e84a90140a8..eedf59dd935 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit e84a90140a81ae76c76730218c2b24df7f577f1f +Subproject commit eedf59dd935d1e4f2176fe1178aa167e262cd001 From 484402ff081933b371bddb40321fbe2709a017cd Mon Sep 17 00:00:00 2001 From: Vivek Date: Sun, 4 Sep 2022 01:05:22 -0700 Subject: [PATCH 14/19] [202012] [Mellanox] [SKU] Mellanox-SN4700-C128 SKU added (11574) (#11878) - Why I did it New SKU for MSN-4700 Platform i.e. Mellanox-SN4700-C128 Requirements: * Breakout: Port 1-32: 4x100G * Downlinks: 120 (1-30) * Uplinks: 8 (31-32) * Shared Headroom: Enabled * Over Subscribe Ratio: 1:8 * Default Topology: T2 * Default Cable Length for T2: 1500m * QoS params: The default ones defined in qos_config.j2 will be applied * Small Packet Percentage: Used 50% for traditional buffer model Note: For dynamic model, the value defined in LOSSLESS_TRAFFIC_PATTERN|AZURE|small_packet_percentage is used Additional Details: Switch Type has to be programmed as SpineRouter through config_db.json in DEVICE_METADATA|localhost|type field for the buffer values & cable lengths defined in the buffers_defaults_t2.j2 to apply on the device Cable Lengths Used for generating buffer_defaults_{t0,t1,t2}.j2 values Signed-off-by: Vivek Reddy --- .../Mellanox-SN4700-C128/buffers.json.j2 | 15 + .../buffers_defaults_objects.j2 | 1 + .../buffers_defaults_t0.j2 | 39 +++ .../buffers_defaults_t1.j2 | 39 +++ .../buffers_defaults_t2.j2 | 44 +++ .../buffers_dynamic.json.j2 | 16 + .../pg_profile_lookup.ini | 41 +++ .../Mellanox-SN4700-C128/port_config.ini | 129 ++++++++ .../Mellanox-SN4700-C128/qos.json.j2 | 1 + .../Mellanox-SN4700-C128/sai.profile | 3 + .../sai_4700_128x100g.xml | 277 ++++++++++++++++++ 11 files changed, 605 insertions(+) create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 create mode 120000 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini create mode 120000 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile create mode 100644 device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 new file mode 100644 index 00000000000..2905747f5b0 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers.json.j2 @@ -0,0 +1,15 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{%- set default_topo = 't2' %} +{%- include 'buffers_config.j2' %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 new file mode 120000 index 00000000000..c01aebb7ae1 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_objects.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 new file mode 100644 index 00000000000..f22c56702af --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t0.j2 @@ -0,0 +1,39 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '44910592' %} +{% set ingress_lossless_pool_xoff = '1751040' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '44910592' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 new file mode 100644 index 00000000000..b8705028052 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t1.j2 @@ -0,0 +1,39 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '5m' %} +{% set ingress_lossless_pool_size = '44587008' %} +{% set ingress_lossless_pool_xoff = '2074624' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '44587008' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 new file mode 100644 index 00000000000..b0df4defd44 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_defaults_t2.j2 @@ -0,0 +1,44 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{% set default_cable = '1500m' %} +{%-set ports2cable = { + 'spinerouter_leafrouter' : '1500m', + 'spinerouter_spinerouter' : '1500m' + } +-%} +{% set ingress_lossless_pool_size = '35094528' %} +{% set ingress_lossless_pool_xoff = '11567104' %} +{% set egress_lossless_pool_size = '60817392' %} +{% set egress_lossy_pool_size = '35094528' %} + +{% import 'buffers_defaults_objects.j2' as defs with context %} + +{%- macro generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) %} +{{ defs.generate_buffer_pool_and_profiles_with_inactive_ports(port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_profile_lists_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_profile_lists(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_queue_buffers_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_queue_buffers(port_names_active, port_names_inactive) }} +{%- endmacro %} + +{%- macro generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) %} +{{ defs.generate_pg_profiles(port_names_active, port_names_inactive) }} +{%- endmacro %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 new file mode 100644 index 00000000000..4ec20f1d9e8 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/buffers_dynamic.json.j2 @@ -0,0 +1,16 @@ +{# + Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. + Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +#} +{%- set default_topo = 't2' %} +{%- set dynamic_mode = 'true' %} +{%- include 'buffers_config.j2' %} diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini new file mode 100644 index 00000000000..7b78fb98ae3 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/pg_profile_lookup.ini @@ -0,0 +1,41 @@ +## +## Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. +## Apache-2.0 +## +## Licensed under the Apache License, Version 2.0 (the "License"); +## you may not use this file except in compliance with the License. +## You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## +# PG lossless profiles. +# speed cable size xon xoff threshold + 10000 5m 19456 19456 24576 0 + 25000 5m 19456 19456 26624 0 + 40000 5m 19456 19456 30720 0 + 50000 5m 19456 19456 33792 0 + 100000 5m 19456 19456 59392 0 + 200000 5m 19456 19456 66560 0 + 10000 40m 19456 19456 25600 0 + 25000 40m 19456 19456 28672 0 + 40000 40m 19456 19456 33792 0 + 50000 40m 19456 19456 36864 0 + 100000 40m 19456 19456 66560 0 + 200000 40m 19456 19456 80896 0 + 10000 300m 19456 19456 30720 0 + 25000 300m 19456 19456 41984 0 + 40000 300m 19456 19456 54272 0 + 50000 300m 19456 19456 63488 0 + 100000 300m 19456 19456 120832 0 + 200000 300m 19456 19456 188416 0 + 10000 1500m 19456 19456 55296 0 + 25000 1500m 19456 19456 103424 0 + 40000 1500m 19456 19456 153600 0 + 50000 1500m 19456 19456 187392 0 + 100000 1500m 19456 19456 366592 0 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini new file mode 100644 index 00000000000..d64b66b0b69 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/port_config.ini @@ -0,0 +1,129 @@ +# name lanes alias index speed +Ethernet0 0,1 etp1a 1 100000 +Ethernet2 2,3 etp1b 1 100000 +Ethernet4 4,5 etp1c 1 100000 +Ethernet6 6,7 etp1d 1 100000 +Ethernet8 8,9 etp2a 2 100000 +Ethernet10 10,11 etp2b 2 100000 +Ethernet12 12,13 etp2c 2 100000 +Ethernet14 14,15 etp2d 2 100000 +Ethernet16 16,17 etp3a 3 100000 +Ethernet18 18,19 etp3b 3 100000 +Ethernet20 20,21 etp3c 3 100000 +Ethernet22 22,23 etp3d 3 100000 +Ethernet24 24,25 etp4a 4 100000 +Ethernet26 26,27 etp4b 4 100000 +Ethernet28 28,29 etp4c 4 100000 +Ethernet30 30,31 etp4d 4 100000 +Ethernet32 32,33 etp5a 5 100000 +Ethernet34 34,35 etp5b 5 100000 +Ethernet36 36,37 etp5c 5 100000 +Ethernet38 38,39 etp5d 5 100000 +Ethernet40 40,41 etp6a 6 100000 +Ethernet42 42,43 etp6b 6 100000 +Ethernet44 44,45 etp6c 6 100000 +Ethernet46 46,47 etp6d 6 100000 +Ethernet48 48,49 etp7a 7 100000 +Ethernet50 50,51 etp7b 7 100000 +Ethernet52 52,53 etp7c 7 100000 +Ethernet54 54,55 etp7d 7 100000 +Ethernet56 56,57 etp8a 8 100000 +Ethernet58 58,59 etp8b 8 100000 +Ethernet60 60,61 etp8c 8 100000 +Ethernet62 62,63 etp8d 8 100000 +Ethernet64 64,65 etp9a 9 100000 +Ethernet66 66,67 etp9b 9 100000 +Ethernet68 68,69 etp9c 9 100000 +Ethernet70 70,71 etp9d 9 100000 +Ethernet72 72,73 etp10a 10 100000 +Ethernet74 74,75 etp10b 10 100000 +Ethernet76 76,77 etp10c 10 100000 +Ethernet78 78,79 etp10d 10 100000 +Ethernet80 80,81 etp11a 11 100000 +Ethernet82 82,83 etp11b 11 100000 +Ethernet84 84,85 etp11c 11 100000 +Ethernet86 86,87 etp11d 11 100000 +Ethernet88 88,89 etp12a 12 100000 +Ethernet90 90,91 etp12b 12 100000 +Ethernet92 92,93 etp12c 12 100000 +Ethernet94 94,95 etp12d 12 100000 +Ethernet96 96,97 etp13a 13 100000 +Ethernet98 98,99 etp13b 13 100000 +Ethernet100 100,101 etp13c 13 100000 +Ethernet102 102,103 etp13d 13 100000 +Ethernet104 104,105 etp14a 14 100000 +Ethernet106 106,107 etp14b 14 100000 +Ethernet108 108,109 etp14c 14 100000 +Ethernet110 110,111 etp14d 14 100000 +Ethernet112 112,113 etp15a 15 100000 +Ethernet114 114,115 etp15b 15 100000 +Ethernet116 116,117 etp15c 15 100000 +Ethernet118 118,119 etp15d 15 100000 +Ethernet120 120,121 etp16a 16 100000 +Ethernet122 122,123 etp16b 16 100000 +Ethernet124 124,125 etp16c 16 100000 +Ethernet126 126,127 etp16d 16 100000 +Ethernet128 128,129 etp17a 17 100000 +Ethernet130 130,131 etp17b 17 100000 +Ethernet132 132,133 etp17c 17 100000 +Ethernet134 134,135 etp17d 17 100000 +Ethernet136 136,137 etp18a 18 100000 +Ethernet138 138,139 etp18b 18 100000 +Ethernet140 140,141 etp18c 18 100000 +Ethernet142 142,143 etp18d 18 100000 +Ethernet144 144,145 etp19a 19 100000 +Ethernet146 146,147 etp19b 19 100000 +Ethernet148 148,149 etp19c 19 100000 +Ethernet150 150,151 etp19d 19 100000 +Ethernet152 152,153 etp20a 20 100000 +Ethernet154 154,155 etp20b 20 100000 +Ethernet156 156,157 etp20c 20 100000 +Ethernet158 158,159 etp20d 20 100000 +Ethernet160 160,161 etp21a 21 100000 +Ethernet162 162,163 etp21b 21 100000 +Ethernet164 164,165 etp21c 21 100000 +Ethernet166 166,167 etp21d 21 100000 +Ethernet168 168,169 etp22a 22 100000 +Ethernet170 170,171 etp22b 22 100000 +Ethernet172 172,173 etp22c 22 100000 +Ethernet174 174,175 etp22d 22 100000 +Ethernet176 176,177 etp23a 23 100000 +Ethernet178 178,179 etp23b 23 100000 +Ethernet180 180,181 etp23c 23 100000 +Ethernet182 182,183 etp23d 23 100000 +Ethernet184 184,185 etp24a 24 100000 +Ethernet186 186,187 etp24b 24 100000 +Ethernet188 188,189 etp24c 24 100000 +Ethernet190 190,191 etp24d 24 100000 +Ethernet192 192,193 etp25a 25 100000 +Ethernet194 194,195 etp25b 25 100000 +Ethernet196 196,197 etp25c 25 100000 +Ethernet198 198,199 etp25d 25 100000 +Ethernet200 200,201 etp26a 26 100000 +Ethernet202 202,203 etp26b 26 100000 +Ethernet204 204,205 etp26c 26 100000 +Ethernet206 206,207 etp26d 26 100000 +Ethernet208 208,209 etp27a 27 100000 +Ethernet210 210,211 etp27b 27 100000 +Ethernet212 212,213 etp27c 27 100000 +Ethernet214 214,215 etp27d 27 100000 +Ethernet216 216,217 etp28a 28 100000 +Ethernet218 218,219 etp28b 28 100000 +Ethernet220 220,221 etp28c 28 100000 +Ethernet222 222,223 etp28d 28 100000 +Ethernet224 224,225 etp29a 29 100000 +Ethernet226 226,227 etp29b 29 100000 +Ethernet228 228,229 etp29c 29 100000 +Ethernet230 230,231 etp29d 29 100000 +Ethernet232 232,233 etp30a 30 100000 +Ethernet234 234,235 etp30b 30 100000 +Ethernet236 236,237 etp30c 30 100000 +Ethernet238 238,239 etp30d 30 100000 +Ethernet240 240,241 etp31a 31 100000 +Ethernet242 242,243 etp31b 31 100000 +Ethernet244 244,245 etp31c 31 100000 +Ethernet246 246,247 etp31d 31 100000 +Ethernet248 248,249 etp32a 32 100000 +Ethernet250 250,251 etp32b 32 100000 +Ethernet252 252,253 etp32c 32 100000 +Ethernet254 254,255 etp32d 32 100000 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 new file mode 120000 index 00000000000..eccf286dc87 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/qos.json.j2 @@ -0,0 +1 @@ +../../x86_64-mlnx_msn2700-r0/ACS-MSN2700/qos.json.j2 \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile new file mode 100644 index 00000000000..d20b5e46b84 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai.profile @@ -0,0 +1,3 @@ +SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/sai_4700_128x100g.xml +SAI_DUMP_STORE_PATH=/var/log/mellanox/sdk-dumps +SAI_DUMP_STORE_AMOUNT=10 diff --git a/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml new file mode 100644 index 00000000000..f5d49f8b86a --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4700-r0/Mellanox-SN4700-C128/sai_4700_128x100g.xml @@ -0,0 +1,277 @@ + + + + + 00:02:03:04:05:00 + + + 1 + + + 32 + + + + + 1 + 8 + 17 + 3 + 1536 + 4 + + + 5 + 8 + 16 + 3 + 1536 + 4 + + + 9 + 8 + 19 + 3 + 1536 + 4 + + + 13 + 8 + 18 + 3 + 1536 + 4 + + + 17 + 8 + 21 + 3 + 1536 + 4 + + + 21 + 8 + 20 + 3 + 1536 + 4 + + + 25 + 8 + 23 + 3 + 1536 + 4 + + + 29 + 8 + 22 + 3 + 1536 + 4 + + + 33 + 8 + 29 + 3 + 1536 + 4 + + + 37 + 8 + 28 + 3 + 1536 + 4 + + + 41 + 8 + 31 + 3 + 1536 + 4 + + + 45 + 8 + 30 + 3 + 1536 + 4 + + + 49 + 8 + 25 + 3 + 1536 + 4 + + + 53 + 8 + 24 + 3 + 1536 + 4 + + + 57 + 8 + 27 + 3 + 1536 + 4 + + + 61 + 8 + 26 + 3 + 1536 + 4 + + + 65 + 8 + 14 + 3 + 1536 + 4 + + + 69 + 8 + 15 + 3 + 1536 + 4 + + + 73 + 8 + 12 + 3 + 1536 + 4 + + + 77 + 8 + 13 + 3 + 1536 + 4 + + + 81 + 8 + 10 + 3 + 1536 + 4 + + + 85 + 8 + 11 + 3 + 1536 + 4 + + + 89 + 8 + 8 + 3 + 1536 + 4 + + + 93 + 8 + 9 + 3 + 1536 + 4 + + + 97 + 8 + 2 + 3 + 1536 + 4 + + + 101 + 8 + 3 + 3 + 1536 + 4 + + + 105 + 8 + 0 + + + 3 + + + 1536 + 4 + + + 109 + 8 + 1 + 3 + 1536 + 4 + + + 113 + 8 + 6 + 3 + 1536 + 4 + + + 117 + 8 + 7 + 3 + 1536 + 4 + + + 121 + 8 + 4 + 3 + 1536 + 4 + + + 125 + 8 + 5 + 3 + 1536 + 4 + + + + From 586a62342245f842a2d8a9968c84fe9da9868392 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 4 Sep 2022 19:29:06 +0800 Subject: [PATCH 15/19] [ci/build]: Upgrade SONiC package versions (#11911) --- .../build-sonic-slave-buster/versions-git | 4 +-- files/build/versions/default/versions-git | 6 ++--- .../docker-fpm-frr/versions-deb-buster | 4 +-- .../docker-sonic-mgmt-framework/versions-py3 | 11 +++++--- .../sonic-slave-buster/versions-deb-buster | 26 +++++++++---------- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- 7 files changed, 29 insertions(+), 26 deletions(-) diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-git b/files/build/versions/build/build-sonic-slave-buster/versions-git index 0b4ee57fa9e..d85ae1de439 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -3,7 +3,7 @@ https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564 https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 -https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 +https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 @@ -11,4 +11,4 @@ https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==dd1e52af266a53671b162ddd95e4f6b01513e8e5 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==ab4bf75bb7d02ffa1f5c407d56980f157ef56fe2 \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 0a75d6d99f0..fff02985866 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,4 +1,4 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a089281a82f9481e246dcc1292145d0e8635f51c https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b @@ -9,7 +9,7 @@ https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499 https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/p4lang/scapy-vxlan.git==85ffe83da156568ee47a0750f638227e6e1d7479 -https://github.com/sflow/host-sflow==4ff2a940848fa9244a289f9c96fd9681d31a0264 +https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f https://github.com/thom311/libnl==cbafad9ddf24caef5230fef715d34f0539603be0 https://salsa.debian.org/debian/libteam.git==f8808df228b00873926b5e7b998ad8b61368d4c5 @@ -17,4 +17,4 @@ https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd https://salsa.debian.org/kernel-team/ethtool/==fb77fb17864600d7deb46729c28c677c7da367d5 https://salsa.debian.org/kernel-team/initramfs-tools.git==40e544e13611c1b2690eb99a8096fc16c1b9c74e https://salsa.debian.org/sk-guest/monit.git==c9da7ebb1f35dfba17b50b5969a6e75e29cbec0d -https://salsa.debian.org/ssh-team/openssh.git==dd1e52af266a53671b162ddd95e4f6b01513e8e5 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==ab4bf75bb7d02ffa1f5c407d56980f157ef56fe2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster index 25282ee1643..2a7a468a478 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster +++ b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster @@ -19,8 +19,8 @@ libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 libsensors5==1:3.5.0-3 -libsnmp-base==5.7.3+dfsg-5+deb10u2 -libsnmp30==5.7.3+dfsg-5+deb10u2 +libsnmp-base==5.7.3+dfsg-5+deb10u3 +libsnmp30==5.7.3+dfsg-5+deb10u3 libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libyang1==1.0.184-2 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 index 583032f524a..da271761285 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -5,16 +5,19 @@ click==8.1.3 clickclick==20.10.2 connexion==2.7.0 flask==2.2.2 -grpcio==1.47.0 +grpcio==1.48.1 grpcio-tools==1.20.0 idna==3.3 importlib-metadata==4.12.0 importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 -jsonschema==4.14.0 -openapi-schema-validator==0.2.3 -openapi-spec-validator==0.4.0 +jsonschema==4.15.0 +jsonschema-spec==0.1.1 +lazy-object-proxy==1.7.1 +openapi-schema-validator==0.3.3 +openapi-spec-validator==0.5.0 +pathable==0.4.3 pkgutil_resolve_name==1.3.10 protobuf==4.21.5 pyrsistent==0.18.1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster index 3d832de2a61..c7f34c90842 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -139,7 +139,7 @@ gettext==0.19.8.1-9 gettext-base==0.19.8.1-9 gfortran==4:8.3.0-1 gfortran-8==8.3.0-6 -ghostscript==9.27~dfsg-2+deb10u5 +ghostscript==9.27~dfsg-2+deb10u6 gir1.2-atk-1.0==2.30.0-2 gir1.2-atspi-2.0==2.30.0-7 gir1.2-freedesktop==1.58.3-2 @@ -495,7 +495,7 @@ libfile-stripnondeterminism-perl==1.1.2-1 libfile-which-perl==1.23-1 libfl-dev==2.6.4-6.2 libfl2==2.6.4-6.2 -libflac8==1.3.2-3+deb10u1 +libflac8==1.3.2-3+deb10u2 libflite1==2.1-release-3 libfont-afm-perl==1.20-2 libfontbox2-java==2.0.13-2 @@ -563,8 +563,8 @@ libgpgme11==1.12.0-6 libgpm2==1.20.7-5 libgraphite2-3==1.3.13-7 libgraphite2-dev==1.3.13-7 -libgs9==9.27~dfsg-2+deb10u5 -libgs9-common==9.27~dfsg-2+deb10u5 +libgs9==9.27~dfsg-2+deb10u6 +libgs9-common==9.27~dfsg-2+deb10u6 libgsm1==1.0.18-2 libgssapi-krb5-2==1.17-3+deb10u3 libgssrpc4==1.17-3+deb10u3 @@ -1037,9 +1037,9 @@ libsnappy-java==1.1.7.2-1 libsnappy-jni==1.1.7.2-1 libsnappy1v5==1.1.7-1 libsndfile1==1.0.28-6+deb10u1 -libsnmp-base==5.7.3+dfsg-5+deb10u2 -libsnmp-dev==5.7.3+dfsg-5+deb10u2 -libsnmp30==5.7.3+dfsg-5+deb10u2 +libsnmp-base==5.7.3+dfsg-5+deb10u3 +libsnmp-dev==5.7.3+dfsg-5+deb10u3 +libsnmp30==5.7.3+dfsg-5+deb10u3 libsoap-lite-perl==1.27-1 libsodium-dev==1.0.17-1 libsodium23==1.0.17-1 @@ -1609,12 +1609,12 @@ python3.7-dbg==3.7.3-2+deb10u3 python3.7-dev==3.7.3-2+deb10u3 python3.7-minimal==3.7.3-2+deb10u3 qdbus==4:4.8.7+dfsg-18+deb10u1 -qemu-kvm==1:3.1+dfsg-8+deb10u8 -qemu-system-common==1:3.1+dfsg-8+deb10u8 -qemu-system-data==1:3.1+dfsg-8+deb10u8 -qemu-system-gui==1:3.1+dfsg-8+deb10u8 -qemu-system-x86==1:3.1+dfsg-8+deb10u8 -qemu-utils==1:3.1+dfsg-8+deb10u8 +qemu-kvm==1:3.1+dfsg-8+deb10u9 +qemu-system-common==1:3.1+dfsg-8+deb10u9 +qemu-system-data==1:3.1+dfsg-8+deb10u9 +qemu-system-gui==1:3.1+dfsg-8+deb10u9 +qemu-system-x86==1:3.1+dfsg-8+deb10u9 +qemu-utils==1:3.1+dfsg-8+deb10u9 qt-at-spi==0.4.0-9 qt4-linguist-tools==4:4.8.7+dfsg-18+deb10u1 qt4-qmake==4:4.8.7+dfsg-18+deb10u1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 7a060c49256..b9783271f47 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-git +++ b/files/build/versions/dockers/sonic-slave-buster/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a089281a82f9481e246dcc1292145d0e8635f51c https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-stretch/versions-git b/files/build/versions/dockers/sonic-slave-stretch/versions-git index 7a060c49256..b9783271f47 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-git +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-git @@ -1,2 +1,2 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==f41670fdadc9eca7fff99ab8563190dd41d27ee8 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a089281a82f9481e246dcc1292145d0e8635f51c https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file From 5357bdb643f85dbaa4af8599819381d56daa7376 Mon Sep 17 00:00:00 2001 From: Zhaohui Sun <94606222+ZhaohuiS@users.noreply.github.com> Date: Mon, 5 Sep 2022 09:13:45 +0800 Subject: [PATCH 16/19] Support Restapi/gnmi control plane acls in 202012 branch (#11903) For the Restapi/gnmi use-cases, Sonic has to support a new Table: EXTERNAL_CLIENT of type CTRLPLANE, stage ingress This shall match on 'src ip prefix' and dst port '8080'. Caclmgrd must parse this from acl.json and install as in the below example: iptables -A INPUT -s 20.20.20.20/27 -p tcp --dport 8080 -j ACCEPT or ip6tables if the 'src ip prefix' is IPv6. This change for master branch is in PR sonic-net/sonic-host-services#9 Signed-off-by: Zhaohui Sun --- src/sonic-host-services/scripts/caclmgrd | 28 ++- .../caclmgrd/cacl_external_client_acl_test.py | 44 +++++ .../test_external_client_acl_vectors.py | 167 ++++++++++++++++++ .../tests/common/mock_configdb.py | 5 +- 4 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py create mode 100644 src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py diff --git a/src/sonic-host-services/scripts/caclmgrd b/src/sonic-host-services/scripts/caclmgrd index 4b9649280e3..5faf6423107 100755 --- a/src/sonic-host-services/scripts/caclmgrd +++ b/src/sonic-host-services/scripts/caclmgrd @@ -80,6 +80,10 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): "dst_ports": ["22"], "multi_asic_ns_to_host_fwd":True }, + "EXTERNAL_CLIENT": { + "ip_protocols": ["tcp"], + "multi_asic_ns_to_host_fwd":True + }, "ANY": { "ip_protocols": ["any"], "dst_ports": ["0"], @@ -538,7 +542,10 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): # Obtain default IP protocol(s) and destination port(s) for this service ip_protocols = self.ACL_SERVICES[acl_service]["ip_protocols"] - dst_ports = self.ACL_SERVICES[acl_service]["dst_ports"] + if "dst_ports" in self.ACL_SERVICES[acl_service]: + dst_ports = self.ACL_SERVICES[acl_service]["dst_ports"] + else: + dst_ports = [] acl_rules = {} @@ -564,6 +571,19 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): elif self.is_rule_ipv4(rule_props): table_ip_version = 4 + # Read DST_PORT info from Config DB, insert it back to ACL_SERVICES + if acl_service == 'EXTERNAL_CLIENT' and "L4_DST_PORT" in rule_props: + dst_ports = [rule_props["L4_DST_PORT"]] + self.ACL_SERVICES[acl_service]["dst_ports"] = dst_ports + elif acl_service == 'EXTERNAL_CLIENT' and "L4_DST_PORT_RANGE" in rule_props: + dst_ports = [] + port_ranges = rule_props["L4_DST_PORT_RANGE"].split("-") + port_start = int(port_ranges[0]) + port_end = int(port_ranges[1]) + for port in range(port_start, port_end + 1): + dst_ports.append(port) + self.ACL_SERVICES[acl_service]["dst_ports"] = dst_ports + if (self.is_rule_ipv6(rule_props) and (table_ip_version == 4)): self.log_error("CtrlPlane ACL table {} is a IPv4 based table and rule {} is a IPV6 rule! Ignoring rule." .format(table_name, rule_id)) @@ -579,6 +599,12 @@ class ControlPlaneAclManager(daemon_base.DaemonBase): self.log_warning("Unable to determine if ACL table '{}' contains IPv4 or IPv6 rules. Skipping table..." .format(table_name)) continue + # If no destination port found for this ACL table, + # log a message and skip processing this table. + if len(dst_ports) == 0: + self.log_warning("Required destination port not found for ACL table '{}'. Skipping table..." + .format(table_name)) + continue ipv4_src_ip_set = set() ipv6_src_ip_set = set() # For each ACL rule in this table (in descending order of priority) diff --git a/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py b/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py new file mode 100644 index 00000000000..ef1aa62fe82 --- /dev/null +++ b/src/sonic-host-services/tests/caclmgrd/cacl_external_client_acl_test.py @@ -0,0 +1,44 @@ +import os +import sys + +from swsscommon import swsscommon +from parameterized import parameterized +from sonic_py_common.general import load_module_from_source +from unittest import TestCase, mock +from pyfakefs.fake_filesystem_unittest import patchfs + +from .test_external_client_acl_vectors import EXTERNAL_CLIENT_ACL_TEST_VECTOR +from tests.common.mock_configdb import MockConfigDb + + +DBCONFIG_PATH = '/var/run/redis/sonic-db/database_config.json' + + +class TestCaclmgrdExternalClientAcl(TestCase): + """ + Test caclmgrd EXTERNAL_CLIENT_ACL + """ + def setUp(self): + swsscommon.ConfigDBConnector = MockConfigDb + test_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + modules_path = os.path.dirname(test_path) + scripts_path = os.path.join(modules_path, "scripts") + sys.path.insert(0, modules_path) + caclmgrd_path = os.path.join(scripts_path, 'caclmgrd') + self.caclmgrd = load_module_from_source('caclmgrd', caclmgrd_path) + + @parameterized.expand(EXTERNAL_CLIENT_ACL_TEST_VECTOR) + @patchfs + def test_caclmgrd_external_client_acl(self, test_name, test_data, fs): + if not os.path.exists(DBCONFIG_PATH): + fs.create_file(DBCONFIG_PATH) # fake database_config.json + + MockConfigDb.set_config_db(test_data["config_db"]) + self.caclmgrd.ControlPlaneAclManager.get_namespace_mgmt_ip = mock.MagicMock() + self.caclmgrd.ControlPlaneAclManager.get_namespace_mgmt_ipv6 = mock.MagicMock() + self.caclmgrd.ControlPlaneAclManager.generate_block_ip2me_traffic_iptables_commands = mock.MagicMock(return_value=[]) + self.caclmgrd.ControlPlaneAclManager.get_chain_list = mock.MagicMock(return_value=["INPUT", "FORWARD", "OUTPUT"]) + caclmgrd_daemon = self.caclmgrd.ControlPlaneAclManager("caclmgrd") + + iptables_rules_ret, _ = caclmgrd_daemon.get_acl_rules_and_translate_to_iptables_commands('') + self.assertEqual(set(test_data["return"]).issubset(set(iptables_rules_ret)), True) diff --git a/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py b/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py new file mode 100644 index 00000000000..d55e6b8e6ce --- /dev/null +++ b/src/sonic-host-services/tests/caclmgrd/test_external_client_acl_vectors.py @@ -0,0 +1,167 @@ +from unittest.mock import call + +""" + caclmgrd test external_client_acl vector +""" +EXTERNAL_CLIENT_ACL_TEST_VECTOR = [ + [ + "Test single IPv4 dst port + src ip for EXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT": "8081", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "20.0.0.55/32" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP" + ], + } + ], + [ + "Test IPv4 dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT_RANGE": "8081-8083", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "20.0.0.55/32" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8082 -j ACCEPT", + "iptables -A INPUT -p tcp -s 20.0.0.55/32 --dport 8083 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP", + "iptables -A INPUT -p tcp --dport 8082 -j DROP", + "iptables -A INPUT -p tcp --dport 8083 -j DROP", + ], + } + ], + [ + "Test IPv6 single dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT": "8081", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "2001::2/128" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP" + ], + } + ], + [ + "Test IPv6 dst port range + src ip forEXTERNAL_CLIENT_ACL", + { + "config_db": { + "ACL_TABLE": { + "EXTERNAL_CLIENT_ACL": { + "stage": "INGRESS", + "type": "CTRLPLANE", + "services": [ + "EXTERNAL_CLIENT" + ] + } + }, + "ACL_RULE": { + "EXTERNAL_CLIENT_ACL|DEFAULT_RULE": { + "ETHER_TYPE": "2048", + "PACKET_ACTION": "DROP", + "PRIORITY": "1" + }, + "EXTERNAL_CLIENT_ACL|RULE_1": { + "L4_DST_PORT_RANGE": "8081-8083", + "PACKET_ACTION": "ACCEPT", + "PRIORITY": "9998", + "SRC_IP": "2001::2/128" + }, + }, + "DEVICE_METADATA": { + "localhost": { + } + }, + "FEATURE": {}, + }, + "return": [ + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8081 -j ACCEPT", + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8082 -j ACCEPT", + "iptables -A INPUT -p tcp -s 2001::2/128 --dport 8083 -j ACCEPT", + "iptables -A INPUT -p tcp --dport 8081 -j DROP", + "iptables -A INPUT -p tcp --dport 8082 -j DROP", + "iptables -A INPUT -p tcp --dport 8083 -j DROP", + ], + } + ] +] diff --git a/src/sonic-host-services/tests/common/mock_configdb.py b/src/sonic-host-services/tests/common/mock_configdb.py index ce955ea86d0..9b618254f9b 100644 --- a/src/sonic-host-services/tests/common/mock_configdb.py +++ b/src/sonic-host-services/tests/common/mock_configdb.py @@ -42,7 +42,10 @@ def set_entry(self, key, field, data): MockConfigDb.CONFIG_DB[key][field] = data def get_table(self, table_name): - return MockConfigDb.CONFIG_DB[table_name] + data = {} + for k, v in MockConfigDb.CONFIG_DB[table_name].items(): + data[self.deserialize_key(k)] = v + return data class MockSelect(): From 141120549bed9ed121dedea49bc4095095c19464 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Mon, 5 Sep 2022 14:56:22 +0800 Subject: [PATCH 17/19] [actions] Remove approve step in label action. (#11968) Why I did it Approve step needs special permission settings. We already added permission setting to enable bypass merging PR. So, approve step is not necessary. --- .github/workflows/label.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index f336367cc52..f8ae8e7199a 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -20,15 +20,6 @@ jobs: label: runs-on: ubuntu-latest steps: - - name: approve - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: | - set -e - echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token - url=$(echo $GITHUB_CONTEXT | jq -r '.event.pull_request._links.html.href') - echo PR: $url - gh pr review $url --approve - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" From 143af80061a9c1facb02962cbad1e40fa9db78be Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 7 Sep 2022 00:40:48 +0800 Subject: [PATCH 18/19] [ci/build]: Upgrade SONiC package versions (#11976) --- .../versions/build/build-sonic-slave-buster/versions-py3 | 4 ++-- files/build/versions/dockers/docker-snmp/versions-py3 | 2 +- .../versions/dockers/docker-sonic-mgmt-framework/versions-py3 | 2 +- .../versions/dockers/docker-syncd-centec-rpc/versions-py2 | 3 --- files/build/versions/host-image/versions-py3 | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-py3 b/files/build/versions/build/build-sonic-slave-buster/versions-py3 index 31151b99f69..7e5141986cc 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-py3 +++ b/files/build/versions/build/build-sonic-slave-buster/versions-py3 @@ -8,10 +8,10 @@ jsonschema==2.6.0 natsort==6.2.1 netaddr==0.8.0 netifaces==0.11.0 -psutil==5.9.1 +psutil==5.9.2 pyroute2==0.5.14 python-arptable==0.0.2 tabulate==0.8.10 -websocket-client==1.4.0 +websocket-client==1.4.1 xmltodict==0.12.0 zipp==1.2.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-snmp/versions-py3 b/files/build/versions/dockers/docker-snmp/versions-py3 index ab2b43ab082..d1092513c88 100644 --- a/files/build/versions/dockers/docker-snmp/versions-py3 +++ b/files/build/versions/dockers/docker-snmp/versions-py3 @@ -1,4 +1,4 @@ hiredis==2.0.0 -psutil==5.9.1 +psutil==5.9.2 python-arptable==0.0.2 smbus==1.1.post2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 index da271761285..7d32d2f08aa 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -16,7 +16,7 @@ jsonschema==4.15.0 jsonschema-spec==0.1.1 lazy-object-proxy==1.7.1 openapi-schema-validator==0.3.3 -openapi-spec-validator==0.5.0 +openapi-spec-validator==0.5.1 pathable==0.4.3 pkgutil_resolve_name==1.3.10 protobuf==4.21.5 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 index 60b9f31f8e4..e16074ca518 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 @@ -1,5 +1,2 @@ -cffi==1.7.0 -nnpy==1.4.2 ptf==0.9.1 -pycparser==2.21 scapy==2.4.0 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 9359a4fb15f..afa7e2a9326 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -23,7 +23,7 @@ netaddr==0.8.0 netifaces==0.11.0 pathtools==0.1.2 pexpect==4.8.0 -psutil==5.9.1 +psutil==5.9.2 ptyprocess==0.7.0 pyang==2.5.3 pyangbind==0.8.1 @@ -40,5 +40,5 @@ tabulate==0.8.10 thrift==0.13.0 urllib3==1.26.12 watchdog==0.10.3 -websocket-client==1.4.0 +websocket-client==1.4.1 xmltodict==0.12.0 \ No newline at end of file From dfd1727c3d077828c5be8659676475fbb5f20795 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Tue, 6 Sep 2022 14:03:29 -0700 Subject: [PATCH 19/19] [sonic-utilities]: Submodule update: (#11957) Include following commits: ``` 839625d Replace cmp in acl_loader with operator.eq (#2328) af245ad [route_check]: Ignore standalone tunnel routes (#2332) c9aa65c Revert "[DHCPv6] [202012] Update the dhcpv6_relay config/show cli (#2271)" (#2336) 6b9cdc9 Made changes to only allow a valid IPv4 or Ipv6 string for dhcp cli (#2296) ``` --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index b034f0cbdd4..839625df982 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit b034f0cbdd400c3d854b29f554292f5e1124b7ad +Subproject commit 839625df982d164815a8c5fe77cbb6251c8a1442