From 85c36c5c6997e1b335e6303d7a6859b0043b5865 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Tue, 12 Jul 2022 17:57:16 +0800 Subject: [PATCH 001/106] [Build] Cleanup the version deb preference file after build (#11414) Why I did it Cleanup the version deb preference file after build. The version file is no use after build. How I did it Remove the no use version file. --- src/sonic-build-hooks/scripts/post_run_buildinfo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sonic-build-hooks/scripts/post_run_buildinfo b/src/sonic-build-hooks/scripts/post_run_buildinfo index e0d84d35bb08..97f47f7efcf1 100755 --- a/src/sonic-build-hooks/scripts/post_run_buildinfo +++ b/src/sonic-build-hooks/scripts/post_run_buildinfo @@ -11,3 +11,6 @@ rm -rf $BUILD_VERSION_PATH/* # Disable the build hooks symlink_build_hooks -d set_reproducible_mirrors -d + +# Remove the version deb preference +rm -f $VERSION_DEB_PREFERENCE From c60bf905903c8864a04a68239b6aff35d74c3ad6 Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Wed, 20 Jul 2022 14:00:17 +0800 Subject: [PATCH 002/106] [202012] [Mellanox] Update hw-mgmt package to V.7.0010.2349 (#11421) - Why I did it New changes in this new HW-MGMT package: 1. hw-mgmt: chassis events: Fix voltmon address conflict on connecting 2. hw-mgmt: topology: Add COMEX BRDWL respin support a. Removed A2D sensor from all COMEX BRDWL boards b. Add COMEX BRDWL boards with register defined (config3) - How I did it Advance the hw-mgmt repo pointer and update the hw-mgmt version number - How to verify it Run platform-related regression test cases on the new testbed. Signed-off-by: Kebo Liu --- platform/mellanox/hw-management.mk | 2 +- platform/mellanox/hw-management/hw-mgmt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/mellanox/hw-management.mk b/platform/mellanox/hw-management.mk index 61157329403b..5e9c2e3c2215 100644 --- a/platform/mellanox/hw-management.mk +++ b/platform/mellanox/hw-management.mk @@ -1,6 +1,6 @@ # Mellanox HW Management -MLNX_HW_MANAGEMENT_VERSION = 7.0010.2347 +MLNX_HW_MANAGEMENT_VERSION = 7.0010.2349 export MLNX_HW_MANAGEMENT_VERSION diff --git a/platform/mellanox/hw-management/hw-mgmt b/platform/mellanox/hw-management/hw-mgmt index 3a8787997d7b..67c3b6bd8617 160000 --- a/platform/mellanox/hw-management/hw-mgmt +++ b/platform/mellanox/hw-management/hw-mgmt @@ -1 +1 @@ -Subproject commit 3a8787997d7b0269c144861bfc9e7263c028f6bc +Subproject commit 67c3b6bd8617f4e0a282dab704a5f741088a3dd6 From e2042e2ad6ace887cb893599dbf460354e1eb2c3 Mon Sep 17 00:00:00 2001 From: VenkatCisco <77468614+VenkatCisco@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:31:50 -0700 Subject: [PATCH 003/106] update cisco-8000 platform version to v106 (#11504) --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index dd9bdcd725ef..ea19fd0e1ece 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.102 +ref=202012-v0.106 From ee43011748eea4fe418f193163ca1fbac3aab3e2 Mon Sep 17 00:00:00 2001 From: anamehra <54692434+anamehra@users.noreply.github.com> Date: Fri, 22 Jul 2022 02:01:57 -0700 Subject: [PATCH 004/106] Update cisco-8000 submodule to v0.106 (#11505) Signed-off-by: anamehra From 66d49231cf8220df644b59e7cc483ad51f0975d6 Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Sat, 23 Jul 2022 20:43:07 -0700 Subject: [PATCH 005/106] Update cisco-8000.ini (#11522) update cisco-8000 platform version to 202012-v0.107 --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index ea19fd0e1ece..39edd61f25e6 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.106 +ref=202012-v0.107 From db37325f76f576fe70b4c405aa71460e61fd0556 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Tue, 26 Jul 2022 21:01:36 +0300 Subject: [PATCH 006/106] [202012][Mellanox] Update SAI version to 1.22.0.0 and SDK/FW to version 4.5.2318/2010_2318 (#11534) - Why I did it Update SAI version - 1.22.0.0 Update SDK/FW version - 4.5.2318/2010_2318 SAI Changes: 1. Port FEC fix for multiple speeds 2. Next hop group optimized bulk API 3. Support BFD remote-disc exchange in negotiation stage 4. Reduce verbosity of shared database already exists print SDK/FW Fixes: 1. Cr space timeout on Hold and Release GW - at warmboot 2. SPC-1 Port in stuck PHY_UP after peer side rebooted 3. memory leak in sx_api_router_ecmp_update_set - How I did it Update pointer for the new SAI and SDK/FW - How to verify it Run regression tests --- platform/mellanox/fw.mk | 6 +++--- platform/mellanox/mlnx-sai.mk | 2 +- platform/mellanox/mlnx-sai/SAI-Implementation | 2 +- platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers | 2 +- platform/mellanox/sdk.mk | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 67a4876fef3e..7d252de8851b 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -11,17 +11,17 @@ else FW_FROM_URL = n endif -MLNX_SPC_FW_VERSION = 13.2010.2262 +MLNX_SPC_FW_VERSION = 13.2010.2318 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2010.2262 +MLNX_SPC2_FW_VERSION = 29.2010.2318 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2010.2262 +MLNX_SPC3_FW_VERSION = 30.2010.2318 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) diff --git a/platform/mellanox/mlnx-sai.mk b/platform/mellanox/mlnx-sai.mk index c37b8fcefacd..c8c87a61a723 100644 --- a/platform/mellanox/mlnx-sai.mk +++ b/platform/mellanox/mlnx-sai.mk @@ -1,6 +1,6 @@ # Mellanox SAI -MLNX_SAI_VERSION = SAIRel1.21.2.2 +MLNX_SAI_VERSION = SAIRel1.22.0.0 export MLNX_SAI_VERSION diff --git a/platform/mellanox/mlnx-sai/SAI-Implementation b/platform/mellanox/mlnx-sai/SAI-Implementation index 392c4fc3c5e3..9c4d6af340fc 160000 --- a/platform/mellanox/mlnx-sai/SAI-Implementation +++ b/platform/mellanox/mlnx-sai/SAI-Implementation @@ -1 +1 @@ -Subproject commit 392c4fc3c5e300611cecf42457b832f085088719 +Subproject commit 9c4d6af340fcacfc01f308b261484314cdfce6af diff --git a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers index e9fa9a843702..3e3db8705f81 160000 --- a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers +++ b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers @@ -1 +1 @@ -Subproject commit e9fa9a843702aa55b13c8eb01c7a1f188e4a16a9 +Subproject commit 3e3db8705f81dbeba8312fcc022969337fcc51ad diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index cedcffcd4dc3..a1603b870981 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,6 +1,6 @@ MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/ MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/ -MLNX_SDK_VERSION = 4.5.2262 +MLNX_SDK_VERSION = 4.5.2318 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION))) From 6c2f99a32766f0cb3f0fbfad24c50f8ee6290e7a Mon Sep 17 00:00:00 2001 From: tjchadaga <85581939+tjchadaga@users.noreply.github.com> Date: Tue, 12 Jul 2022 10:08:58 -0700 Subject: [PATCH 007/106] Add load_minigraph option to include traffic-shift-away during config migration (#11403) --- files/image_config/config-setup/config-setup | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index de39586fd4f8..d80627f5f01e 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -109,7 +109,15 @@ run_hookdir() { reload_minigraph() { echo "Reloading minigraph..." - config load_minigraph -y -n + if + [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] || + [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type | tr [:upper:] [:lower:])" == *"leafrouter"* ]]; + then + #Keep device isolated with traffic-shift-away option on LeafRouter and Dualtor + config load_minigraph -y -n -t + else + config load_minigraph -y -n + fi config save -y } From a2e05423567d7c3ae4d6e0a45cec3ad94e9d1055 Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Mon, 25 Jul 2022 14:43:06 -0700 Subject: [PATCH 008/106] [dhcpmon] Open different socket for dual tor to enable interface filtering (#11201) --- rules/dhcpmon.mk | 1 + src/dhcpmon/Makefile | 5 +- src/dhcpmon/objects.mk | 2 +- .../src/{dhcp_device.c => dhcp_device.cpp} | 150 ++++++++++++++---- src/dhcpmon/src/dhcp_device.h | 1 + .../src/{dhcp_devman.c => dhcp_devman.cpp} | 2 +- src/dhcpmon/src/{dhcp_mon.c => dhcp_mon.cpp} | 0 src/dhcpmon/src/{main.c => main.cpp} | 6 + src/dhcpmon/src/subdir.mk | 14 +- 9 files changed, 143 insertions(+), 38 deletions(-) rename src/dhcpmon/src/{dhcp_device.c => dhcp_device.cpp} (80%) rename src/dhcpmon/src/{dhcp_devman.c => dhcp_devman.cpp} (99%) rename src/dhcpmon/src/{dhcp_mon.c => dhcp_mon.cpp} (100%) rename src/dhcpmon/src/{main.c => main.cpp} (97%) diff --git a/rules/dhcpmon.mk b/rules/dhcpmon.mk index 3f8f5e139bce..8f9d6403a677 100644 --- a/rules/dhcpmon.mk +++ b/rules/dhcpmon.mk @@ -4,6 +4,7 @@ SONIC_DHCPMON_VERSION = 1.0.0-0 SONIC_DHCPMON_PKG_NAME = dhcpmon SONIC_DHCPMON = sonic-$(SONIC_DHCPMON_PKG_NAME)_$(SONIC_DHCPMON_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCPMON)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) $(SONIC_DHCPMON)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCPMON_PKG_NAME) SONIC_DPKG_DEBS += $(SONIC_DHCPMON) diff --git a/src/dhcpmon/Makefile b/src/dhcpmon/Makefile index 61cde376730b..4d21f57199f2 100644 --- a/src/dhcpmon/Makefile +++ b/src/dhcpmon/Makefile @@ -2,8 +2,9 @@ RM := rm -rf DHCPMON_TARGET := dhcpmon CP := cp MKDIR := mkdir -CC := gcc +CC := g++ MV := mv +PWD := $(shell pwd) # All of the sources participating in the build are defined here -include src/subdir.mk @@ -23,7 +24,7 @@ all: sonic-dhcpmon # Tool invocations sonic-dhcpmon: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' + @echo 'Invoking: G++ C Linker' $(CC) -o "$(DHCPMON_TARGET)" $(OBJS) $(USER_OBJS) $(LIBS) @echo 'Finished building target: $@' @echo ' ' diff --git a/src/dhcpmon/objects.mk b/src/dhcpmon/objects.mk index c9b774a53921..dc0d09e5021f 100644 --- a/src/dhcpmon/objects.mk +++ b/src/dhcpmon/objects.mk @@ -1,4 +1,4 @@ USER_OBJS := -LIBS := -levent -lexplain +LIBS := -levent -lexplain -lswsscommon -pthread -lboost_thread -lboost_system -lhiredis diff --git a/src/dhcpmon/src/dhcp_device.c b/src/dhcpmon/src/dhcp_device.cpp similarity index 80% rename from src/dhcpmon/src/dhcp_device.c rename to src/dhcpmon/src/dhcp_device.cpp index f45483f8504c..8ec91b057b64 100644 --- a/src/dhcpmon/src/dhcp_device.c +++ b/src/dhcpmon/src/dhcp_device.cpp @@ -21,6 +21,8 @@ #include #include #include +#include "subscriberstatetable.h" +#include "select.h" #include "dhcp_device.h" @@ -49,34 +51,42 @@ #define OP_JSET (BPF_JMP | BPF_JSET | BPF_K) /** bpf jset */ #define OP_LDXB (BPF_LDX | BPF_B | BPF_MSH) /** bpf ldxb */ +std::shared_ptr mStateDbPtr = std::make_shared ("STATE_DB", 0); +std::shared_ptr mStateDbMuxTablePtr = std::make_shared ( + mStateDbPtr.get(), "HW_MUX_CABLE_TABLE" + ); +swss::DBConnector configDb("CONFIG_DB", 0); + /** Berkeley Packet Filter program for "udp and (port 67 or port 68)". * This program is obtained using the following command tcpdump: - * `tcpdump -dd "udp and (port 67 or port 68)"` + * `tcpdump -dd "inbound and udp and (port 67 or port 68)"` */ static struct sock_filter dhcp_bpf_code[] = { - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (000) ldh [12] - {.code = OP_JEQ, .jt = 0, .jf = 7, .k = 0x000086dd}, // (001) jeq #0x86dd jt 2 jf 9 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (002) ldb [20] - {.code = OP_JEQ, .jt = 0, .jf = 18, .k = 0x00000011}, // (003) jeq #0x11 jt 4 jf 22 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (004) ldh [54] - {.code = OP_JEQ, .jt = 15, .jf = 0, .k = 0x00000043}, // (005) jeq #0x43 jt 21 jf 6 - {.code = OP_JEQ, .jt = 14, .jf = 0, .k = 0x00000044}, // (006) jeq #0x44 jt 21 jf 7 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (007) ldh [56] - {.code = OP_JEQ, .jt = 12, .jf = 11, .k = 0x00000043}, // (008) jeq #0x43 jt 21 jf 20 - {.code = OP_JEQ, .jt = 0, .jf = 12, .k = 0x00000800}, // (009) jeq #0x800 jt 10 jf 22 - {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (010) ldb [23] - {.code = OP_JEQ, .jt = 0, .jf = 10, .k = 0x00000011}, // (011) jeq #0x11 jt 12 jf 22 - {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (012) ldh [20] - {.code = OP_JSET, .jt = 8, .jf = 0, .k = 0x00001fff}, // (013) jset #0x1fff jt 22 jf 14 - {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (014) ldxb 4*([14]&0xf) - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (015) ldh [x + 14] - {.code = OP_JEQ, .jt = 4, .jf = 0, .k = 0x00000043}, // (016) jeq #0x43 jt 21 jf 17 - {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000044}, // (017) jeq #0x44 jt 21 jf 18 - {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (018) ldh [x + 16] - {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (019) jeq #0x43 jt 21 jf 20 - {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (020) jeq #0x44 jt 21 jf 22 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (021) ret #262144 - {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (022) ret #0 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0xfffff004}, // (000) ldh #fffff004 + {.code = OP_JEQ, .jt = 22, .jf = 0, .k = 0x00000004}, // (001) jeq #0x04 jt 22 jf 0 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x0000000c}, // (002) ldh [12] + {.code = OP_JEQ, .jt = 0, .jf = 7, .k = 0x000086dd}, // (003) jeq #0x86dd jt 2 jf 9 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000014}, // (004) ldb [20] + {.code = OP_JEQ, .jt = 0, .jf = 18, .k = 0x00000011}, // (005) jeq #0x11 jt 4 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000036}, // (006) ldh [54] + {.code = OP_JEQ, .jt = 15, .jf = 0, .k = 0x00000043}, // (007) jeq #0x43 jt 21 jf 6 + {.code = OP_JEQ, .jt = 14, .jf = 0, .k = 0x00000044}, // (008) jeq #0x44 jt 21 jf 7 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000038}, // (009) ldh [56] + {.code = OP_JEQ, .jt = 12, .jf = 11, .k = 0x00000043}, // (010) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 12, .k = 0x00000800}, // (011) jeq #0x800 jt 10 jf 22 + {.code = OP_LDB, .jt = 0, .jf = 0, .k = 0x00000017}, // (012) ldb [23] + {.code = OP_JEQ, .jt = 0, .jf = 10, .k = 0x00000011}, // (013) jeq #0x11 jt 12 jf 22 + {.code = OP_LDHA, .jt = 0, .jf = 0, .k = 0x00000014}, // (014) ldh [20] + {.code = OP_JSET, .jt = 8, .jf = 0, .k = 0x00001fff}, // (015) jset #0x1fff jt 22 jf 14 + {.code = OP_LDXB, .jt = 0, .jf = 0, .k = 0x0000000e}, // (016) ldxb 4*([14]&0xf) + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x0000000e}, // (017) ldh [x + 14] + {.code = OP_JEQ, .jt = 4, .jf = 0, .k = 0x00000043}, // (018) jeq #0x43 jt 21 jf 17 + {.code = OP_JEQ, .jt = 3, .jf = 0, .k = 0x00000044}, // (019) jeq #0x44 jt 21 jf 18 + {.code = OP_LDHI, .jt = 0, .jf = 0, .k = 0x00000010}, // (020) ldh [x + 16] + {.code = OP_JEQ, .jt = 1, .jf = 0, .k = 0x00000043}, // (021) jeq #0x43 jt 21 jf 20 + {.code = OP_JEQ, .jt = 0, .jf = 1, .k = 0x00000044}, // (022) jeq #0x44 jt 21 jf 22 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00040000}, // (023) ret #262144 + {.code = OP_RET, .jt = 0, .jf = 0, .k = 0x00000000}, // (024) ret #0 }; /** Filter program socket struct */ @@ -176,7 +186,7 @@ static void read_callback(int fd, short event, void *arg) uint8_t *dhcphdr = context->buffer + DHCP_START_OFFSET; int dhcp_option_offset = DHCP_START_OFFSET + DHCP_OPTIONS_HEADER_SIZE; - if ((buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && + if (((unsigned)buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && (ntohs(udp->len) > DHCP_OPTIONS_HEADER_SIZE)) { int dhcp_sz = ntohs(udp->len) < buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr) ? ntohs(udp->len) : buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr); @@ -221,6 +231,87 @@ static void read_callback(int fd, short event, void *arg) } } +/** + * @code read_callback_dual_tor(fd, event, arg); + * + * @brief callback for libevent which is called every time out in order to read queued packet capture when dual tor mode is enabled + * + * @param fd socket to read from + * @param event libevent triggered event + * @param arg user provided argument for callback (interface context) + * + * @return none + */ +static void read_callback_dual_tor(int fd, short event, void *arg) +{ + dhcp_device_context_t *context = (dhcp_device_context_t*) arg; + ssize_t buffer_sz; + struct sockaddr_ll sll; + socklen_t slen = sizeof sll; + + while ((event == EV_READ) && + ((buffer_sz = recvfrom(fd, context->buffer, context->snaplen, MSG_DONTWAIT, (struct sockaddr *)&sll, &slen)) > 0)) + { + std::string member_table = std::string("VLAN_MEMBER|") + context->intf + "|"; + char interfaceName[IF_NAMESIZE]; + char *interface = if_indextoname(sll.sll_ifindex, interfaceName); + std::string state; + std::string intf(interface); + mStateDbMuxTablePtr->hget(intf, "state", state); + if (state != "standby" && configDb.exists(member_table.append(interface))) { + struct ether_header *ethhdr = (struct ether_header*) context->buffer; + struct ip *iphdr = (struct ip*) (context->buffer + IP_START_OFFSET); + struct udphdr *udp = (struct udphdr*) (context->buffer + UDP_START_OFFSET); + uint8_t *dhcphdr = context->buffer + DHCP_START_OFFSET; + int dhcp_option_offset = DHCP_START_OFFSET + DHCP_OPTIONS_HEADER_SIZE; + + if (((unsigned)buffer_sz > UDP_START_OFFSET + sizeof(struct udphdr) + DHCP_OPTIONS_HEADER_SIZE) && + (ntohs(udp->len) > DHCP_OPTIONS_HEADER_SIZE)) + { + int dhcp_sz = ntohs(udp->len) < buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr) ? + ntohs(udp->len) : buffer_sz - UDP_START_OFFSET - sizeof(struct udphdr); + int dhcp_option_sz = dhcp_sz - DHCP_OPTIONS_HEADER_SIZE; + const u_char *dhcp_option = context->buffer + dhcp_option_offset; + dhcp_packet_direction_t dir = (ethhdr->ether_shost[0] == context->mac[0] && + ethhdr->ether_shost[1] == context->mac[1] && + ethhdr->ether_shost[2] == context->mac[2] && + ethhdr->ether_shost[3] == context->mac[3] && + ethhdr->ether_shost[4] == context->mac[4] && + ethhdr->ether_shost[5] == context->mac[5]) ? + DHCP_TX : DHCP_RX; + int offset = 0; + int stop_dhcp_processing = 0; + while ((offset < (dhcp_option_sz + 1)) && dhcp_option[offset] != 255) { + switch (dhcp_option[offset]) + { + case 53: + if (offset < (dhcp_option_sz + 2)) { + handle_dhcp_option_53(context, &dhcp_option[offset], dir, iphdr, dhcphdr); + } + stop_dhcp_processing = 1; // break while loop since we are only interested in Option 53 + break; + default: + break; + } + + if (stop_dhcp_processing == 1) { + break; + } + + if (dhcp_option[offset] == 0) { // DHCP Option Padding + offset++; + } else { + offset += dhcp_option[offset + 1] + 2; + } + } + } else { + syslog(LOG_WARNING, "read_callback(%s): read length (%ld) is too small to capture DHCP options", + context->intf, buffer_sz); + } + } + } +} + /** * @code dhcp_device_is_dhcp_inactive(counters); * @@ -412,7 +503,7 @@ static int init_socket(dhcp_device_context_t *context, const char *intf) struct sockaddr_ll addr; memset(&addr, 0, sizeof(addr)); - addr.sll_ifindex = if_nametoindex(intf); + addr.sll_ifindex = 0; // any interface addr.sll_family = AF_PACKET; addr.sll_protocol = htons(ETH_P_ALL); if (bind(context->sock, (struct sockaddr *) &addr, sizeof(addr))) { @@ -553,6 +644,7 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, in_addr_t giaddr_ip) { int rv = -1; + struct event *ev; do { if (context == NULL) { @@ -579,7 +671,11 @@ int dhcp_device_start_capture(dhcp_device_context_t *context, break; } - struct event *ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback, context); + if (dual_tor_sock) + ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback_dual_tor, context); + else + ev = event_new(base, context->sock, EV_READ | EV_PERSIST, read_callback, context); + if (ev == NULL) { syslog(LOG_ALERT, "event_new: failed to allocate memory for libevent event '%s'\n", strerror(errno)); break; diff --git a/src/dhcpmon/src/dhcp_device.h b/src/dhcpmon/src/dhcp_device.h index aa686f4e2718..a2b2a789fca6 100644 --- a/src/dhcpmon/src/dhcp_device.h +++ b/src/dhcpmon/src/dhcp_device.h @@ -16,6 +16,7 @@ #include #include +extern bool dual_tor_sock; /** * DHCP message types diff --git a/src/dhcpmon/src/dhcp_devman.c b/src/dhcpmon/src/dhcp_devman.cpp similarity index 99% rename from src/dhcpmon/src/dhcp_devman.c rename to src/dhcpmon/src/dhcp_devman.cpp index 65484798dbd6..b215f978a7c4 100644 --- a/src/dhcpmon/src/dhcp_devman.c +++ b/src/dhcpmon/src/dhcp_devman.cpp @@ -110,7 +110,7 @@ void dhcp_devman_shutdown() int dhcp_devman_add_intf(const char *name, char intf_type) { int rv = -1; - struct intf *dev = malloc(sizeof(struct intf)); + struct intf *dev = (struct intf*) malloc(sizeof(struct intf)); if (dev != NULL) { dev->name = name; diff --git a/src/dhcpmon/src/dhcp_mon.c b/src/dhcpmon/src/dhcp_mon.cpp similarity index 100% rename from src/dhcpmon/src/dhcp_mon.c rename to src/dhcpmon/src/dhcp_mon.cpp diff --git a/src/dhcpmon/src/main.c b/src/dhcpmon/src/main.cpp similarity index 97% rename from src/dhcpmon/src/main.c rename to src/dhcpmon/src/main.cpp index 29bc534accf0..aefaea2d01dd 100644 --- a/src/dhcpmon/src/main.c +++ b/src/dhcpmon/src/main.cpp @@ -16,9 +16,12 @@ #include #include #include +#include "subscriberstatetable.h" +#include "select.h" #include "dhcp_mon.h" #include "dhcp_devman.h" +#include "dhcp_device.h" /** dhcpmon_default_snaplen: default snap length of packet being captured */ static const size_t dhcpmon_default_snaplen = 65535; @@ -29,6 +32,8 @@ static const uint32_t dhcpmon_default_health_check_window = 18; * with DHCP relay */ static const uint32_t dhcpmon_default_unhealthy_max_count = 10; +bool dual_tor_sock = false; + /** * @code usage(prog); * @@ -134,6 +139,7 @@ int main(int argc, char **argv) i += 2; break; case 'u': + dual_tor_sock = true; if (dhcp_devman_setup_dual_tor_mode(argv[i + 1]) != 0) { usage(basename(argv[0])); } diff --git a/src/dhcpmon/src/subdir.mk b/src/dhcpmon/src/subdir.mk index 324977aa39f7..dd808aeb7202 100644 --- a/src/dhcpmon/src/subdir.mk +++ b/src/dhcpmon/src/subdir.mk @@ -1,11 +1,11 @@ # Add inputs and outputs from these tool invocations to the build variables -CC := gcc +CC := g++ C_SRCS += \ -../src/dhcp_device.c \ -../src/dhcp_devman.c \ -../src/dhcp_mon.c \ -../src/main.c +../src/dhcp_device.cpp \ +../src/dhcp_devman.cpp \ +../src/dhcp_mon.cpp \ +../src/main.cpp OBJS += \ ./src/dhcp_device.o \ @@ -21,9 +21,9 @@ C_DEPS += \ # Each subdirectory must supply rules for building sources it contributes -src/%.o: ../src/%.c +src/%.o: src/%.cpp @echo 'Building file: $<' @echo 'Invoking: GCC C Compiler' - $(CC) -O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + $(CC) -O3 -g3 -Wall -I$(PWD)/../sonic-swss-common/common -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" @echo 'Finished building: $<' @echo ' ' From c4927e0e68407fa29dd29abb32128099d85ac143 Mon Sep 17 00:00:00 2001 From: Taylor Cai <103631396+cel-taylor@users.noreply.github.com> Date: Wed, 27 Jul 2022 12:14:13 +0800 Subject: [PATCH 009/106] [device/celestica]:Fix failed test case of Seastone snmp (#11430) * Update psu.py * Update thermal.py --- .../celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py | 2 +- .../x86_64-cel_seastone-r0/sonic_platform/thermal.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py index da365dff59ab..7dd647be4e2c 100644 --- a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py +++ b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/psu.py @@ -408,7 +408,7 @@ def get_position_in_parent(self): Returns: integer: The 1-based relative physical position in parent device or -1 if cannot determine the position """ - return -1 + return self.index + 1 def is_replaceable(self): """ diff --git a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py index c605a28d220c..4b584a6db97f 100644 --- a/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py +++ b/device/celestica/x86_64-cel_seastone-r0/sonic_platform/thermal.py @@ -307,8 +307,6 @@ def get_position_in_parent(self): """ Retrieves the thermal position information Returns: - A int value, 0 represent ASIC thermal, 1 represent CPU thermal info + A int value, index of thermal """ - if self.postion == "cpu": - return 1 - return 0 + return self.index + 1 From 14f67b130da81f8545c67c85b5266970007fece4 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Thu, 28 Jul 2022 00:58:04 +0800 Subject: [PATCH 010/106] [ci] Fix some not sai package removed issue (#11544) Only replace the file name starts with "cisco-". --- .azure-pipelines/official-build-cisco-8000.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/official-build-cisco-8000.yml b/.azure-pipelines/official-build-cisco-8000.yml index 474d3e743ff7..7ec7430fc3ad 100644 --- a/.azure-pipelines/official-build-cisco-8000.yml +++ b/.azure-pipelines/official-build-cisco-8000.yml @@ -83,7 +83,7 @@ stages: fi cd $(dirname $filename) echo "PWD=$(pwd)" - ls -l *.deb + ls -l cisco-*.deb while read -r package; do # Cisco version format: -sai--- # The may contain several values in one build, the part is skipped when publishing to storage @@ -93,7 +93,7 @@ stages: package_url="$PACKAGE_URL/sai/ciscosai/master/$version/$package" echo "Override package $package from $package_url" wget "$package_url$StorageSASKey" -O "$package" - done < <(ls *.deb) + done < <(ls cisco-*.deb) env: StorageSASKey: $(StorageSASKey) condition: ne(variables['Build.Reason'], 'PullRequest') From a40aca43b98f7fe707c4a154a0010fe5518507a0 Mon Sep 17 00:00:00 2001 From: Lior Avramov <73036155+liorghub@users.noreply.github.com> Date: Thu, 28 Jul 2022 02:18:36 +0300 Subject: [PATCH 011/106] [memory_checker] Do not check memory usage of containers if docker daemon is not running (#11476) Fix in Monit memory_checker plugin. Skip fetching running containers if docker engine is down (can happen in deinit). This PR fixes issue #11472. Signed-off-by: liora liora@nvidia.com Why I did it In the case where Monit runs during deinit flow, memory_checker plugin is fetching the running containers without checking if Docker service is still running. I added this check. How I did it Use systemctl is-active to check if Docker engine is still running. How to verify it Use systemctl to stop docker engine and reload Monit, no errors in log and relevant print appears in log. Which release branch to backport (provide reason below if selected) The fix is required in 202205 and 202012 since the PR that introduced the issue was cherry picked to those branches (#11129). --- files/image_config/monit/memory_checker | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/files/image_config/monit/memory_checker b/files/image_config/monit/memory_checker index dfe270e79524..a93bc30b3fe4 100755 --- a/files/image_config/monit/memory_checker +++ b/files/image_config/monit/memory_checker @@ -96,6 +96,19 @@ def check_memory_usage(container_name, threshold_value): sys.exit(4) +def is_service_active(service_name): + """Test if service is running. + + Args: + service_name: A string contains the service name + + Returns: + True if service is running, False otherwise + """ + status = subprocess.run("systemctl is-active --quiet {}".format(service_name), shell=True, check=False) + return status.returncode == 0 + + def get_running_container_names(): """Retrieves names of running containers by talking to the docker daemon. @@ -128,6 +141,12 @@ def main(): parser.add_argument("threshold_value", type=int, help="threshold value in bytes") args = parser.parse_args() + if not is_service_active("docker"): + syslog.syslog(syslog.LOG_INFO, + "[memory_checker] Exits without checking memory usage of container '{}' since docker daemon is not running!" + .format(args.container_name)) + sys.exit(0) + running_container_names = get_running_container_names() if args.container_name in running_container_names: check_memory_usage(args.container_name, args.threshold_value) From de00b87161aa50e0496a682e4f16a5691fc38d37 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Thu, 28 Jul 2022 15:32:26 +0800 Subject: [PATCH 012/106] [ci] Transfer organization from Azure to sonic-net for sonic-mgmt (#11559) (#11563) Why I did it Transfer organization from Azure to sonic-net for sonic-mgmt --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a7971f148d49..8b8beb9031a4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,8 +27,8 @@ resources: repositories: - repository: sonic-mgmt type: github - name: Azure/sonic-mgmt - endpoint: build + name: sonic-net/sonic-mgmt + endpoint: sonic-net ref: refs/heads/202012 - repository: buildimage type: github From b1e0578177199951900c717ad21ad81db3554332 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Fri, 29 Jul 2022 02:08:10 +0300 Subject: [PATCH 013/106] [202012][submodule] Update sonic-platform-daemons submodule (#11500) Update sonic-platform-daemons submodule pointer to include the following: * [chassisd] Add script to initialize chassis info in STATE_DB ([#183](https://github.com/Azure/sonic-platform-daemons/pull/183)) Signed-off-by: dprital --- src/sonic-platform-daemons | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 6a315aee78bb..7bef6af28cfc 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 6a315aee78bbca9fd74abdae7b3c4cc53b98f14f +Subproject commit 7bef6af28cfc2da032941329e8e11856841aca46 From 193f1508bc0ba8078fa968103fd3b1929b2f1eda Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Fri, 29 Jul 2022 07:42:10 +0300 Subject: [PATCH 014/106] [202012][submodule] Update sonic-utilities submodule (#11515) Update sonic-utilities submodule pointer to include the following: * Fix test for pfcwd_sw_enable in db_migrator_test ([#2252](https://github.com/Azure/sonic-utilities/pull/2252)) * [DHCPv6] [202012] Update the dhcpv6_relay config/show cli ([#2271](https://github.com/Azure/sonic-utilities/pull/2271)) * [vnet_route_check] Align DB data parse logic with format used by swsscommon API ([#2268](https://github.com/Azure/sonic-utilities/pull/2268)) * [202012] [generate_dump] allow to extend dump with plugin scripts ([#2269](https://github.com/Azure/sonic-utilities/pull/2269)) Signed-off-by: dprital --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index ecca18ffb4fb..3f88fa4a7497 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit ecca18ffb4fbf7e9041984585d5e0c026c1e3422 +Subproject commit 3f88fa4a7497a7c9ac3cedf7caed3a3bf9880cfb From 3e41a4bd866fe7666b87625b676332e80e150691 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Fri, 29 Jul 2022 18:39:40 +0300 Subject: [PATCH 015/106] [202012][submodule] Update sonic-linux-kernel submodule (#11462) - Why I did it Update sonic-linux-kernel submodule pointer to include the following: add new kernel patch come with hw-mgmt 7.0010.2348 (#285) - How I did it Update sonic-linux-kernel submodule pointer Signed-off-by: dprital --- src/sonic-linux-kernel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-linux-kernel b/src/sonic-linux-kernel index bc4ae910d657..01e55081d875 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit bc4ae910d657602a5f954dd53d2eafb3be8ebb81 +Subproject commit 01e55081d87550db52f6abd7ee10074ca0f68147 From c40435c94c891265dc9d3ab5835f290063c4e13a Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Fri, 29 Jul 2022 23:41:44 +0800 Subject: [PATCH 016/106] [202012] [Mellanox] Add new sensor conf to support SN4410 A1 system (#8379) (#11530) - Why I did it New SN410 A1 system has a different sensor layout with A0 system, needs a new sensor conf file to support it. - How I did it Since the SN4410 A1 system use exactly the same sensor layout as the SN4700 A1 system, so add a symbol link linking to the SN4700 A1 sensor conf file to reuse. - How to verify it Run sensor test against the SN4410 A1 system; Run platform related regression test against the SN4410 A1 system --- device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path | 1 + device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 | 1 + 2 files changed, 2 insertions(+) create mode 120000 device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path create mode 120000 device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path new file mode 120000 index 000000000000..f1509a1e1d3d --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/get_sensors_conf_path @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/get_sensors_conf_path \ No newline at end of file diff --git a/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 new file mode 120000 index 000000000000..4605d556f315 --- /dev/null +++ b/device/mellanox/x86_64-mlnx_msn4410-r0/sensors.conf.a1 @@ -0,0 +1 @@ +../x86_64-mlnx_msn4700-r0/sensors.conf.a1 \ No newline at end of file From c5a57342427c73c1f705b9a57a37c35a70d158e2 Mon Sep 17 00:00:00 2001 From: Nikola Dancejic <26731235+Ndancejic@users.noreply.github.com> Date: Fri, 29 Jul 2022 09:37:09 -0700 Subject: [PATCH 017/106] [swss] Adding bgp container as dependent of swss (#11168) What I did: Added bgp as a dependent of swss Why I did it: bgp container was not restarting on swss crash. When swss crashes, linkmgrd doesn't initate a switchover because it cannot access the default route from orchagent. Bringing down bgp with swss will isolate the ToR, causing linkmgrd to initiate a switchover to the peer ToR avoiding significant packet loss. Signed-off-by: Nikola Dancejic --- files/scripts/swss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 48c0f7621566..d2e7fdbc297c 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -1,6 +1,6 @@ #!/bin/bash -DEPENDENT="radv dhcp_relay" +DEPENDENT="radv dhcp_relay bgp" MULTI_INST_DEPENDENT="teamd" function debug() From 84a8bad8213787b72cd2f4154724740af67ddf66 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Fri, 29 Jul 2022 11:09:12 -0700 Subject: [PATCH 018/106] [202012][prtest] use matching sonic-mgmt branch for 202012 branch PR tests (#11575) Why I did it 202012 PR test is failing due to some recent change in sonic-mgmt master branch. How I did it Use matching sonic-mgmt branch to run 202012 branch PR tests. How to verify it this PR test. Signed-off-by: Ying Xie ying.xie@microsoft.com --- .azure-pipelines/run-test-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/run-test-template.yml b/.azure-pipelines/run-test-template.yml index 8b41023824ed..3e6d975594b1 100644 --- a/.azure-pipelines/run-test-template.yml +++ b/.azure-pipelines/run-test-template.yml @@ -14,7 +14,7 @@ parameters: steps: - checkout: self clean: true - displayName: 'checkout sonic-mgmt repo' + displayName: 'checkout sonic-buildimage repo' - task: DownloadPipelineArtifact@2 inputs: @@ -31,7 +31,7 @@ steps: pushd /data/sonic-mgmt git remote update - git reset --hard origin/master + git reset --hard origin/202012 sed -i s/use_own_value/${username}/ ansible/veos_vtb echo aaa > ansible/password.txt docker exec sonic-mgmt bash -c "pushd /data/sonic-mgmt/ansible;./testbed-cli.sh -d /data/sonic-vm -m $(inventory) -t $(testbed_file) -k ceos refresh-dut ${{ parameters.tbname }} password.txt" && sleep 180 From 44ecff11546fab67ea0f3708256a708c44be27be Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Mon, 1 Aug 2022 09:27:49 +0800 Subject: [PATCH 019/106] Support queue 7 in dual ToR scenario (#11570) Signed-off-by: Stephen Sun --- .../buffers_defaults_objects.j2 | 12 +++ .../py3/buffers-mellanox4600c-t1-dynamic.json | 88 +++++++++---------- .../py3/buffers-mellanox4600c-t1.json | 88 +++++++++---------- 3 files changed, 100 insertions(+), 88 deletions(-) diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 index e8d4133ee669..7760bfc6189a 100644 --- a/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 +++ b/device/mellanox/x86_64-mlnx_msn2700-r0/Mellanox-SN2700-D48C8/buffers_defaults_objects.j2 @@ -143,7 +143,11 @@ {% endfor %} {% for port in port_names_active.split(',') %} {% if port not in port_names_extra_queues.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }{% if not loop.last %},{% endif %} @@ -187,7 +191,11 @@ }, {% endfor %} {% for port in port_names_inactive.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }{% if not loop.last %},{% endif %} @@ -204,7 +212,11 @@ }, {% endfor %} {% for port in port_names_inactive.split(',') %} +{% if port_names_extra_queues|length > 0 %} + "{{ port }}|5-7": { +{% else %} "{{ port }}|5-6": { +{% endif %} "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }{% if not loop.last %},{% endif %} diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json index 38b865b81a9a..21ab1aac0aeb 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1-dynamic.json @@ -997,28 +997,28 @@ "Ethernet84|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, "Ethernet136|0-1": { @@ -1538,112 +1538,112 @@ "Ethernet236|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" } } diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json index fd9d75f31313..adef78b44e2a 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffers-mellanox4600c-t1.json @@ -773,28 +773,28 @@ "Ethernet84|0-2": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "[BUFFER_PROFILE|q_lossy_profile]" }, "Ethernet136|0-1": { @@ -1314,112 +1314,112 @@ "Ethernet236|0-2": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "profile" : "[BUFFER_PROFILE|egress_lossy_zero_profile]" } } From 84aca008479fe678a6264324e57b1dbadda6bdc8 Mon Sep 17 00:00:00 2001 From: bingwang-ms <66248323+bingwang-ms@users.noreply.github.com> Date: Mon, 1 Aug 2022 23:59:45 +0800 Subject: [PATCH 020/106] [202012]Support different `DSCP_TO_TC_MAP` for T1 in dualtor deployment (#11580) Why I did it This PR is to backport #11569 into 202012 branch. This PR is to apply different DSCP_TO_TC_MAP to downlink and uplink ports on T1 in dualtor deployment. For T1 downlink ports (To T0) The DSCP_TO_TC_MAP is not changed. DSCP2 and DSCP6 are mapped to TC2 and TC6 respectively. For T1 uplink ports (To T1) A new DSCP_TO_TC_MAP|AZURE_UPLINK is defined and applied. DSCP2 and DSCP6 are mapped to TC1 to avoid mixing up lossy and lossless traffic from T2. The extra lossy PG2 and PG6 added in PR #11157 is reverted as well because no traffic from T2 is mapped to PG2 or PG6 now. How I did it Define a new map DSCP_TO_TC_MAP|AZURE_UPLINK for 7260 T1. How to verify it Verified by test case in test_j2files.py. --- .../Arista-7260CX3-C64/buffers_extra_pgs.j2 | 20 ----- .../Arista-7260CX3-Q64/buffers_extra_pgs.j2 | 1 - .../th2/7260/BALANCED/buffers_defaults_t1.j2 | 4 - .../profiles/th2/7260/BALANCED/qos.json.j2 | 67 +++++++++++++++ .../7260/RDMA-CENTRIC/buffers_defaults_t1.j2 | 5 +- .../th2/7260/RDMA-CENTRIC/qos.json.j2 | 66 +++++++++++++++ files/build_templates/buffers_config.j2 | 4 - .../py3/buffer-arista7260-t1.json | 48 ----------- .../sample_output/py3/qos-arista7260-t1.json | 82 +++++++++++++++++-- 9 files changed, 208 insertions(+), 89 deletions(-) delete mode 100644 device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 delete mode 120000 device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 deleted file mode 100644 index f827095cd954..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/buffers_extra_pgs.j2 +++ /dev/null @@ -1,20 +0,0 @@ -{% if DEVICE_METADATA is defined and 'type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter' %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pg) %} - "BUFFER_PG": { -{% for port in port_names.split(',') %} -{% if port not in port_names_require_no_extra_pg.split(',') %} - "{{ port }}|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "{{ port }}|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, -{% endif %} - "{{ port }}|0": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }{% if not loop.last %},{% endif %} - -{% endfor %} - }, -{% endmacro %} -{% endif %} diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 deleted file mode 120000 index 7dfb03cbc9d0..000000000000 --- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-Q64/buffers_extra_pgs.j2 +++ /dev/null @@ -1 +0,0 @@ -../Arista-7260CX3-C64/buffers_extra_pgs.j2 \ No newline at end of file diff --git a/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 b/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 index bc1ca774a98e..c2e4292dbd8a 100644 --- a/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 +++ b/device/common/profiles/th2/7260/BALANCED/buffers_defaults_t1.j2 @@ -51,11 +51,7 @@ {%- endmacro %} {% import 'buffers_extra_queues.j2' as defs1 with context %} -{% import 'buffers_extra_pgs.j2' as defs2 with context %} {%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} {{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }} {%- endmacro %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %} -{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }} -{%- endmacro %} diff --git a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 index d760038736a6..68daa8ee92f0 100644 --- a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 +++ b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 @@ -1,4 +1,5 @@ {% if ('type' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['type'] == 'LeafRouter') %} +{% set different_dscp_to_tc_map = true %} {%- macro generate_dscp_to_tc_map() %} "DSCP_TO_TC_MAP": { "AZURE": { @@ -66,6 +67,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, {%- endmacro %} diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 index bc1ca774a98e..0867c03b2497 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/buffers_defaults_t1.j2 @@ -51,11 +51,8 @@ {%- endmacro %} {% import 'buffers_extra_queues.j2' as defs1 with context %} -{% import 'buffers_extra_pgs.j2' as defs2 with context %} {%- macro generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) %} {{ defs1.generate_queue_buffers_with_extra_lossless_queues(port_names, port_names_require_extra_buffer) }} {%- endmacro %} -{%- macro generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) %} -{{ defs2.generate_pg_buffers_with_extra_lossy_pgs(port_names, port_names_require_no_extra_pgs) }} -{%- endmacro %} + diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 index d760038736a6..faf682d3c176 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 @@ -66,6 +66,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, {%- endmacro %} diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index 2089b0e01ed0..5e6f2a3ca4d1 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -171,10 +171,6 @@ def {{ defs.generate_pg_profiles_with_extra_lossless_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }}, {% elif defs.generate_pg_profiles_with_inactive_ports is defined %} {{ defs.generate_pg_profiles_with_inactive_ports(port_names_active, port_names_inactive) }}, -{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs is defined) and (port_names_extra_queues != '') %} -{{ defs.generate_pg_buffers_with_extra_lossy_pgs(port_names_active, port_names_extra_queues) }} -{% elif (defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports is defined) and (port_names_extra_queues != '') %} -{{ defs.generate_pg_buffers_with_extra_lossy_pgs_with_inactive_ports(port_names_active, port_names_extra_queues, port_names_inactive) }} {% elif defs.generate_pg_profils is defined %} {{ defs.generate_pg_profils(port_names_active) }} {% else %} diff --git a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json index 5ae6e6205a2d..ecaa1a88db48 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/buffer-arista7260-t1.json @@ -112,21 +112,9 @@ "Ethernet0|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet0|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet0|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet4|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet4|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet4|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet144|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -136,21 +124,9 @@ "Ethernet16|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet16|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet16|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet20|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet20|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet20|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet152|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -160,21 +136,9 @@ "Ethernet64|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet64|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet64|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet68|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet68|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet68|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet168|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, @@ -184,21 +148,9 @@ "Ethernet80|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet80|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet80|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet84|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, - "Ethernet84|2": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, - "Ethernet84|6": { - "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" - }, "Ethernet180|0": { "profile" : "[BUFFER_PROFILE|ingress_lossy_profile]" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json index 7196d22c2f2d..34f745f19624 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-t1.json @@ -89,6 +89,72 @@ "61": "1", "62": "1", "63": "1" + }, + "AZURE_UPLINK": { + "0" : "1", + "1" : "1", + "2" : "1", + "3" : "3", + "4" : "4", + "5" : "1", + "6" : "1", + "7" : "1", + "8" : "0", + "9" : "1", + "10": "1", + "11": "1", + "12": "1", + "13": "1", + "14": "1", + "15": "1", + "16": "1", + "17": "1", + "18": "1", + "19": "1", + "20": "1", + "21": "1", + "22": "1", + "23": "1", + "24": "1", + "25": "1", + "26": "1", + "27": "1", + "28": "1", + "29": "1", + "30": "1", + "31": "1", + "32": "1", + "33": "1", + "34": "1", + "35": "1", + "36": "1", + "37": "1", + "38": "1", + "39": "1", + "40": "1", + "41": "1", + "42": "1", + "43": "1", + "44": "1", + "45": "1", + "46": "5", + "47": "1", + "48": "7", + "49": "1", + "50": "1", + "51": "1", + "52": "1", + "53": "1", + "54": "1", + "55": "1", + "56": "1", + "57": "1", + "58": "1", + "59": "1", + "60": "1", + "61": "1", + "62": "1", + "63": "1" } }, "TC_TO_PRIORITY_GROUP_MAP": { @@ -118,7 +184,7 @@ "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]" }, "Ethernet0": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -126,7 +192,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -134,7 +200,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -142,7 +208,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -150,7 +216,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -158,7 +224,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -166,7 +232,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", @@ -174,7 +240,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { - "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE]", + "dscp_to_tc_map" : "[DSCP_TO_TC_MAP|AZURE_UPLINK]", "tc_to_queue_map" : "[TC_TO_QUEUE_MAP|AZURE]", "tc_to_pg_map" : "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", "pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", From 1e812cd990a995bf7325b701c96324ba345db9b3 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Tue, 2 Aug 2022 16:22:26 +0800 Subject: [PATCH 021/106] [ci] Update azp reference to support transfering organization from Azure to sonic-net (#11605) Why I did it When transfer repo to another organization, azp reference also need change. Change azp reference to avoid pipeline failure. --- .azure-pipelines/azure-pipelines-UpgrateVersion.yml | 4 ++-- .azure-pipelines/build-commonlib.yml | 4 ++-- .azure-pipelines/docker-sonic-slave-template.yml | 4 ++-- .azure-pipelines/official-build.yml | 4 ++-- azure-pipelines.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index b36cc3513aa6..70afd6d4c04c 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -18,9 +18,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net pool: sonicbld diff --git a/.azure-pipelines/build-commonlib.yml b/.azure-pipelines/build-commonlib.yml index df9bcb25ae70..a36adc625d71 100644 --- a/.azure-pipelines/build-commonlib.yml +++ b/.azure-pipelines/build-commonlib.yml @@ -11,9 +11,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net jobs: - template: .azure-pipelines/template-commonlib.yml@buildimage diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index a3d2d17dd00a..4481818c37d4 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -7,9 +7,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net parameters: - name: arch diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 6282a463ea6e..2e96d2899e71 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -16,9 +16,9 @@ resources: repositories: - repository: buildimage type: github - name: Azure/sonic-buildimage + name: sonic-net/sonic-buildimage ref: master - endpoint: build + endpoint: sonic-net trigger: none pr: none diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8b8beb9031a4..eef7f93a3db1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,8 +32,8 @@ resources: ref: refs/heads/202012 - repository: buildimage type: github - name: Azure/sonic-buildimage - endpoint: build + name: sonic-net/sonic-buildimage + endpoint: sonic-net ref: master variables: From 56ea6d9b62c423a8a72938722c940cf6e5dd1818 Mon Sep 17 00:00:00 2001 From: Vaibhav Hemant Dixit Date: Tue, 2 Aug 2022 13:49:51 -0700 Subject: [PATCH 022/106] [submodule advance] Advance sonic-utilities to include warmboot fix (#11558) To include latest warmboot fixes: [202012] [cherry-pick] Update db_migrator to support `PORT_QOS_MAP|gl (sonic-net/sonic-utilities/pull/2215) [202012] Migrate missed config on cross branch warm upgrade to 202012 (sonic-net/sonic-utilities#2277) [202012] Add db_migrator_constants.py script to setup.py (sonic-net/sonic-utilities#2287) --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 3f88fa4a7497..6da339c49bfb 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 3f88fa4a7497a7c9ac3cedf7caed3a3bf9880cfb +Subproject commit 6da339c49bfb52cb60891df61b3ed595dd81ef5f From 8bb38639e55fadcc67faf280f9c8a791d09acde6 Mon Sep 17 00:00:00 2001 From: Kevin Wang <65380078+kevinskwang@users.noreply.github.com> Date: Wed, 3 Aug 2022 13:22:38 +0800 Subject: [PATCH 023/106] [202012][sonic-sairedis]Update sonic-sairedis submodule (#11486) Remove duplicate cisco-8000 functions and call to those functions (#1077) Support For CISCO debug-shell in syncd-container (#1070) Fix submodule SAI branch name (#1031) Signed-off-by: Kevin Wang --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index bd4b1b5117a6..de5c23534d50 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit bd4b1b5117a67a22efbf103094b091e0bb8742df +Subproject commit de5c23534d50fcc21d8b89c90632efb8c4351f88 From 663bf00c226e349776551c0c4a24df32f9bf8883 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 5 Aug 2022 11:33:37 -0700 Subject: [PATCH 024/106] [swss]: Run tunnel_pkt_handler on dualtor only (#11626) At SWSS docker init time, check the device subtype and enable tunnel packet handler only if it is dualtor Signed-off-by: Lawrence Lee --- dockers/docker-orchagent/Dockerfile.j2 | 2 +- dockers/docker-orchagent/docker-init.sh | 5 +++++ dockers/docker-orchagent/supervisord.conf | 10 ---------- dockers/docker-orchagent/tunnel_packet_handler.conf | 9 +++++++++ 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 dockers/docker-orchagent/tunnel_packet_handler.conf diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2 index 5734d3fd18fb..88041718ea70 100755 --- a/dockers/docker-orchagent/Dockerfile.j2 +++ b/dockers/docker-orchagent/Dockerfile.j2 @@ -74,7 +74,7 @@ RUN apt-get purge -y \ COPY ["files/arp_update", "/usr/bin"] COPY ["arp_update.conf", "files/arp_update_vars.j2", "/usr/share/sonic/templates/"] -COPY ["ndppd.conf", "/usr/share/sonic/templates/"] +COPY ["ndppd.conf", "tunnel_packet_handler.conf", "/usr/share/sonic/templates/"] COPY ["enable_counters.py", "tunnel_packet_handler.py", "/usr/bin/"] COPY ["docker-init.sh", "orchagent.sh", "swssconfig.sh", "buffermgrd.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] diff --git a/dockers/docker-orchagent/docker-init.sh b/dockers/docker-orchagent/docker-init.sh index 5dc5f2df25c2..fb042e21cf1c 100755 --- a/dockers/docker-orchagent/docker-init.sh +++ b/dockers/docker-orchagent/docker-init.sh @@ -13,6 +13,7 @@ CFGGEN_PARAMS=" \ -t /usr/share/sonic/templates/wait_for_link.sh.j2,/usr/bin/wait_for_link.sh \ " VLAN=$(sonic-cfggen $CFGGEN_PARAMS) +SUBTYPE=$(sonic-cfggen -d -v "DEVICE_METADATA['localhost']['subtype']") chmod +x /usr/bin/wait_for_link.sh @@ -27,4 +28,8 @@ if [ "$VLAN" != "" ]; then cp /usr/share/sonic/templates/ndppd.conf /etc/supervisor/conf.d/ fi +if [ "$SUBTYPE" == "DualToR" ]; then + cp /usr/share/sonic/templates/tunnel_packet_handler.conf /etc/supervisor/conf.d/ +fi + exec /usr/local/bin/supervisord diff --git a/dockers/docker-orchagent/supervisord.conf b/dockers/docker-orchagent/supervisord.conf index d0264e7c5d5a..2c3d05999a9c 100644 --- a/dockers/docker-orchagent/supervisord.conf +++ b/dockers/docker-orchagent/supervisord.conf @@ -205,13 +205,3 @@ stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=swssconfig:exited - -[program:tunnel_packet_handler] -command=/usr/bin/tunnel_packet_handler.py -priority=12 -autostart=false -autorestart=unexpected -stdout_logfile=syslog -stderr_logfile=syslog -dependent_startup=true -dependent_startup_wait_for=swssconfig:exited diff --git a/dockers/docker-orchagent/tunnel_packet_handler.conf b/dockers/docker-orchagent/tunnel_packet_handler.conf new file mode 100644 index 000000000000..aa6f3d2f3380 --- /dev/null +++ b/dockers/docker-orchagent/tunnel_packet_handler.conf @@ -0,0 +1,9 @@ +[program:tunnel_packet_handler] +command=/usr/bin/tunnel_packet_handler.py +priority=12 +autostart=false +autorestart=unexpected +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=swssconfig:exited From 6d66d9b8fc638100245a94be96e2c8efe14922c9 Mon Sep 17 00:00:00 2001 From: tjchadaga <85581939+tjchadaga@users.noreply.github.com> Date: Sat, 6 Aug 2022 10:05:45 +0530 Subject: [PATCH 025/106] Revert "Add load_minigraph option to include traffic-shift-away during config migration (#11403)" (#11625) This reverts commit 6c2f99a32766f0cb3f0fbfad24c50f8ee6290e7a. --- files/image_config/config-setup/config-setup | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/files/image_config/config-setup/config-setup b/files/image_config/config-setup/config-setup index d80627f5f01e..de39586fd4f8 100755 --- a/files/image_config/config-setup/config-setup +++ b/files/image_config/config-setup/config-setup @@ -109,15 +109,7 @@ run_hookdir() { reload_minigraph() { echo "Reloading minigraph..." - if - [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] || - [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.type | tr [:upper:] [:lower:])" == *"leafrouter"* ]]; - then - #Keep device isolated with traffic-shift-away option on LeafRouter and Dualtor - config load_minigraph -y -n -t - else - config load_minigraph -y -n - fi + config load_minigraph -y -n config save -y } From 04ba6da1abb8d20a5ab6a8fbf04b91ad60116c91 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 5 Aug 2022 23:30:04 -0700 Subject: [PATCH 026/106] [202012][arp_update]: Resolve failed neighbors on dualtor (#11641) In arp_update, check for FAILED or INCOMPLETE kernel neighbor entries and manually ping them to try and resolve the neighbor Signed-off-by: Lawrence Lee --- files/scripts/arp_update | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/files/scripts/arp_update b/files/scripts/arp_update index e7f083e20d27..f8704c582b6b 100755 --- a/files/scripts/arp_update +++ b/files/scripts/arp_update @@ -26,6 +26,7 @@ while /bin/true; do done VLAN=$(echo $ARP_UPDATE_VARS | jq -r '.vlan') + SUBTYPE=$(sonic-db-cli CONFIG_DB hget 'DEVICE_METADATA|localhost' 'subtype' | tr '[:upper:]' '[:lower:]') for vlan in $VLAN; do # generate a list of arping commands: # arping -q -w 0 -c 1 -i ; @@ -47,7 +48,26 @@ while /bin/true; do ndisc6cmd="sed -e 's/^/ndisc6 -q -w 0 -1 /' -e 's/$/;/'" ip6cmd="ip -6 neigh show | grep -v fe80 | grep $vlan | cut -d ' ' -f 1,3 | $ndisc6cmd" eval `eval $ip6cmd` + + if [[ $SUBTYPE == "dualtor" ]]; then + # 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) + + # since ndisc6 is a userland process, the above ndisc6 commands are + # insufficient to update the kernel neighbor table for failed entries + + # we don't need to do this for ipv4 neighbors since arping is able to + # update the kernel neighbor table + + # generates the following command for each failed or incomplete IPv6 neighbor + # timeout 0.2 ping -n -q -i 0 -c 1 -W 1 -I >/dev/null + ping6_template="sed -e 's/^/timeout 0.2 ping /' -e 's/,/ -n -q -i 0 -c 1 -W 1 -I /' -e 's/$/ >\/dev\/null;/'" + failed_ip6_neigh_cmd="ip -6 neigh show | grep -v fe80 | grep $vlan | grep -E 'FAILED|INCOMPLETE' | cut -d ' ' -f 1,3 --output-delimiter=',' | $ping6_template" + eval `eval $failed_ip6_neigh_cmd` + fi done + # sleep here before handling the mismatch as it is not required during startup sleep 300 From 14f93e15c658452109f87f9ab33eabbc88c7c1d8 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 7 Aug 2022 11:27:16 +0800 Subject: [PATCH 027/106] [ci/build]: Upgrade SONiC package versions (#11629) Why I did it Upgrade SONiC Versions --- .../versions-deb-buster | 38 +++++++++---------- .../build-sonic-slave-buster/versions-git | 2 +- .../build-sonic-slave-buster/versions-web | 1 - files/build/versions/default/versions-docker | 12 +++--- files/build/versions/default/versions-git | 6 +-- files/build/versions/default/versions-web | 7 ++-- .../docker-config-engine-buster/versions-py3 | 2 +- .../versions-deb-buster | 18 ++++----- .../docker-platform-monitor/versions-py2 | 2 +- .../docker-platform-monitor/versions-py3 | 2 +- .../docker-sonic-mgmt-framework/versions-py3 | 15 ++++---- .../versions-py3-all-arm64 | 1 - .../versions-py3-all-armhf | 1 - .../docker-sonic-vs/versions-deb-buster | 1 - .../dockers/docker-sonic-vs/versions-py2 | 2 +- .../dockers/docker-sonic-vs/versions-py3 | 2 +- .../docker-syncd-invm/versions-deb-buster | 4 +- .../docker-syncd-mlnx/versions-deb-buster | 38 +++++++++---------- .../dockers/docker-syncd-mlnx/versions-py2 | 2 +- .../dockers/docker-syncd-mlnx/versions-py3 | 2 +- .../sonic-slave-buster/versions-deb-buster | 9 ++--- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-buster/versions-py3 | 4 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-py3 | 2 +- .../versions/host-image/versions-deb-buster | 6 +-- files/build/versions/host-image/versions-py3 | 4 +- 27 files changed, 91 insertions(+), 96 deletions(-) delete mode 100644 files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 delete mode 100644 files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster index d1ed4d09403a..cee663358b9e 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster @@ -1,9 +1,9 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2318 +applibs-dev==1.mlnx.4.5.2318 bfnplatform==1.0.0 -innovium-sai==0.107.5 -innovium-sai-headers==0.107.5 -iproute2-dev==1.mlnx.4.5.2262 +innovium-sai==0.107.6 +innovium-sai-headers==0.107.6 +iproute2-dev==1.mlnx.4.5.2318 isc-dhcp-relay==4.4.1-2 kernel-mft-dkms==4.18.0-106 libhiredis-dev==0.14.0-3~bpo9+1 @@ -55,20 +55,20 @@ sonic-mgmt-common==1.0.0 sonic-mgmt-common-codegen==1.0.0 sonic-mgmt-framework==1.0-01 swss==1.0.0 -sx-acl-helper==1.mlnx.4.5.2262 -sx-acl-helper-dev==1.mlnx.4.5.2262 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-examples==1.mlnx.4.5.2262 -sx-examples-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sx-scew==1.mlnx.4.5.2262 -sx-scew-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-acl-helper==1.mlnx.4.5.2318 +sx-acl-helper-dev==1.mlnx.4.5.2318 +sx-complib==1.mlnx.4.5.2318 +sx-complib-dev==1.mlnx.4.5.2318 +sx-examples==1.mlnx.4.5.2318 +sx-examples-dev==1.mlnx.4.5.2318 +sx-gen-utils==1.mlnx.4.5.2318 +sx-gen-utils-dev==1.mlnx.4.5.2318 +sx-scew==1.mlnx.4.5.2318 +sx-scew-dev==1.mlnx.4.5.2318 +sxd-libs==1.mlnx.4.5.2318 +sxd-libs-dev==1.mlnx.4.5.2318 syncd==1.0.0 syncd-vs==1.0.0 thrift-compiler==0.11.0-4 -wjh-libs==1.mlnx.4.5.2262 -wjh-libs-dev==1.mlnx.4.5.2262 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2318 +wjh-libs-dev==1.mlnx.4.5.2318 \ No newline at end of file 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 67d6f424e2b2..fe95b3f00311 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -1,4 +1,4 @@ -https://github.com/CESNET/libyang.git==87375f15159545a87a1e0de200f5d9d67e9091d7 +https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-web b/files/build/versions/build/build-sonic-slave-buster/versions-web index 3d6d31fad210..a862938939ca 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-web +++ b/files/build/versions/build/build-sonic-slave-buster/versions-web @@ -11,7 +11,6 @@ http://deb.debian.org/debian/pool/main/n/ntp/ntp_4.2.8p12+dfsg.orig.tar.xz==7104 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.debian.tar.xz==ef340aedc6fd42c549cd503bffb498b2 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.dsc==be4ce11ef67268e59e4b6be587327c40 http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0.orig.tar.gz==6d565680a4af0d2e261abbc3e3431b2b -https://chrome-infra-packages.appspot.com/client?platform=linux-amd64&version=git_revision:2fe24264d5b4585ecd16ba8e9bb582d8f4b20875==e1557fb4a093dec95a2251d01f0d4cd3 https://github.com/aristanetworks/sonic-firmware/raw/6d0d1661d92a342acedb6839dba970ae5778b478/phy/phy-credo_1.0_amd64.deb==dd74acbb7bf979b01c1a89e2a628aaf3 https://github.com/CumulusNetworks/ifupdown2/archive/1.2.8-1.tar.gz==12f45e90d23178e96cf70f68dc9455e6 https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.jar==219f1453ff22482d9e080effbfa7fa81 diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index 4b545d5d71d3..e22333a98bd9 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -1,10 +1,10 @@ -amd64:amd64/debian:buster==sha256:0e328f15f5cb0f93bff52a37d98f0bbfc40f97fcaf250096fd2b2c6871a497eb +amd64:amd64/debian:buster==sha256:7e1f93236be2e4a04a2b83e7fda8c0186e72e4c1e8cc830e097710ccc71d2dcf amd64:amd64/debian:stretch==sha256:16ee3e11da473f6565ef94a715f1a38b3079e0664913be78869c336a71cb6085 -amd64:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +amd64:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f amd64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -arm64:arm64v8/debian:buster==sha256:e774922f3043b6564c6719a7ec32f25d4b70304eff9dbd725161d4033cf38038 -arm64:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +arm64:arm64v8/debian:buster==sha256:d0f5ed350e7624e19f0f40c2c0cc31b0b2811f444ca929a083fefe449432333d +arm64:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -armhf:arm32v7/debian:buster==sha256:27ab779c4d59ead815ff584f2e41b34a6b261db358b4cdfe664b8bfa1f494ae8 -armhf:debian:buster==sha256:9740683722a2a8aa497a5b23e4bc229fcf8b8991e26d3935540c7704ff24012e +armhf:arm32v7/debian:buster==sha256:1f7bef58f2040ee2d97c1f40eb5ff29f8c2aa51eeaa90931ac11e7c6680103aa +armhf:debian:buster==sha256:fb9654aac57319592f1d51497c62001e7033eddf059355408a0b53f7c71f8d5f 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 dfc065b4da52..d2709c2917ea 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,11 +1,11 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==811ea056edb7a8d0d6defa6bbc9f2330c4dfabff https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f -https://github.com/CESNET/libyang.git==87375f15159545a87a1e0de200f5d9d67e9091d7 +https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 -https://github.com/lguohan/gnxi.git==53901aba9ead82be21f1408a601b6266dcf1e3e4 +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 diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index 6adf222a46ae..8b638e27a593 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -16,7 +16,6 @@ http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0-3~bpo9+1.dsc==b http://http.debian.net/debian/pool/main/h/hiredis/hiredis_0.14.0.orig.tar.gz==6d565680a4af0d2e261abbc3e3431b2b http://www.mellanox.com/downloads/MFT/mft-4.18.0-106-x86_64-deb.tgz==83d169e43bc9fea43fa0d69a4f8c1398 https://bootstrap.pypa.io/pip/2.7/get-pip.py==60e8267eb1b7bc71dc4843eb7bd294d3 -https://chrome-infra-packages.appspot.com/client?platform=linux-amd64&version=git_revision:2fe24264d5b4585ecd16ba8e9bb582d8f4b20875==e1557fb4a093dec95a2251d01f0d4cd3 https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2dea3117 https://deb.nodesource.com/node_10.x/dists/stretch/Release==22738118af583db3bfad39d6fcb4fa5a https://deb.nodesource.com/node_14.x/dists/buster/Release==2c6b9d29a3e20816e0ed35475d52e0d3 @@ -28,9 +27,9 @@ https://github.com/barefootnetworks/sonic-release-pkgs/raw/dev/bfnsdk_20220221_s https://github.com/CentecNetworks/sonic-binaries/raw/master/amd64/libsai_1.6.3-1_amd64.deb==e7a41e5cf06b44ae3ed615d553de40d3 https://github.com/CentecNetworks/sonic-binaries/raw/master/arm64/sai/libsai_1.6.3-1_arm64.deb==4121f09fbc5319cd488b832d72287f93 https://github.com/CumulusNetworks/ifupdown2/archive/1.2.8-1.tar.gz==12f45e90d23178e96cf70f68dc9455e6 -https://github.com/Innovium/SONiC/raw/master/debian/202012/ipd.deb==f8030a384c95a1eea95d314a7fbc4ec9 -https://github.com/Innovium/SONiC/raw/master/debian/202012/isai.deb==397eea9f6fdcbefcc902943c41fc1d45 -https://github.com/Innovium/SONiC/raw/master/debian/202012/saihdr.deb==694484b69aa8ba2f1497f82b4316f23e +https://github.com/Innovium/SONiC/raw/master/debian/202012/ipd.deb==00af177c2eb6384accac0608a6a6cb4f +https://github.com/Innovium/SONiC/raw/master/debian/202012/isai.deb==fa95a0d1ca74688da7db2527516a3e30 +https://github.com/Innovium/SONiC/raw/master/debian/202012/saihdr.deb==f23bb3119dd6d319e72446bf203eaddc https://github.com/Marvell-switching/sonic-marvell-binaries/raw/master/armhf/sai-plugin/mrvllibsai_1.7.1-9_armhf.deb==b21b91609632e813443ccb00bf2d7c61 https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz==6f56ef28c93cee644e8c4aaaef7cfb55 https://github.com/NephosInc/SONiC/raw/master/sai/libsainps-dev_3.0.0_sai_1.5.0_06a67d_amd64.deb==64931041f82533e2a05e003ed9d878c8 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 765d73fa6aaf..e71149dad247 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.9 +regex==2022.7.25 six==1.16.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index e57bb05b1c82..eee6e7112be4 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2318 +applibs-dev==1.mlnx.4.5.2318 binutils==2.31.1-16 binutils-common==2.31.1-16 binutils-x86-64-linux-gnu==2.31.1-16 @@ -108,7 +108,7 @@ python-dev==2.7.16-1 python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 -python-sdk-api==1.mlnx.4.5.2262 +python-sdk-api==1.mlnx.4.5.2318 python-smbus==4.1-1 python-swsscommon==1.0.0 python2==2.7.16-1 @@ -129,12 +129,12 @@ sensord-dbgsym==1:3.5.0-3 smartmontools==6.6-1 sshpass==1.06-1 strace==4.26-0.2 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-complib==1.mlnx.4.5.2318 +sx-complib-dev==1.mlnx.4.5.2318 +sx-gen-utils==1.mlnx.4.5.2318 +sx-gen-utils-dev==1.mlnx.4.5.2318 +sxd-libs==1.mlnx.4.5.2318 +sxd-libs-dev==1.mlnx.4.5.2318 ucf==3.0038+nmu1 udev==241-7~deb10u8 vim==2:8.1.0875-5+deb10u2 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py2 b/files/build/versions/dockers/docker-platform-monitor/versions-py2 index 01753180c581..46f00feb42ad 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py2 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py2 @@ -14,7 +14,7 @@ netaddr==0.8.0 pathlib2==2.3.7.post1 pyang==2.5.3 pyangbind==0.6.0 -python-sdk-api==4.5.2262 +python-sdk-api==4.5.2318 pyyaml==5.4.1 redis==3.5.3 redis-dump-load==1.1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions/dockers/docker-platform-monitor/versions-py3 index 1dae9b3c4445..95c54aad2eae 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py3 @@ -1,3 +1,3 @@ jsonschema==2.6.0 -python_sdk_api==4.5.2262 +python_sdk_api==4.5.2318 thrift==0.13.0 \ 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 8fe65d491263..af3ca22ed5c3 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -1,26 +1,27 @@ -attrs==21.4.0 +attrs==22.1.0 certifi==2017.4.17 charset-normalizer==2.1.0 click==8.1.3 clickclick==20.10.2 connexion==2.7.0 -flask==2.1.2 +flask==2.2.1 grpcio==1.47.0 grpcio-tools==1.20.0 idna==3.3 importlib-metadata==4.12.0 -importlib-resources==5.8.0 +importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 -jsonschema==4.7.2 +jsonschema==4.9.1 openapi-schema-validator==0.2.3 openapi-spec-validator==0.4.0 -protobuf==4.21.2 +pkgutil_resolve_name==1.3.10 +protobuf==4.21.4 pyrsistent==0.18.1 python-dateutil==2.6.0 requests==2.28.1 six==1.11.0 typing_extensions==4.3.0 urllib3==1.26.5 -werkzeug==2.1.2 -zipp==3.8.0 \ No newline at end of file +werkzeug==2.2.1 +zipp==3.8.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 deleted file mode 100644 index b14bd866f5b8..000000000000 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-arm64 +++ /dev/null @@ -1 +0,0 @@ -jsonschema==4.7.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf deleted file mode 100644 index b14bd866f5b8..000000000000 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3-all-armhf +++ /dev/null @@ -1 +0,0 @@ -jsonschema==4.7.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index 32ff5d4b0134..4d8a15f57215 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -28,7 +28,6 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 grub-common==2.02+dfsg1-20+deb10u4 grub2-common==2.02+dfsg1-20+deb10u4 ifupdown==0.8.35 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py2 b/files/build/versions/dockers/docker-sonic-vs/versions-py2 index 1db34fe35214..f6389557e01f 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.10 \ No newline at end of file +urllib3==1.26.11 \ 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 1519f87a3801..ee93e3c615cc 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -12,5 +12,5 @@ pyroute2==0.5.14 requests==2.28.1 scapy==2.4.4 tabulate==0.8.10 -urllib3==1.26.10 +urllib3==1.26.11 xmltodict==0.12.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster index b8d10d33db99..55f09c760631 100644 --- a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster @@ -1,7 +1,7 @@ gdb==8.2.1-2+b3 gdbserver==8.2.1-2+b3 -innovium-sai==0.107.5 -innovium-sai-headers==0.107.5 +innovium-sai==0.107.6 +innovium-sai-headers==0.107.6 libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index 968aad1fd450..03d0fa93cc1c 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -1,8 +1,8 @@ -applibs==1.mlnx.4.5.2262 -applibs-dev==1.mlnx.4.5.2262 +applibs==1.mlnx.4.5.2318 +applibs-dev==1.mlnx.4.5.2318 gdb==8.2.1-2+b3 gdbserver==8.2.1-2+b3 -iproute2-dev==1.mlnx.4.5.2262 +iproute2-dev==1.mlnx.4.5.2318 libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libc-dev-bin==2.28-10+deb10u1 @@ -33,7 +33,7 @@ libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 linux-libc-dev==4.19.249-2 mft==4.18.0-106 -mlnx-sai==1.mlnx.SAIRel1.21.2.2 +mlnx-sai==1.mlnx.SAIRel1.22.0.0 openssh-client==1:7.9p1-10+deb10u2 python==2.7.16-1 python-dev==2.7.16-1 @@ -41,7 +41,7 @@ python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 python-pkg-resources==40.8.0-1 -python-sdk-api==1.mlnx.4.5.2262 +python-sdk-api==1.mlnx.4.5.2318 python-setuptools==40.8.0-1 python2==2.7.16-1 python2-dev==2.7.16-1 @@ -51,21 +51,21 @@ python2.7-dev==2.7.16-2+deb10u1 python2.7-minimal==2.7.16-2+deb10u1 sshpass==1.06-1 strace==4.26-0.2 -sx-acl-helper==1.mlnx.4.5.2262 -sx-acl-helper-dev==1.mlnx.4.5.2262 -sx-complib==1.mlnx.4.5.2262 -sx-complib-dev==1.mlnx.4.5.2262 -sx-examples==1.mlnx.4.5.2262 -sx-examples-dev==1.mlnx.4.5.2262 -sx-gen-utils==1.mlnx.4.5.2262 -sx-gen-utils-dev==1.mlnx.4.5.2262 -sx-scew==1.mlnx.4.5.2262 -sx-scew-dev==1.mlnx.4.5.2262 -sxd-libs==1.mlnx.4.5.2262 -sxd-libs-dev==1.mlnx.4.5.2262 +sx-acl-helper==1.mlnx.4.5.2318 +sx-acl-helper-dev==1.mlnx.4.5.2318 +sx-complib==1.mlnx.4.5.2318 +sx-complib-dev==1.mlnx.4.5.2318 +sx-examples==1.mlnx.4.5.2318 +sx-examples-dev==1.mlnx.4.5.2318 +sx-gen-utils==1.mlnx.4.5.2318 +sx-gen-utils-dev==1.mlnx.4.5.2318 +sx-scew==1.mlnx.4.5.2318 +sx-scew-dev==1.mlnx.4.5.2318 +sxd-libs==1.mlnx.4.5.2318 +sxd-libs-dev==1.mlnx.4.5.2318 syncd==1.0.0 syncd-dbg==1.0.0 vim==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 -wjh-libs==1.mlnx.4.5.2262 -wjh-libs-dev==1.mlnx.4.5.2262 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2318 +wjh-libs-dev==1.mlnx.4.5.2318 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 index a979a56f0187..c93675e51015 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 @@ -1 +1 @@ -python-sdk-api==4.5.2262 \ No newline at end of file +python-sdk-api==4.5.2318 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 index 585326d2ef8c..73eea649d6a2 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 @@ -1 +1 @@ -python_sdk_api==4.5.2262 \ No newline at end of file +python_sdk_api==4.5.2318 \ 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 7b37a4a560db..3a2b92ca3f66 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -166,7 +166,6 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 graphviz==2.40.1-6+deb10u1 groff==1.22.4-3+deb10u1 groff-base==1.22.4-3+deb10u1 @@ -1359,10 +1358,10 @@ netpbm==2:10.0-15.3+b2 nettle-dev==3.4.1-1+deb10u1 nftables==0.9.0-2 ocl-icd-libopencl1==2.2.12-2 -openjdk-11-jdk==11.0.15+10-1~deb10u1 -openjdk-11-jdk-headless==11.0.15+10-1~deb10u1 -openjdk-11-jre==11.0.15+10-1~deb10u1 -openjdk-11-jre-headless==11.0.15+10-1~deb10u1 +openjdk-11-jdk==11.0.16+8-1~deb10u1 +openjdk-11-jdk-headless==11.0.16+8-1~deb10u1 +openjdk-11-jre==11.0.16+8-1~deb10u1 +openjdk-11-jre-headless==11.0.16+8-1~deb10u1 openmpi-bin==3.1.3-11 openmpi-common==3.1.3-11 opensp==1.5.2-13+b1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index d7cbfb3e3c61..6902af6272e9 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==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==eb8426e2ac6e8b03837a8d093863008fbec79860 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 3ff9fa9ec159..6bb93e7b15f4 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-py3 @@ -3,7 +3,7 @@ asn1crypto==0.24.0 atomicwrites==1.1.5 attrs==18.2.0 babel==2.6.0 -bitarray==2.5.1 +bitarray==2.6.0 certifi==2018.8.24 chardet==3.0.4 cov-core==1.15.0 @@ -58,7 +58,7 @@ pytz==2019.1 pyxdg==0.25 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.9 +regex==2022.7.25 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 d7cbfb3e3c61..6902af6272e9 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==d22bf607218d50bf20444b0610f62b265f829dbc +https://chromium.googlesource.com/chromium/tools/depot_tools.git==eb8426e2ac6e8b03837a8d093863008fbec79860 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-py3 b/files/build/versions/dockers/sonic-slave-stretch/versions-py3 index d16d157b6578..1599cc05ecaa 100644 --- a/files/build/versions/dockers/sonic-slave-stretch/versions-py3 +++ b/files/build/versions/dockers/sonic-slave-stretch/versions-py3 @@ -1,6 +1,6 @@ alabaster==0.7.8 babel==2.3.4 -bitarray==2.5.1 +bitarray==2.6.0 chardet==2.3.0 cryptography==1.7.1 devscripts==2.17.6+deb9u2 diff --git a/files/build/versions/host-image/versions-deb-buster b/files/build/versions/host-image/versions-deb-buster index 4300bcc6e050..b55a3f3e71e9 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -64,13 +64,13 @@ gzip==1.9-3+deb10u1 haveged==1.9.1-7 hdparm==9.58+ds-1 hping3==3.a2.ds2-7 -hw-management==1.mlnx.7.0010.2347 +hw-management==1.mlnx.7.0010.2349 i2c-tools==4.1-1 ifmetric==0.3-5 ifupdown2==1.2.8-1 initramfs-tools==0.133 initramfs-tools-core==0.133 -innovium-platform-driver==0.107.5 +innovium-platform-driver==0.107.6 ipmitool==1.8.18-6+deb10u1 iproute2==4.20.0-2+deb10u1 iptables==1.8.2-4 @@ -310,7 +310,7 @@ squashfs-tools==1:4.3-12+deb10u2 sudo==1.8.27-1+deb10u3 swig==3.0.12-2 swig3.0==3.0.12-2 -sx-kernel==1.mlnx.4.5.2262 +sx-kernel==1.mlnx.4.5.2318 sysfsutils==2.1.0+repack-5 systemd==247.3-6~bpo10+1 systemd-sonic-generator==1.0.0 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 475ce37ba040..41d78ade9df5 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -32,13 +32,13 @@ pyroute2==0.5.14 python-dateutil==2.8.2 pyyaml==5.4.1 redis==3.5.3 -regex==2022.7.9 +regex==2022.7.25 requests==2.28.1 scapy==2.4.4 six==1.16.0 tabulate==0.8.10 thrift==0.13.0 -urllib3==1.26.10 +urllib3==1.26.11 watchdog==0.10.3 websocket-client==1.3.3 xmltodict==0.12.0 \ No newline at end of file From 1c8c1a60109fcb63326b7ca1e62dd5c550e46110 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 8 Aug 2022 12:48:30 +0800 Subject: [PATCH 028/106] [202012] Fix CVE-2017-1000487 security alert (#11635) Why I did it Fix CVE-2017-1000487 alert in thrift 0.14.1. See https://nvd.nist.gov/vuln/detail/CVE-2017-1000487 How I did it Change the version of org.codehaus.plexus:plexus-utils from 3.0.14 to 3.0.16. --- src/thrift_0_13_0/Makefile | 1 + src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch | 1 + 2 files changed, 2 insertions(+) create mode 120000 src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch diff --git a/src/thrift_0_13_0/Makefile b/src/thrift_0_13_0/Makefile index 3bdb7c2a145c..38a7d939d045 100644 --- a/src/thrift_0_13_0/Makefile +++ b/src/thrift_0_13_0/Makefile @@ -26,6 +26,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% : patch -p1 < ../patch/0001-Remove-unneeded-packages.patch patch -p1 < ../patch/0002-Remove-minimist-packages.patch patch -p1 < ../patch/0003-Remove-underscore-packages.patch + patch -p1 < ../patch/0002-cve-2017-1000487.patch DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -d -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR) popd diff --git a/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch b/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch new file mode 120000 index 000000000000..ef6607064039 --- /dev/null +++ b/src/thrift_0_13_0/patch/0002-cve-2017-1000487.patch @@ -0,0 +1 @@ +../../thrift/patch/0002-cve-2017-1000487.patch \ No newline at end of file From cf12aa549afe5704f727993ccb57bc658297eab9 Mon Sep 17 00:00:00 2001 From: Ikki Zhu <79439153+qnos@users.noreply.github.com> Date: Thu, 28 Jul 2022 09:39:23 +0800 Subject: [PATCH 029/106] [hlx/sfp] fix hlx platform sfp+ tx disable issue (#11532) Why I did it: To fix hlx platform sfp+ module tx disable issue How I did it: Fix sfp+ tx disable function according SFF-8472 specification Co-authored-by: Eric Zhu --- .../x86_64-cel_e1031-r0/sonic_platform/sfp.py | 67 ++++++++++--------- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py index c0187819ec2c..0d1d02bf0159 100644 --- a/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py +++ b/device/celestica/x86_64-cel_e1031-r0/sonic_platform/sfp.py @@ -8,7 +8,7 @@ try: import time - from ctypes import create_string_buffer + from ctypes import c_char from sonic_platform_base.sfp_base import SfpBase from sonic_platform_base.sonic_sfp.sff8472 import sff8472InterfaceId from sonic_platform_base.sonic_sfp.sff8472 import sff8472Dom @@ -121,8 +121,8 @@ SFP_VOLT_WIDTH = 2 SFP_CHANNL_MON_OFFSET = 100 SFP_CHANNL_MON_WIDTH = 6 -SFP_CHANNL_STATUS_OFFSET = 110 -SFP_CHANNL_STATUS_WIDTH = 1 +SFP_STATUS_CONTROL_OFFSET = 110 +SFP_STATUS_CONTROL_WIDTH = 1 SFP_TX_DISABLE_HARD_BIT = 7 SFP_TX_DISABLE_SOFT_BIT = 6 @@ -869,7 +869,7 @@ def get_rx_los(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: rx_los_data = int(dom_channel_monitor_raw[0], 16) rx_los_list.append(rx_los_data & 0x02 != 0) @@ -901,7 +901,7 @@ def get_tx_fault(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: tx_fault_data = int(dom_channel_monitor_raw[0], 16) tx_fault_list.append(tx_fault_data & 0x04 != 0) @@ -936,7 +936,7 @@ def get_tx_disable(self): elif self.sfp_type == SFP_TYPE: offset = 256 dom_channel_monitor_raw = self._read_eeprom_specific_bytes( - (offset + SFP_CHANNL_STATUS_OFFSET), SFP_CHANNL_STATUS_WIDTH) + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) if dom_channel_monitor_raw is not None: tx_disable_data = int(dom_channel_monitor_raw[0], 16) tx_disable_list.append(tx_disable_data & 0xC0 != 0) @@ -1170,31 +1170,36 @@ def tx_disable(self, tx_disable): Returns: A boolean, True if tx_disable is set successfully, False if not """ - sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] - status_control_raw = self._read_eeprom_specific_bytes( - SFP_CHANNL_STATUS_OFFSET, SFP_CHANNL_STATUS_WIDTH) - if status_control_raw is not None: - # Set bit 6 for Soft TX Disable Select - # 01000000 = 64 and 10111111 = 191 - tx_disable_bit = 64 if tx_disable else 191 - status_control = int(status_control_raw[0], 16) - tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else ( - status_control & tx_disable_bit) - try: - sysfsfile_eeprom = open( - sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0) - buffer = create_string_buffer(1) - buffer[0] = chr(tx_disable_ctl) - # Write to eeprom - sysfsfile_eeprom.seek(SFP_CHANNL_STATUS_OFFSET) - sysfsfile_eeprom.write(buffer[0]) - except Exception: - return False - finally: - if sysfsfile_eeprom: - sysfsfile_eeprom.close() - time.sleep(0.01) - return True + if not self.get_presence(): + return False + + if self.dom_tx_disable_supported: + # SFP status/control register at address A2h, byte 110 + offset = 256 + sysfs_sfp_i2c_client_eeprom_path = self.port_to_eeprom_mapping[self.port_num] + status_control_raw = self._read_eeprom_specific_bytes( + (offset + SFP_STATUS_CONTROL_OFFSET), SFP_STATUS_CONTROL_WIDTH) + if status_control_raw is not None: + # Set bit 6 for Soft TX Disable Select + # 01000000 = 64 and 10111111 = 191 + tx_disable_bit = 64 if tx_disable else 191 + status_control = int(status_control_raw[0], 16) + tx_disable_ctl = (status_control | tx_disable_bit) if tx_disable else ( + status_control & tx_disable_bit) + try: + sysfsfile_eeprom = open( + sysfs_sfp_i2c_client_eeprom_path, mode="r+b", buffering=0) + tx_disable_data = c_char(tx_disable_ctl) + # Write to eeprom + sysfsfile_eeprom.seek(offset + SFP_STATUS_CONTROL_OFFSET) + sysfsfile_eeprom.write(tx_disable_data) + except Exception: + return False + finally: + if sysfsfile_eeprom: + sysfsfile_eeprom.close() + time.sleep(0.01) + return True return False def tx_disable_channel(self, channel, disable): From ffd9e190e1be59a35ed3566fc30ce0e6e9c632a5 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Thu, 28 Jul 2022 09:08:53 -0700 Subject: [PATCH 030/106] Update WARM START FINALIZER to wait for linkmgrd to reconcile (#11477) Spanning from sonic-net/sonic-linkmgrd#76, this PR is to update warm restart finalizer to wait for linkmgrd to be reconciled. sign-off: Jing Zhang zhangjing@microsoft.com Why I did it To make sure finalizer save config after linkmgrd's reconciliation. How I did it Add linkmgrd to the reconciliation wait list of warmboot finalizer. How to verify it Verified on lab device, linkmgrd reconciled as expected. --- files/image_config/warmboot-finalizer/finalize-warmboot.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/files/image_config/warmboot-finalizer/finalize-warmboot.sh b/files/image_config/warmboot-finalizer/finalize-warmboot.sh index 172fd95ab2e9..54f9bfc2aa24 100755 --- a/files/image_config/warmboot-finalizer/finalize-warmboot.sh +++ b/files/image_config/warmboot-finalizer/finalize-warmboot.sh @@ -10,6 +10,7 @@ declare -A RECONCILE_COMPONENTS=( \ ["swss"]="orchagent neighsyncd" \ ["bgp"]="bgp" \ ["nat"]="natsyncd" \ + ["mux"]="linkmgrd" \ ) EXP_STATE="reconciled" From 9b952945ca8fa56b817156bf53a9abb20f1aa31d Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Wed, 10 Aug 2022 11:53:58 +0800 Subject: [PATCH 031/106] [actions] Fix automerge actions don't work issue. (#11671) --- .github/workflows/automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 502f5d8987d9..ee27244bfb1f 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -15,7 +15,7 @@ jobs: - name: automerge uses: 'pascalgn/automerge-action@v0.13.1' env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_TOKEN: '${{ secrets.TOKEN }}' MERGE_LABELS: 'automerge' MERGE_METHOD: 'squash' MERGE_FILTER_AUTHOR: 'mssonicbld' From 5b5bd5e818eeb21afe0f745393bc4daecae69b82 Mon Sep 17 00:00:00 2001 From: zitingguo-ms Date: Thu, 11 Aug 2022 06:02:47 +0800 Subject: [PATCH 032/106] [202012 BRCM SAI 4.3.7.0] Pick up fixes and make up BRCM SAI version to 4.3.7.0 (#11681) Pick upfollowing fixes and update BRCM SAI to 4.3.7.0: CS00012208537: Add back previous commit 54c5bc4848eb748 CS00012253061,SONIC-63280: WB from 3.5 to 4.3, followed by WB to 4.3 CS00012207978: SDK-296517, time spent for SAI operations CS00012245601,SONIC-62898: Egress ACL Counted ad Interface TX drops Update pcbb with Fixes for CS00012243699 Upgrade on pcbb with Fixes for KB0025353, CS00012221689, CS00012221688, KB0025391, CS00012230519 commit of "CS00012221688:PFC frames egressing, PFC storm happens simultaneously on 2 ports" is purposely skipped to be picked up later due to SWSS dependency not ready. Why I did it How I did it How to verify it Tested build target, successful Manually run these tests after installing sai binary within image 20201231.73 on 7050CX3 (TD3) T0 DUT, all passed. vxlan/test_vxlan_decap.py fdb/test_fdb.py pfcwd/test_pfcwd_all_port_storm.py acl/null_route/test_null_route_helper.py acl/test_acl.py vlan/test_vlan.py platform_tests/test_reboot.py Signed-off-by: zitingguo-ms --- files/build/versions/default/versions-web | 2 ++ platform/broadcom/sai.mk | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index 8b638e27a593..ad8106d47eda 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -50,6 +50,8 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912 https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk index 5efc4d739ee1..dc4d9aa0d839 100644 --- a/platform/broadcom/sai.mk +++ b/platform/broadcom/sai.mk @@ -1,8 +1,8 @@ -BRCM_SAI = libsaibcm_4.3.5.3-5_amd64.deb -$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D" -BRCM_SAI_DEV = libsaibcm-dev_4.3.5.3-5_amd64.deb +BRCM_SAI = libsaibcm_4.3.7.0_amd64.deb +$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D" +BRCM_SAI_DEV = libsaibcm-dev_4.3.7.0_amd64.deb $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) -$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D" +$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D" SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) From feab02df59818566117b3d205f2b76c25c35bae5 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Thu, 11 Aug 2022 09:55:15 -0700 Subject: [PATCH 033/106] [202012][sonic-utilities][sonic-platform-daemons] submodule update (#11684) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The follwing commit is added in sonic-utilities b034f0c (HEAD -> 202012, origin/202012) [config][muxcable] add support to enable/disable ycable telemetry (#2… (#2304) The follwing commit is added in sonic-platform-daemons 978667c (HEAD -> 202012, origin/202012) [ycabled] add capability to enable/disable telemetry (#279) (#280 Signed-off-by: vaibhav-dahiya Signed-off-by: vaibhav-dahiya --- src/sonic-platform-daemons | 2 +- src/sonic-utilities | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 7bef6af28cfc..978667c03b43 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 7bef6af28cfc2da032941329e8e11856841aca46 +Subproject commit 978667c03b438b592fa3073398c92c595a337dc3 diff --git a/src/sonic-utilities b/src/sonic-utilities index 6da339c49bfb..b034f0cbdd40 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 6da339c49bfb52cb60891df61b3ed595dd81ef5f +Subproject commit b034f0cbdd400c3d854b29f554292f5e1124b7ad From ff4f1605707672cdc1eb1b49de278005237177c9 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Thu, 11 Aug 2022 10:37:34 -0700 Subject: [PATCH 034/106] [202012][sonic-linkmgrd] Submodule Update (#11514) [202012][sonic-linkmgrd] Submodule Update d3f5de1 Jing Zhang Tue Aug 9 10:14:48 2022 -0700 Fix build failure introduced by commit 847c1e8 (#105) 847c1e8 Jing Zhang Mon Aug 8 10:36:18 2022 -0700 [Active-Standby]Remove unnecessary handleMuxWaitTimeout logs (#100) 1fdf0e6 Jing Zhang Thu Jul 21 10:33:45 2022 -0700 Add support for reconciliation after warm restart (#76) (#97) sign-off: Jing Zhang zhangjing@microsoft.com --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index a2367d082832..d3f5de1ce41c 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit a2367d0828322e093525b9f028fd6d3b0ab0dbbf +Subproject commit d3f5de1ce41cee9526170b76fdc2788bc696fb6e From cd480810d73d2c4fc3f3b4a3071442a6c4b35cd5 Mon Sep 17 00:00:00 2001 From: Sumukha Tumkur Vani Date: Wed, 10 Aug 2022 13:00:54 -0700 Subject: [PATCH 035/106] [RESTAPI] Update submodule (#11674) --- src/sonic-restapi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-restapi b/src/sonic-restapi index 55683f2abb8e..bcc6f704a544 160000 --- a/src/sonic-restapi +++ b/src/sonic-restapi @@ -1 +1 @@ -Subproject commit 55683f2abb8e7be0e80b0e81128314c90006303c +Subproject commit bcc6f704a54454f326f069501b01759dbb732bb3 From 8ab448a852004bcdf08041488ebd4a59bf7b146a Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Thu, 11 Aug 2022 06:57:07 +0300 Subject: [PATCH 036/106] [swss.sh/syncd.sh] Trap only on EXIT (#11590) When using trap on SIGTERM the script will not react to the SIGTERM signal sent while a child is executing. I.e, the following script does not react on SIGTERM sent to it if it is waiting for sleep to finish: ``` trap "echo Handled SIGTERM" 0 2 3 15 echo "Before sleep" sleep inf echo "After sleep" ``` Instead, trap only on EXIT which covers also a scenario with exit on SIGINT, SIGTERM. Signed-off-by: Stepan Blyschak --- files/scripts/swss.sh | 2 +- files/scripts/syncd_common.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index d2e7fdbc297c..32d7e3ba4d67 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -15,7 +15,7 @@ function lock_service_state_change() exec {LOCKFD}>${LOCKFILE} /usr/bin/flock -x ${LOCKFD} - trap "/usr/bin/flock -u ${LOCKFD}" 0 2 3 15 + trap "/usr/bin/flock -u ${LOCKFD}" EXIT debug "Locked ${LOCKFILE} (${LOCKFD}) from ${SERVICE}$DEV service" } diff --git a/files/scripts/syncd_common.sh b/files/scripts/syncd_common.sh index 5d75ae841e42..a1566d4e58bc 100755 --- a/files/scripts/syncd_common.sh +++ b/files/scripts/syncd_common.sh @@ -3,11 +3,11 @@ # # common functions used by "syncd" scipts (syncd.sh, gbsyncd.sh, etc..) # scripts using this must provide implementations of the following functions: -# +# # startplatform # waitplatform # stopplatform1 and stopplatform2 -# +# # For examples of these, see gbsyncd.sh and syncd.sh. # @@ -23,7 +23,7 @@ function lock_service_state_change() exec {LOCKFD}>${LOCKFILE} /usr/bin/flock -x ${LOCKFD} - trap "/usr/bin/flock -u ${LOCKFD}" 0 2 3 15 + trap "/usr/bin/flock -u ${LOCKFD}" EXIT debug "Locked ${LOCKFILE} (${LOCKFD}) from ${SERVICE}$DEV service" } From 00d512577e2312aaa46aa831ec6e7983a0efdb2b Mon Sep 17 00:00:00 2001 From: StormLiangMS <89824293+StormLiangMS@users.noreply.github.com> Date: Thu, 11 Aug 2022 13:22:14 +0800 Subject: [PATCH 037/106] [bgp-cfgd] BGP allow list enhancement (#11586) Why I did it 2 things are missing in current allow-prefix list implementation. In some usecase, need to tell the BGP neighbor and have different allow-prefix list for different neighbors, which is not supported. for the prefix list, can't support flexible le and ge. How I did it To enhance the bgp allow-prefix list feature to have: To include the neighbor type info for the allow-prefix list. To support flexible le and ge length for allow-prefix list. How to verify it 4 new unit test cases are added in this PR to cover changes. --- .../bgpcfgd/managers_allow_list.py | 112 ++++++++++----- src/sonic-bgpcfgd/tests/test_allow_list.py | 129 +++++++++++++++++- 2 files changed, 203 insertions(+), 38 deletions(-) diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py index 209d12fd2f97..4bdd488fc2eb 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_allow_list.py @@ -14,8 +14,11 @@ class BGPAllowListMgr(Manager): ALLOW_ADDRESS_PL_NAME_TMPL = "ALLOW_ADDRESS_%d_%s" # template for a name for the ALLOW_ADDRESS prefix-list ??? EMPTY_COMMUNITY = "empty" PL_NAME_TMPL = "PL_ALLOW_LIST_DEPLOYMENT_ID_%d_COMMUNITY_%s_V%s" + PL_NAME_TMPL_WITH_NEIGH = "PL_ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_COMMUNITY_%s_V%s" COMMUNITY_NAME_TMPL = "COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_%d_COMMUNITY_%s" + COMMUNITY_NAME_TMPL_WITH_NEIGH = "COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_COMMUNITY_%s" RM_NAME_TMPL = "ALLOW_LIST_DEPLOYMENT_ID_%d_V%s" + RM_NAME_TMPL_WITH_NEIGH = "ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_V%s" ROUTE_MAP_ENTRY_WITH_COMMUNITY_START = 10 ROUTE_MAP_ENTRY_WITH_COMMUNITY_END = 29990 ROUTE_MAP_ENTRY_WITHOUT_COMMUNITY_START = 30000 @@ -38,7 +41,7 @@ def __init__(self, common_objs, db, table): db, table, ) - self.key_re = re.compile(r"^DEPLOYMENT_ID\|\d+\|\S+$|^DEPLOYMENT_ID\|\d+$") + self.key_re = re.compile(r"^DEPLOYMENT_ID\|\d+\|\S+$|^DEPLOYMENT_ID\|\d+$|^DEPLOYMENT_ID\|\d+\|\S+\|NEIGHBOR_TYPE\|\S+$|^DEPLOYMENT_ID\|\d+\|NEIGHBOR_TYPE\|\S+") self.enabled = self.__get_enabled() self.prefix_match_tag = self.__get_routemap_tag() self.__load_constant_lists() @@ -55,8 +58,14 @@ def set_handler(self, key, data): return True if not self.__set_handler_validate(key, data): return True - key = key.replace("DEPLOYMENT_ID|", "") - deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + if 'NEIGHBOR_TYPE' in key: + keys = key.split('|NEIGHBOR_TYPE|', 1) + deployment_id = keys[0].replace("DEPLOYMENT_ID|", "") + neighbor_type, community_value = keys[1].split('|', 1) if '|' in keys[1] else (keys[1], BGPAllowListMgr.EMPTY_COMMUNITY) + else: + key = key.replace("DEPLOYMENT_ID|", "") + deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + neighbor_type = '' deployment_id = int(deployment_id) prefixes_v4 = [] prefixes_v6 = [] @@ -65,7 +74,7 @@ def set_handler(self, key, data): if "prefixes_v6" in data: prefixes_v6 = str(data['prefixes_v6']).split(",") default_action_community = self.__get_default_action_community(data) - self.__update_policy(deployment_id, community_value, prefixes_v4, prefixes_v6, default_action_community) + self.__update_policy(deployment_id, community_value, prefixes_v4, prefixes_v6, default_action_community, neighbor_type) return True def __set_handler_validate(self, key, data): @@ -85,13 +94,13 @@ def __set_handler_validate(self, key, data): prefixes_v6 = [] if "prefixes_v4" in data: prefixes_v4 = str(data["prefixes_v4"]).split(",") - if not all(TemplateFabric.is_ipv4(prefix) for prefix in prefixes_v4): + if not all(TemplateFabric.is_ipv4(re.split('ge|le', prefix)[0]) for prefix in prefixes_v4): arguments = "prefixes_v4", str(data["prefixes_v4"]) log_err("BGPAllowListMgr::Received BGP ALLOWED 'SET' message with invalid input[%s]:'%s'" % arguments) return False if "prefixes_v6" in data: prefixes_v6 = str(data["prefixes_v6"]).split(",") - if not all(TemplateFabric.is_ipv6(prefix) for prefix in prefixes_v6): + if not all(TemplateFabric.is_ipv6(re.split('ge|le', prefix)[0]) for prefix in prefixes_v6): arguments = "prefixes_v6", str(data["prefixes_v6"]) log_err("BGPAllowListMgr::Received BGP ALLOWED 'SET' message with invalid input[%s]:'%s'" % arguments) return False @@ -113,10 +122,18 @@ def del_handler(self, key): return if not self.__del_handler_validate(key): return - key = key.replace('DEPLOYMENT_ID|', '') - deployment_id, community = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + + if 'NEIGHBOR_TYPE' in key: + keys = key.split('|NEIGHBOR_TYPE|', 1) + deployment_id = keys[0].replace("DEPLOYMENT_ID|", "") + neighbor_type, community_value = keys[1].split('|', 1) if '|' in keys[1] else (keys[1], BGPAllowListMgr.EMPTY_COMMUNITY) + else: + key = key.replace("DEPLOYMENT_ID|", "") + deployment_id, community_value = key.split('|', 1) if '|' in key else (key, BGPAllowListMgr.EMPTY_COMMUNITY) + neighbor_type = '' + deployment_id = int(deployment_id) - self.__remove_policy(deployment_id, community) + self.__remove_policy(deployment_id, community_value, neighbor_type) def __del_handler_validate(self, key): """ @@ -129,7 +146,7 @@ def __del_handler_validate(self, key): return False return True - def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_v6, default_action): + def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_v6, default_action, neighbor_type): """ Update "allow list" policy with parameters :param deployment_id: deployment id which policy will be changed @@ -139,12 +156,13 @@ def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_ :param default_action: the default action for the policy. should be either 'permit' or 'deny' """ # update all related entries with the information - info = deployment_id, community_value, str(prefixes_v4), str(prefixes_v6) + info = deployment_id, community_value, str(prefixes_v4), str(prefixes_v6), neighbor_type msg = "BGPAllowListMgr::Updating 'Allow list' policy." msg += " deployment_id '%s'. community: '%s'" msg += " prefix_v4 '%s'. prefix_v6: '%s'" + msg += " neighbor_type %s" log_info(msg % info) - names = self.__generate_names(deployment_id, community_value) + names = self.__generate_names(deployment_id, community_value, neighbor_type) self.cfg_mgr.update() cmds = [] cmds += self.__update_prefix_list(self.V4, names['pl_v4'], prefixes_v4) @@ -156,14 +174,14 @@ def __update_policy(self, deployment_id, community_value, prefixes_v4, prefixes_ cmds += self.__update_default_route_map_entry(names['rm_v6'], default_action) if cmds: self.cfg_mgr.push_list(cmds) - peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) + peer_groups = self.__find_peer_group(deployment_id, neighbor_type) self.cfg_mgr.restart_peer_groups(peer_groups) log_debug("BGPAllowListMgr::__update_policy. The peers configuration scheduled for updates") else: log_debug("BGPAllowListMgr::__update_policy. Nothing to update") log_info("BGPAllowListMgr::Done") - def __remove_policy(self, deployment_id, community_value): + def __remove_policy(self, deployment_id, community_value, neighbor_type): """ Remove "allow list" policy for given deployment_id and community_value :param deployment_id: deployment id which policy will be removed @@ -177,7 +195,7 @@ def __remove_policy(self, deployment_id, community_value): log_info(msg % info) default_action = self.__get_default_action_community() - names = self.__generate_names(deployment_id, community_value) + names = self.__generate_names(deployment_id, community_value, neighbor_type) self.cfg_mgr.update() cmds = [] cmds += self.__remove_allow_route_map_entry(self.V4, names['pl_v4'], names['community'], names['rm_v4']) @@ -189,7 +207,7 @@ def __remove_policy(self, deployment_id, community_value): cmds += self.__update_default_route_map_entry(names['rm_v6'], default_action) if cmds: self.cfg_mgr.push_list(cmds) - peer_groups = self.__find_peer_group_by_deployment_id(deployment_id) + peer_groups = self.__find_peer_group(deployment_id, neighbor_type) self.cfg_mgr.restart_peer_groups(peer_groups) log_debug("BGPAllowListMgr::__remove_policy. 'Allow list' policy was scheduled for removal") else: @@ -197,26 +215,42 @@ def __remove_policy(self, deployment_id, community_value): log_info('BGPAllowListMgr::Done') @staticmethod - def __generate_names(deployment_id, community_value): + def __generate_names(deployment_id, community_value, neighbor_type): """ Generate prefix-list names for a given peer_ip and community value :param deployment_id: deployment_id for which we're going to filter prefixes :param community_value: community, which we want to use to filter prefixes :return: a dictionary with names """ - if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: - community_name = BGPAllowListMgr.EMPTY_COMMUNITY + if not neighbor_type: + if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: + community_name = BGPAllowListMgr.EMPTY_COMMUNITY + else: + community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL % (deployment_id, community_value) + names = { + "pl_v4": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '4'), + "pl_v6": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '6'), + "rm_v4": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '4'), + "rm_v6": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '6'), + "community": community_name, + 'neigh_type': neighbor_type, + } + arguments = deployment_id, community_value, str(names) + log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, community: %s. names: %s" % arguments) else: - community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL % (deployment_id, community_value) - names = { - "pl_v4": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '4'), - "pl_v6": BGPAllowListMgr.PL_NAME_TMPL % (deployment_id, community_value, '6'), - "rm_v4": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '4'), - "rm_v6": BGPAllowListMgr.RM_NAME_TMPL % (deployment_id, '6'), - "community": community_name, - } - arguments = deployment_id, community_value, str(names) - log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, community: %s. names: %s" % arguments) + if community_value == BGPAllowListMgr.EMPTY_COMMUNITY: + community_name = BGPAllowListMgr.EMPTY_COMMUNITY + else: + community_name = BGPAllowListMgr.COMMUNITY_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value) + names = { + "pl_v4": BGPAllowListMgr.PL_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value, '4'), + "pl_v6": BGPAllowListMgr.PL_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, community_value, '6'), + "rm_v4": BGPAllowListMgr.RM_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, '4'), + "rm_v6": BGPAllowListMgr.RM_NAME_TMPL_WITH_NEIGH % (deployment_id, neighbor_type, '6'), + "community": community_name, + } + arguments = deployment_id, neighbor_type, community_value, str(names) + log_debug("BGPAllowListMgr::__generate_names. deployment_id: %d, neighbor_type: %s, community: %s. names: %s" % arguments) return names def __update_prefix_list(self, af, pl_name, allow_list): @@ -630,7 +664,7 @@ def __get_routemap_tag(self): return prefix_match_tag @staticmethod - def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call): + def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call, neighbor_type): """ Get peer_groups which are assigned to deployment_id :deployment_id: deployment_id number @@ -639,14 +673,17 @@ def __get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call): :rm_2_call: a dictionary: key - name of a route-map, value - name of a route-map call defined for the route-map """ ret = set() - target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_V' % deployment_id + if not neighbor_type: + target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_V' % deployment_id + else: + target_allow_list_prefix = 'ALLOW_LIST_DEPLOYMENT_ID_%d_NEIGHBOR_%s_V' % (deployment_id, neighbor_type) for peer_group, route_map in pg_2_rm.items(): if route_map in rm_2_call: if rm_2_call[route_map].startswith(target_allow_list_prefix): ret.add(peer_group) return list(ret) - def __find_peer_group_by_deployment_id(self, deployment_id): + def __find_peer_group(self, deployment_id, neighbor_type): """ Deduce peer-group names which are connected to devices with requested deployment_id :param deployment_id: deployment_id number @@ -656,7 +693,7 @@ def __find_peer_group_by_deployment_id(self, deployment_id): peer_groups = self.__extract_peer_group_names() pg_2_rm = self.__get_peer_group_to_route_map(peer_groups) rm_2_call = self.__get_route_map_calls(set(pg_2_rm.values())) - ret = self.__get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call) + ret = self.__get_peer_group_to_restart(deployment_id, pg_2_rm, rm_2_call, neighbor_type) return list(ret) def __get_enabled(self): @@ -706,11 +743,14 @@ def __to_prefix_list(self, af, allow_list): res = [] prefix_mask_default = 32 if af == self.V4 else 128 for prefix in allow_list: - prefix_mask = int(prefix.split("/")[1]) - if prefix_mask == prefix_mask_default: + if 'le' in prefix or 'ge' in prefix: res.append("permit %s" % prefix) else: - res.append("permit %s le %d" % (prefix, prefix_mask_default)) + prefix_mask = int(prefix.split("/")[1]) + if prefix_mask == prefix_mask_default: + res.append("permit %s" % prefix) + else: + res.append("permit %s le %d" % (prefix, prefix_mask_default)) return res def __af_to_family(self, af): diff --git a/src/sonic-bgpcfgd/tests/test_allow_list.py b/src/sonic-bgpcfgd/tests/test_allow_list.py index e77c692ee593..c5bec039c3e4 100644 --- a/src/sonic-bgpcfgd/tests/test_allow_list.py +++ b/src/sonic-bgpcfgd/tests/test_allow_list.py @@ -866,6 +866,131 @@ def test_set_handler_no_community_update_prefixes_remove(): ] ) +def test_set_handler_with_neighbor_type(): + set_del_test( + "SET", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal", { + "prefixes_v4": "10.62.64.0/22 ge 30,"\ + "10.1.44.0/23 ge 30,"\ + "10.17.92.0/23 ge 30,"\ + "10.73.92.0/23 ge 30,"\ + "10.26.170.0/24 ge 30,"\ + "10.26.171.0/24 ge 30,"\ + "10.26.255.0/24 ge 30", + "prefixes_v6": "fc01:20::/64", + }), + [ + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 20 permit 20.20.30.0/24 le 32', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 30 permit 40.50.0.0/16 le 32', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 30 permit fc01:20::/64 le 128', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 40 permit fc01:30::/64 le 128', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 30000', + ' match ip address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 30000', + ' match ipv6 address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive', + "" + ], + [ + 'no ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 20 permit 10.62.64.0/22 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 30 permit 10.1.44.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 40 permit 10.17.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 50 permit 10.73.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 60 permit 10.26.170.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 70 permit 10.26.171.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V4 seq 80 permit 10.26.255.0/24 ge 30', + 'no ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_empty_V6 seq 30 permit fc01:20::/64 le 128', + ] + ) + +def test_set_handler_with_neighbor_type_and_community(): + set_del_test( + "SET", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal|1010:2020", { + "prefixes_v4": "10.62.64.0/22 ge 30,"\ + "10.1.44.0/23 ge 30,"\ + "10.17.92.0/23 ge 30,"\ + "10.73.92.0/23 ge 30,"\ + "10.26.170.0/24 ge 30,"\ + "10.26.171.0/24 ge 30,"\ + "10.26.255.0/24 ge 30", + "prefixes_v6": "fc01:20::/64", + }), + [ + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 20 permit 20.20.30.0/24 le 32', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 30 permit 40.50.0.0/16 le 32', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 30 permit fc01:20::/64 le 128', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 40 permit fc01:30::/64 le 128', + 'bgp community-list standard COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020 permit 1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 10', + ' match ip address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4', + ' match community COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 10', + ' match ipv6 address prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6', + ' match community COMMUNITY_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive', + "" + ], + [ + 'no ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 10 deny 0.0.0.0/0 le 17', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 20 permit 10.62.64.0/22 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 30 permit 10.1.44.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 40 permit 10.17.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 50 permit 10.73.92.0/23 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 60 permit 10.26.170.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 70 permit 10.26.171.0/24 ge 30', + 'ip prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V4 seq 80 permit 10.26.255.0/24 ge 30', + 'no ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 10 deny ::/0 le 59', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 20 deny ::/0 ge 65', + 'ipv6 prefix-list PL_ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_COMMUNITY_1010:2020_V6 seq 30 permit fc01:20::/64 le 128', + ] + ) + +def test_del_handler_with_neighbor_type_community_no_data(): + set_del_test( + "DEL", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal|1010:2020",), + [ + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive' + ], + [] + ) + +def test_del_handler_with_neighbor_type_no_data(): + set_del_test( + "DEL", + ("DEPLOYMENT_ID|5|NEIGHBOR_TYPE|OpticalLonghaulTerminal",), + [ + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V4 permit 65535', + ' set community 123:123 additive', + 'route-map ALLOW_LIST_DEPLOYMENT_ID_5_NEIGHBOR_OpticalLonghaulTerminal_V6 permit 65535', + ' set community 123:123 additive' + ], + [] + ) + @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) def test___set_handler_validate(): from bgpcfgd.managers_allow_list import BGPAllowListMgr @@ -894,7 +1019,7 @@ def test___set_handler_validate(): }) @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) -def test___find_peer_group_by_deployment_id(): +def test___find_peer_group(): from bgpcfgd.managers_allow_list import BGPAllowListMgr cfg_mgr = MagicMock() cfg_mgr.update.return_value = None @@ -984,7 +1109,7 @@ def test___find_peer_group_by_deployment_id(): 'constants': global_constants, } mgr = BGPAllowListMgr(common_objs, "CONFIG_DB", "BGP_ALLOWED_PREFIXES") - values = mgr._BGPAllowListMgr__find_peer_group_by_deployment_id(0) + values = mgr._BGPAllowListMgr__find_peer_group(0, '') assert set(values) == {'PEER_V4_INT', 'PEER_V6_INT', 'PEER_V6', 'PEER_V4'} @patch.dict("sys.modules", swsscommon=swsscommon_module_mock) From 5d1b052e4f98b4adb3f0f346475fd9c2a7ebf2c5 Mon Sep 17 00:00:00 2001 From: Sumukha Tumkur Vani Date: Thu, 11 Aug 2022 17:17:35 -0700 Subject: [PATCH 038/106] [RESTAPI] Update submodule (#11686) From fb7c962fbcfb27f23065da557e4fa535ca40629c Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Fri, 12 Aug 2022 14:07:33 -0700 Subject: [PATCH 039/106] [202012][sonic-platorm-common] submodule update (#11712) Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com the following commit is added in sonic-platform-common fd8cf3a (HEAD -> 202012, origin/202012) [Credo][Ycable] fix incorrect uart statistics (#296) Signed-off-by: vaibhav-dahiya --- src/sonic-platform-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-platform-common b/src/sonic-platform-common index ac255158d072..fd8cf3a9dad9 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit ac255158d07257614af4eae37edff9abd70b13e1 +Subproject commit fd8cf3a9dad971b36cdd49db6ee34b918aa450cb From 088d9923d91e984de8d70c4250bec38c4a660556 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Mon, 15 Aug 2022 09:14:44 -0700 Subject: [PATCH 040/106] [202012][sonic-linkmgrd] Submodule Update (#11726) fc5d424 Jing Zhang Fri Aug 12 14:39:59 2022 -0700 [202012] Cherry-pick flaky unit test fixes (#115) faceb93 Jing Zhang Thu Aug 11 10:03:05 2022 -0700 Backoff mux probing for server down scenario (#106) 86ddd95 Jing Zhang Fri Aug 12 14:21:37 2022 -0700 Fix race condition caused by strand wrap method (#104) (#110) f68a03e Jing Zhang Thu Aug 11 15:31:22 2022 -0700 [lgtm]: add uuid-dev to lgtm prepare (#112) sign-off: Jing Zhang zhangjing@microsoft.com --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index d3f5de1ce41c..fc5d4240bf85 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit d3f5de1ce41cee9526170b76fdc2788bc696fb6e +Subproject commit fc5d4240bf85699bc1f689a08b3d5670a8a7ead2 From 07082bb5f58d276eb1e5e2015ef2aa6e7700ff73 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 16 Aug 2022 21:07:32 +0800 Subject: [PATCH 041/106] [ci/build]: Upgrade SONiC package versions (#11676) --- .../build-sonic-slave-buster/versions-deb-buster | 2 +- .../build/build-sonic-slave-buster/versions-git | 2 +- .../build/build-sonic-slave-buster/versions-web | 4 ++-- .../build/build-sonic-slave-stretch/versions-web | 4 ++-- files/build/versions/default/versions-git | 4 ++-- files/build/versions/default/versions-web | 2 -- .../build/versions/dockers/docker-ptf/versions-py2 | 2 +- .../docker-sonic-mgmt-framework/versions-py3 | 6 +++--- .../dockers/docker-syncd-brcm/versions-deb-buster | 2 +- .../docker-syncd-centec/versions-deb-buster-arm64 | 4 ++-- .../docker-syncd-mrvl/versions-deb-buster-armhf | 4 ++-- .../dockers/sonic-slave-buster/versions-deb-buster | 13 +++++++------ .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- files/build/versions/host-image/versions-deb-buster | 3 ++- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster index cee663358b9e..131f0755077b 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster @@ -18,7 +18,7 @@ libnl-nf-3-200==3.5.0-1 libnl-nf-3-dev==3.5.0-1 libnl-route-3-200==3.5.0-1 libnl-route-3-dev==3.5.0-1 -libsaibcm==4.3.5.3-5 +libsaibcm==4.3.7.0 libsaimetadata==1.0.0 libsaimetadata-dev==1.0.0 libsairedis==1.0.0 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 fe95b3f00311..da70e218b7b1 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -11,4 +11,4 @@ https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee 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==de790f931452a2dcb4490d074d5a16ab8456a523 \ No newline at end of file +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-web b/files/build/versions/build/build-sonic-slave-buster/versions-web index a862938939ca..3de472035f53 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-web +++ b/files/build/versions/build/build-sonic-slave-buster/versions-web @@ -28,8 +28,8 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/bcmcmd?sv=2015-04-05&sr=b&sig=sUdbU7oVbh5exbXXHVL5TDFBTWDDBASHeJ8Cp0B0TIc%3D&se=2038-05-06T22%3A34%3A19Z&sp=r==b8aefc751bdf93218716bca6797460ff https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D==e9861d9d73d17207e120b2c089ae590a -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D==1594e9cfb991e0ed2d610d84a141a731 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.debian.tar.xz?sv=2015-04-05&sr=b&sig=H0RFeC41MCvhTQCln85DuPLn5v2goozwz%2FB9sA9p5eQ%3D&se=2046-08-20T23%3A46%3A02Z&sp=r==47a284f4762f86ba24753ea75d85e6cb https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.dsc?sv=2015-04-05&sr=b&sig=IS7FKUN%2Bvq0T55f4X2hGAViB70Y%2FgzjGgvzpUJLyUfA%3D&se=2046-08-20T23%3A46%3A57Z&sp=r==151f97b46df2dafbd5bb954bb419642c https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6.orig.tar.gz?sv=2015-04-05&sr=b&sig=JZx4qiLuO36T0rsGqk4V2RDuWjRw6NztsLK7vlBYAkg%3D&se=2046-08-20T23%3A47%3A13Z&sp=r==9ae2c6e7131cd2813edcc65cbe5f223f diff --git a/files/build/versions/build/build-sonic-slave-stretch/versions-web b/files/build/versions/build/build-sonic-slave-stretch/versions-web index 26ffd4974b35..ac8007914719 100644 --- a/files/build/versions/build/build-sonic-slave-stretch/versions-web +++ b/files/build/versions/build/build-sonic-slave-stretch/versions-web @@ -1,2 +1,2 @@ -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A45%3A06Z&se=2037-06-07T04%3A45%3A00Z&sr=b&sp=r&sig=SF6YOtYzSIcwSR4BRInnimUjbusNp4mPHFunFjm%2Fors%3D==e9861d9d73d17207e120b2c089ae590a -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.5.3-5_amd64.deb?sv=2020-08-04&st=2022-06-06T04%3A44%3A45Z&se=2037-06-07T04%3A44%3A00Z&sr=b&sp=r&sig=uG51Q6rJrZYNVVuoShw8F4zas1n6zi%2FJ7udpTSZ87M8%3D==1594e9cfb991e0ed2d610d84a141a731 \ No newline at end of file +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index d2709c2917ea..debe56e88395 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==811ea056edb7a8d0d6defa6bbc9f2330c4dfabff +https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b @@ -17,4 +17,4 @@ https://salsa.debian.org/dhcp-team/isc-dhcp.git==18ecb042065e51e088b7470566526cd https://salsa.debian.org/kernel-team/ethtool/==5ead2b58847600ea0ccd0aa76b5bedce678f17ee 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==de790f931452a2dcb4490d074d5a16ab8456a523 \ No newline at end of file +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 ad8106d47eda..8b638e27a593 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -50,8 +50,6 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912 https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a diff --git a/files/build/versions/dockers/docker-ptf/versions-py2 b/files/build/versions/dockers/docker-ptf/versions-py2 index 454a54602a78..87c8a5d16e7d 100644 --- a/files/build/versions/dockers/docker-ptf/versions-py2 +++ b/files/build/versions/dockers/docker-ptf/versions-py2 @@ -36,7 +36,7 @@ protobuf==3.6.1 ptf==0.9.1 ptyprocess==0.7.0 pyaml==21.10.1 -pybrctl==0.1.3 +pybrctl==0.1.4 pycparser==2.21 pygments==2.5.2 pylibpcap==0.6.4 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 af3ca22ed5c3..456819069211 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -4,7 +4,7 @@ charset-normalizer==2.1.0 click==8.1.3 clickclick==20.10.2 connexion==2.7.0 -flask==2.2.1 +flask==2.2.2 grpcio==1.47.0 grpcio-tools==1.20.0 idna==3.3 @@ -16,12 +16,12 @@ jsonschema==4.9.1 openapi-schema-validator==0.2.3 openapi-spec-validator==0.4.0 pkgutil_resolve_name==1.3.10 -protobuf==4.21.4 +protobuf==4.21.5 pyrsistent==0.18.1 python-dateutil==2.6.0 requests==2.28.1 six==1.11.0 typing_extensions==4.3.0 urllib3==1.26.5 -werkzeug==2.2.1 +werkzeug==2.2.2 zipp==3.8.1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index ced876e18827..27515b58c333 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -16,7 +16,7 @@ libpopt0==1.16-12 libprotobuf-dev==3.6.1.3-2 libprotobuf-lite17==3.6.1.3-2 libprotobuf17==3.6.1.3-2 -libsaibcm==4.3.5.3-5 +libsaibcm==4.3.7.0 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 libsairedis==1.0.0 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 index e13071edf35e..ad85b9e20885 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 @@ -18,8 +18,8 @@ libpython2.7-stdlib==2.7.16-2+deb10u1 libsensors-config==1:3.5.0-3 libsensors4-dev==1:3.5.0-3 libsensors5==1:3.5.0-3 -libtirpc-common==1.1.4-0.4 -libtirpc3==1.1.4-0.4 +libtirpc-common==1.1.4-0.4+deb10u1 +libtirpc3==1.1.4-0.4+deb10u1 nfs-common==1:1.3.4-2.5+deb10u1 python==2.7.16-1 python-dev==2.7.16-1 diff --git a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf index 75858915943a..46f091f15b72 100644 --- a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf @@ -20,8 +20,8 @@ libsairedis==1.0.0 libsensors-config==1:3.5.0-3 libsensors4-dev==1:3.5.0-3 libsensors5==1:3.5.0-3 -libtirpc-common==1.1.4-0.4 -libtirpc3==1.1.4-0.4 +libtirpc-common==1.1.4-0.4+deb10u1 +libtirpc3==1.1.4-0.4+deb10u1 mrvllibsai==1.7.1-9 nfs-common==1:1.3.4-2.5+deb10u1 python==2.7.16-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 3a2b92ca3f66..7892d9233999 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.6-1 +containerd.io==1.6.7-1 cowbuilder==0.88 cowdancer==0.88 cpio==2.12+dfsg-9 @@ -173,7 +173,7 @@ gsettings-desktop-schemas==3.28.1-1 gsfonts==1:8.11+urwcyr1.0.7~pre44-4.4 gstreamer1.0-libav==1.15.0.1+git20180723+db823502-2+deb10u1 gstreamer1.0-plugins-base==1.14.4-2+deb10u1 -gstreamer1.0-plugins-good==1.14.4-1+deb10u1 +gstreamer1.0-plugins-good==1.14.4-1+deb10u2 gstreamer1.0-plugins-ugly==1.14.4-1+deb10u1 gstreamer1.0-x==1.14.4-2+deb10u1 gtk-update-icon-cache==3.24.5-1 @@ -553,10 +553,11 @@ libglx0==1.1.0-1 libgme0==0.6.2-1 libgmp-dev==2:6.1.2+dfsg-4+deb10u1 libgmpxx4ldbl==2:6.1.2+dfsg-4+deb10u1 -libgnutls-dane0==3.6.7-4+deb10u7 -libgnutls-openssl27==3.6.7-4+deb10u7 -libgnutls28-dev==3.6.7-4+deb10u7 -libgnutlsxx28==3.6.7-4+deb10u7 +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 libgpgme11==1.12.0-6 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 6902af6272e9..b6445f629357 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==eb8426e2ac6e8b03837a8d093863008fbec79860 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 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 6902af6272e9..b6445f629357 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==eb8426e2ac6e8b03837a8d093863008fbec79860 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==268d645853ee8e1b884260049e5464a5ca2d8a30 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 b55a3f3e71e9..66df5e12d018 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.6-1 +containerd.io==1.6.7-1 cpio==2.12+dfsg-9 cpp==4:8.3.0-1 cpp-8==8.3.0-6 @@ -128,6 +128,7 @@ libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 libgirepository-1.0-1==1.58.3-2 libglib2.0-0==2.58.3-2+deb10u3 +libgnutls30==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libgssapi-krb5-2==1.17-3+deb10u3 From 9ee0219029bd37b2765d8e646f8419f957cbfe43 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 18 Aug 2022 00:22:01 -0700 Subject: [PATCH 042/106] [sairedis]: Update submodule (#11762) This brings in the following changes: ``` 21f3d7c Add SAI_OBJECT_TYPE_TUNNEL object to break-before-make list (#1075) 8ac3aa7 [sairedis] Fix reopen recoding file (#1087) 0bbbb02 Transfer organization from Azure to sonic-net (#1096) 3406c57 [sairedis] Perform log rotate on request (#1083) ``` --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index de5c23534d50..21f3d7c3d67f 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit de5c23534d50fcc21d8b89c90632efb8c4351f88 +Subproject commit 21f3d7c3d67ffe072ddfb335d08bb08f50b879ac From 32bee5df2d63d74c8c96c982197bf9ee76cfec1a Mon Sep 17 00:00:00 2001 From: Mai Bui Date: Wed, 17 Aug 2022 17:30:58 -0400 Subject: [PATCH 043/106] Replace strtok in systemd-sonic-generator (#11710) Signed-off-by: maipbui #### Why I did it Replace unsafe functions to safe functions #### How I did it Replace `strtok()` by `strtok_r()` #### How to verify it #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 - [ ] 202111 - [ ] 202205 #### Description for the changelog #### Link to config_db schema for YANG module changes #### A picture of a cute animal (not mandatory but encouraged) --- .../systemd-sonic-generator.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/systemd-sonic-generator/systemd-sonic-generator.c b/src/systemd-sonic-generator/systemd-sonic-generator.c index 1052e2db622a..1eab976f42ac 100644 --- a/src/systemd-sonic-generator/systemd-sonic-generator.c +++ b/src/systemd-sonic-generator/systemd-sonic-generator.c @@ -99,6 +99,7 @@ static int get_install_targets_from_line(char* target_string, char* install_type ***/ char* token; char* target; + char* saveptr; char final_target[PATH_MAX]; int num_targets = 0; @@ -113,8 +114,8 @@ static int get_install_targets_from_line(char* target_string, char* install_type strip_trailing_newline(target); if (strstr(target, "%") != NULL) { - char* prefix = strtok(target, "."); - char* suffix = strtok(NULL, "."); + char* prefix = strtok_r(target, ".", &saveptr); + char* suffix = strtok_r(NULL, ".", &saveptr); int prefix_len = strlen(prefix); strncpy(final_target, prefix, prefix_len - 2); @@ -501,6 +502,7 @@ static int get_num_of_asic() { char *line = NULL; char* token; char* platform; + char* saveptr; size_t len = 0; ssize_t nread; bool ans; @@ -518,8 +520,8 @@ static int get_num_of_asic() { while ((nread = getline(&line, &len, fp)) != -1) { if ((strstr(line, "onie_platform") != NULL) || (strstr(line, "aboot_platform") != NULL)) { - token = strtok(line, "="); - platform = strtok(NULL, "="); + token = strtok_r(line, "=", &saveptr); + platform = strtok_r(NULL, "=", &saveptr); strip_trailing_newline(platform); break; } @@ -532,8 +534,8 @@ static int get_num_of_asic() { if (fp != NULL) { while ((nread = getline(&line, &len, fp)) != -1) { if (strstr(line, "NUM_ASIC") != NULL) { - token = strtok(line, "="); - str_num_asic = strtok(NULL, "="); + token = strtok_r(line, "=", &saveptr); + str_num_asic = strtok_r(NULL, "=", &saveptr); strip_trailing_newline(str_num_asic); if (str_num_asic != NULL){ sscanf(str_num_asic, "%d",&num_asic); @@ -557,6 +559,7 @@ int main(int argc, char **argv) { char* unit_instance; char* prefix; char* suffix; + char* saveptr; int num_unit_files; int num_targets; int r; @@ -577,8 +580,8 @@ int main(int argc, char **argv) { for (int i = 0; i < num_unit_files; i++) { unit_instance = strdup(unit_files[i]); if ((num_asics == 1) && strstr(unit_instance, "@") != NULL) { - prefix = strtok(unit_instance, "@"); - suffix = strtok(NULL, "@"); + prefix = strtok_r(unit_instance, "@", &saveptr); + suffix = strtok_r(NULL, "@", &saveptr); strcpy(unit_instance, prefix); strcat(unit_instance, suffix); From 42e29246b9b7a336a2313ddfd74972d3ac70c260 Mon Sep 17 00:00:00 2001 From: Sujin Kang Date: Mon, 22 Aug 2022 10:52:01 -0700 Subject: [PATCH 044/106] Add the hw reboot cause if it happened during a software reboot (#11792) * Add the hw reboot cause if it happened during a software reboot * fix the unknown software reboot cause --- .../scripts/determine-reboot-cause | 68 ++++++++++++++----- .../tests/determine-reboot-cause_test.py | 63 ++++++++++++++++- 2 files changed, 112 insertions(+), 19 deletions(-) diff --git a/src/sonic-host-services/scripts/determine-reboot-cause b/src/sonic-host-services/scripts/determine-reboot-cause index 1408ad0e2952..754541edb604 100755 --- a/src/sonic-host-services/scripts/determine-reboot-cause +++ b/src/sonic-host-services/scripts/determine-reboot-cause @@ -122,7 +122,12 @@ def find_hardware_reboot_cause(): else: sonic_logger.log_info("No reboot cause found from platform api") - hardware_reboot_cause = "{} ({})".format(hardware_reboot_cause_major, hardware_reboot_cause_minor) + hardware_reboot_cause_minor_str = "" + if hardware_reboot_cause_minor: + hardware_reboot_cause_minor_str = " ({})".format(hardware_reboot_cause_minor) + + hardware_reboot_cause = hardware_reboot_cause_major + hardware_reboot_cause_minor_str + return hardware_reboot_cause @@ -158,6 +163,50 @@ def get_reboot_cause_dict(previous_reboot_cause, comment, gen_time): return reboot_cause_dict +def determine_reboot_cause(): + # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides + # any additional_reboot_info it will be stored as a "comment" in REBOOT_CAUSE_HISTORY_FILE + additional_reboot_info = "N/A" + + # 1. Check if the previous reboot was warm/fast reboot by testing whether there is "fast|fastfast|warm" in /proc/cmdline + proc_cmdline_reboot_cause = find_proc_cmdline_reboot_cause() + + # 2. Check if the previous reboot was caused by hardware + # If yes, the hardware reboot cause will be treated as the reboot cause + hardware_reboot_cause = find_hardware_reboot_cause() + + # 3. If there is a REBOOT_CAUSE_FILE, it will contain any software-related + # reboot info. We will use it as the previous cause. + software_reboot_cause = find_software_reboot_cause() + + # The main decision logic of the reboot cause: + # If there is a valid hardware reboot cause indicated by platform API, + # check the software reboot cause to add additional rebot cause. + # If there is a reboot cause indicated by /proc/cmdline, and/or warmreboot/fastreboot/softreboot + # the software_reboot_cause which is the content of /hosts/reboot-cause/reboot-cause.txt + # will be treated as the additional reboot cause + # Elif there is a cmdline reboot cause, + # the software_reboot_cause will be treated as the reboot cause if it's not unknown + # otherwise, the cmdline_reboot_cause will be treated as the reboot cause if it's not none + # Else the software_reboot_cause will be treated as the reboot cause + if REBOOT_CAUSE_NON_HARDWARE not in hardware_reboot_cause: + previous_reboot_cause = hardware_reboot_cause + # Check if any software reboot was issued before this hardware reboot happened + if REBOOT_CAUSE_UNKNOWN not in software_reboot_cause: + additional_reboot_info = software_reboot_cause + elif proc_cmdline_reboot_cause is not None: + additional_reboot_info = proc_cmdline_reboot_cause + elif proc_cmdline_reboot_cause is not None: + if REBOOT_CAUSE_UNKNOWN not in software_reboot_cause: + # Get the reboot cause from REBOOT_CAUSE_FILE + previous_reboot_cause = software_reboot_cause + else: + previous_reboot_cause = proc_cmdline_reboot_cause + else: + previous_reboot_cause = software_reboot_cause + + return previous_reboot_cause, additional_reboot_info + def main(): # Configure logger to log all messages INFO level and higher @@ -177,22 +226,7 @@ def main(): if os.path.exists(PREVIOUS_REBOOT_CAUSE_FILE): os.remove(PREVIOUS_REBOOT_CAUSE_FILE) - # This variable is kept for future-use purpose. When proc_cmd_line/vendor/software provides - # any additional_reboot_info it will be stored as a "comment" in REBOOT_CAUSE_HISTORY_FILE - additional_reboot_info = "N/A" - - # Check if the previous reboot was warm/fast reboot by testing whether there is "fast|fastfast|warm" in /proc/cmdline - proc_cmdline_reboot_cause = find_proc_cmdline_reboot_cause() - - # If /proc/cmdline does not indicate reboot cause, check if the previous reboot was caused by hardware - if proc_cmdline_reboot_cause is None: - previous_reboot_cause = find_hardware_reboot_cause() - if previous_reboot_cause.startswith(REBOOT_CAUSE_NON_HARDWARE): - # If the reboot cause is non-hardware, get the reboot cause from REBOOT_CAUSE_FILE - previous_reboot_cause = find_software_reboot_cause() - else: - # Get the reboot cause from REBOOT_CAUSE_FILE - previous_reboot_cause = find_software_reboot_cause() + previous_reboot_cause, additional_reboot_info = determine_reboot_cause() # Current time reboot_cause_gen_time = str(datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S')) diff --git a/src/sonic-host-services/tests/determine-reboot-cause_test.py b/src/sonic-host-services/tests/determine-reboot-cause_test.py index 7d22a512f8ee..b4c07af4683b 100644 --- a/src/sonic-host-services/tests/determine-reboot-cause_test.py +++ b/src/sonic-host-services/tests/determine-reboot-cause_test.py @@ -54,11 +54,16 @@ GEN_TIME_KERNEL_PANIC = "2021_3_28_13_48_49" +REBOOT_CAUSE_UNKNOWN = "Unknown" +REBOOT_CAUSE_NON_HARDWARE = "Non-Hardware" +EXPECTED_NON_HARDWARE_REBOOT_CAUSE = {REBOOT_CAUSE_NON_HARDWARE, "N/A"} +REBOOT_CAUSE_HARDWARE_OTHER = "Hardware - Other" +EXPECTED_HARDWARE_REBOOT_CAUSE = {REBOOT_CAUSE_HARDWARE_OTHER, ""} + EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE = "warm-reboot" EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER = "User issued 'warm-reboot' command [User: admin, Time: Mon Nov 2 22:37:45 UTC 2020]" EXPECTED_FIND_FIRSTBOOT_VERSION = " (First boot of SONiC version 20191130.52)" EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_FIRSTBOOT = "Unknown (First boot of SONiC version 20191130.52)" -EXPECTED_HARDWARE_REBOOT_CAUSE = {"warm-reboot", ""} EXPECTED_WATCHDOG_REBOOT_CAUSE_DICT = {'comment': '', 'gen_time': '2020_10_22_03_15_08', 'cause': 'Watchdog', 'user': 'N/A', 'time': 'N/A'} EXPECTED_USER_REBOOT_CAUSE_DICT = {'comment': '', 'gen_time': '2020_10_22_03_14_07', 'cause': 'reboot', 'user': 'admin', 'time': 'Thu Oct 22 03:11:08 UTC 2020'} @@ -104,7 +109,12 @@ def test_find_proc_cmdline_reboot_cause(self): def test_find_hardware_reboot_cause(self): with mock.patch("determine_reboot_cause.get_reboot_cause_from_platform", return_value=("Powerloss", None)): result = determine_reboot_cause.find_hardware_reboot_cause() - assert result == "Powerloss (None)" + assert result == "Powerloss" + + def test_find_hardware_reboot_cause_with_minor(self): + with mock.patch("determine_reboot_cause.get_reboot_cause_from_platform", return_value=("Powerloss", "under-voltage")): + result = determine_reboot_cause.find_hardware_reboot_cause() + assert result == "Powerloss (under-voltage)" def test_get_reboot_cause_dict_watchdog(self): reboot_cause_dict = determine_reboot_cause.get_reboot_cause_dict(REBOOT_CAUSE_WATCHDOG, "", GEN_TIME_WATCHDOG) @@ -117,3 +127,52 @@ def test_get_reboot_cause_dict_user(self): def test_get_reboot_cause_dict_kernel_panic(self): reboot_cause_dict = determine_reboot_cause.get_reboot_cause_dict(REBOOT_CAUSE_KERNEL_PANIC, "", GEN_TIME_KERNEL_PANIC) assert reboot_cause_dict == EXPECTED_KERNEL_PANIC_REBOOT_CAUSE_DICT + + def test_determine_reboot_cause_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=None): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_reboot_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_reboot_info == "N/A" + + def test_determine_reboot_cause_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=None): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_no_software(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_NON_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE + assert additional_info == "N/A" + + def test_determine_reboot_cause_cmdline_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=REBOOT_CAUSE_UNKNOWN): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_info == EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE + + def test_determine_reboot_cause_software_hardware(self): + with mock.patch("determine_reboot_cause.find_proc_cmdline_reboot_cause", return_value=EXPECTED_PARSE_WARMFAST_REBOOT_FROM_PROC_CMDLINE): + with mock.patch("determine_reboot_cause.find_software_reboot_cause", return_value=EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER): + with mock.patch("determine_reboot_cause.find_hardware_reboot_cause", return_value=EXPECTED_HARDWARE_REBOOT_CAUSE): + previous_reboot_cause, additional_info = determine_reboot_cause.determine_reboot_cause() + assert previous_reboot_cause == EXPECTED_HARDWARE_REBOOT_CAUSE + assert additional_info == EXPECTED_FIND_SOFTWARE_REBOOT_CAUSE_USER + From 973fb9e494ebf522a87eea6d8192e70961454a7a Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Wed, 24 Aug 2022 19:53:11 -0700 Subject: [PATCH 045/106] [dhcp_relay] Add "vlan missing ip helper" dhcp relay unittest (#10654) (#11794) --- .../docker-dhcp-relay/dhcp-relay.monitors.j2 | 5 +- .../docker-dhcp-relay/dhcp-relay.programs.j2 | 10 +- .../docker-dhcp-relay/dhcpv6-relay.agents.j2 | 9 +- .../docker-dhcp-relay.supervisord.conf.j2 | 4 +- ...r-dhcp-relay-no-ip-helper.supervisord.conf | 80 ++ .../py2/docker-dhcp-relay.supervisord.conf | 30 +- ...r-dhcp-relay-no-ip-helper.supervisord.conf | 80 ++ .../py3/docker-dhcp-relay.supervisord.conf | 30 +- .../tests/t0-sample-graph.xml | 3 +- .../tests/t0-sample-no-ip-helper-graph.xml | 938 ++++++++++++++++++ src/sonic-config-engine/tests/test_j2files.py | 7 + 11 files changed, 1173 insertions(+), 23 deletions(-) create mode 100644 src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf create mode 100644 src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf create mode 100644 src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml diff --git a/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 index ae11105ae3ba..0928bac22d4d 100644 --- a/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 +++ b/dockers/docker-dhcp-relay/dhcp-relay.monitors.j2 @@ -6,7 +6,7 @@ programs= {% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %} {% set _dummy = monitor_instance.update({'flag': True}) %} {%- endif %} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% set _dummy = monitor_instance.update({'flag': True}) %} {%- endif %} {% if monitor_instance.flag %} @@ -31,7 +31,7 @@ dhcpmon-{{ vlan_name }} {% endfor %} {% endif %} {# Check DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %} {% if dhcpv6_server | ipv6 %} {% set _dummy = relay_for_ipv6.update({'flag': True}) %} @@ -68,7 +68,6 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for= {%- if relay_for_ipv4.flag %}isc-dhcpv4-relay-{{ vlan_name }}:running {% endif %} -{% if relay_for_ipv6.flag %}dhcp6relay:running{% endif %} {% set _dummy = relay_for_ipv4.update({'flag': False}) %} diff --git a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 index 9cb0c03876d6..d539d895a5bb 100644 --- a/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 +++ b/dockers/docker-dhcp-relay/dhcp-relay.programs.j2 @@ -1,5 +1,6 @@ [group:dhcp-relay] programs= +{%- set relay_for_ipv6 = { 'flag': False } %} {%- set add_preceding_comma = { 'flag': False } %} {% for vlan_name in VLAN_INTERFACE %} {# Append DHCPv4 agents #} @@ -8,10 +9,13 @@ programs= {% set _dummy = add_preceding_comma.update({'flag': True}) %} isc-dhcpv4-relay-{{ vlan_name }} {%- endif %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} +{% set _dummy = relay_for_ipv6.update({'flag': True}) %} +{%- endif %} +{% endfor %} {# Append DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if relay_for_ipv6.flag %} {% if add_preceding_comma.flag %},{% endif %} {% set _dummy = add_preceding_comma.update({'flag': True}) %} dhcp6relay -{%- endif %} -{% endfor %} +{% endif %} diff --git a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 index 218c95320edc..cca0b1c4b21a 100644 --- a/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 +++ b/dockers/docker-dhcp-relay/dhcpv6-relay.agents.j2 @@ -1,15 +1,17 @@ {# Append DHCPv6 agents #} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} -{% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %} +{% for vlan_name in VLAN_INTERFACE %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} +{% for dhcpv6_server in DHCP_RELAY[vlan_name]['dhcpv6_servers'] %} {% if dhcpv6_server | ipv6 %} {% set _dummy = relay_for_ipv6.update({'flag': True}) %} {% endif %} {% endfor %} +{% endif %} +{% endfor %} {% if relay_for_ipv6.flag %} {% set _dummy = relay_for_ipv6.update({'flag': False}) %} [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -19,4 +21,3 @@ dependent_startup=true dependent_startup_wait_for=start:exited {% endif %} -{% endif %} diff --git a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 index 41a13dd496ad..ddd93bb28644 100644 --- a/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 +++ b/dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2 @@ -48,7 +48,7 @@ dependent_startup_wait_for=rsyslogd:running {% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %} {% set _dummy = ipv4_num_relays.update({'count': ipv4_num_relays.count + 1}) %} {% endif %} -{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %} +{% if DHCP_RELAY and vlan_name in DHCP_RELAY and DHCP_RELAY[vlan_name]['dhcpv6_servers']|length > 0 %} {% set _dummy = ipv6_num_relays.update({'count': ipv6_num_relays.count + 1}) %} {% endif %} {% endfor %} @@ -62,9 +62,9 @@ dependent_startup_wait_for=rsyslogd:running {% set relay_for_ipv6 = { 'flag': False } %} {% for vlan_name in VLAN_INTERFACE %} {% include 'dhcpv4-relay.agents.j2' %} -{% include 'dhcpv6-relay.agents.j2' %} {% endfor %} +{% include 'dhcpv6-relay.agents.j2' %} {% include 'dhcp-relay.monitors.j2' %} {% endif %} {% endif %} diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf new file mode 100644 index 000000000000..c36dbe22533b --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay-no-ip-helper.supervisord.conf @@ -0,0 +1,80 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[eventlistener:dependent-startup] +command=python3 -m supervisord_dependent_startup +autostart=true +autorestart=unexpected +startretries=0 +exitcodes=0,3 +events=PROCESS_STATE +buffer_size=1024 + +[eventlistener:supervisor-proc-exit-listener] +command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay +events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING +autostart=true +autorestart=unexpected +buffer_size=1024 + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n -iNONE +priority=1 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true + +[program:start] +command=/usr/bin/start.sh +priority=2 +autostart=false +autorestart=false +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running + +[group:dhcp-relay] +programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay + + +[program:isc-dhcpv4-relay-Vlan1000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + +[program:dhcp6relay] +command=/usr/sbin/dhcp6relay +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + +[group:dhcpmon] +programs=dhcpmon-Vlan1000 + +[program:dhcpmon-Vlan1000] +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + + diff --git a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf index 407ac2c80bc9..9d4a9d22de47 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/docker-dhcp-relay.supervisord.conf @@ -40,7 +40,8 @@ dependent_startup=true dependent_startup_wait_for=rsyslogd:running [group:dhcp-relay] -programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay +programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv4-relay-Vlan2000,dhcp6relay + [program:isc-dhcpv4-relay-Vlan1000] command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2 @@ -52,9 +53,19 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited +[program:isc-dhcpv4-relay-Vlan2000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan2000 -iu Vlan1000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.3 192.0.0.4 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -63,9 +74,8 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited - [group:dhcpmon] -programs=dhcpmon-Vlan1000 +programs=dhcpmon-Vlan1000,dhcpmon-Vlan2000 [program:dhcpmon-Vlan1000] command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 @@ -75,6 +85,16 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true -dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + +[program:dhcpmon-Vlan2000] +command=/usr/sbin/dhcpmon -id Vlan2000 -iu Vlan1000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan2000:running diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf new file mode 100644 index 000000000000..35ad0c48b82f --- /dev/null +++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay-no-ip-helper.supervisord.conf @@ -0,0 +1,80 @@ +[supervisord] +logfile_maxbytes=1MB +logfile_backups=2 +nodaemon=true + +[eventlistener:dependent-startup] +command=python3 -m supervisord_dependent_startup +autostart=true +autorestart=unexpected +startretries=0 +exitcodes=0,3 +events=PROCESS_STATE +buffer_size=1024 + +[eventlistener:supervisor-proc-exit-listener] +command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay +events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING +autostart=true +autorestart=unexpected +buffer_size=1024 + +[program:rsyslogd] +command=/usr/sbin/rsyslogd -n -iNONE +priority=1 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true + +[program:start] +command=/usr/bin/start.sh +priority=2 +autostart=false +autorestart=false +startsecs=0 +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=rsyslogd:running + +[group:dhcp-relay] +programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay + + +[program:isc-dhcpv4-relay-Vlan1000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + +[program:dhcp6relay] +command=/usr/sbin/dhcp6relay +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + +[group:dhcpmon] +programs=dhcpmon-Vlan1000 + +[program:dhcpmon-Vlan1000] +command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + + diff --git a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf index 5456409738e6..7ea29dfcd635 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/docker-dhcp-relay.supervisord.conf @@ -40,7 +40,8 @@ dependent_startup=true dependent_startup_wait_for=rsyslogd:running [group:dhcp-relay] -programs=isc-dhcpv4-relay-Vlan1000,dhcp6relay +programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv4-relay-Vlan2000,dhcp6relay + [program:isc-dhcpv4-relay-Vlan1000] command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2 @@ -52,9 +53,19 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited +[program:isc-dhcpv4-relay-Vlan2000] +command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan2000 -iu Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.3 192.0.0.4 +priority=3 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=start:exited + + [program:dhcp6relay] command=/usr/sbin/dhcp6relay - priority=3 autostart=false autorestart=false @@ -63,9 +74,8 @@ stderr_logfile=syslog dependent_startup=true dependent_startup_wait_for=start:exited - [group:dhcpmon] -programs=dhcpmon-Vlan1000 +programs=dhcpmon-Vlan1000,dhcpmon-Vlan2000 [program:dhcpmon-Vlan1000] command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 @@ -75,6 +85,16 @@ autorestart=false stdout_logfile=syslog stderr_logfile=syslog dependent_startup=true -dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running dhcp6relay:running +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running + +[program:dhcpmon-Vlan2000] +command=/usr/sbin/dhcpmon -id Vlan2000 -iu Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 +priority=4 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog +dependent_startup=true +dependent_startup_wait_for=isc-dhcpv4-relay-Vlan2000:running diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index c06cc708c1ce..88d325b09d1b 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -270,7 +270,8 @@ 0.0.0.0/0 - + 192.0.0.3;192.0.0.4 + fc02:2000::3;fc02:2000::4 2000 2000 192.168.200.0/27 diff --git a/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml b/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml new file mode 100644 index 000000000000..b02304a49e14 --- /dev/null +++ b/src/sonic-config-engine/tests/t0-sample-no-ip-helper-graph.xml @@ -0,0 +1,938 @@ + + + + + + switch-t0 + 10.1.0.32 + BGPMonitor + 10.20.30.40 + 30 + 10 + 3 + + + false + switch-t0 + 10.0.0.56 + ARISTA01T1 + 10.0.0.57 + 1 + 180 + 60 + + + switch-t0 + FC00::71 + ARISTA01T1 + FC00::72 + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.58 + ARISTA02T1 + 10.0.0.59 + 1 + 180 + 60 + + + switch-t0 + FC00::75 + ARISTA02T1 + FC00::76 + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.60 + ARISTA03T1 + 10.0.0.61 + 1 + 180 + 60 + + + switch-t0 + FC00::79 + ARISTA03T1 + FC00::7A + 1 + 180 + 60 + + + false + switch-t0 + 10.0.0.62 + ARISTA04T1 + 10.0.0.63 + 1 + 180 + 60 + + + switch-t0 + FC00::7D + ARISTA04T1 + FC00::7E + 1 + 180 + 60 + + + + + 1 + + BGPMonitor + + + BGPPeer +
10.1.0.32
+ + + +
+
+ +
+ + 65100 + switch-t0 + + +
10.0.0.57
+ + + +
+ +
10.0.0.59
+ + + +
+ +
10.0.0.61
+ + + +
+ +
10.0.0.63
+ + + +
+
+ +
+ + 64600 + ARISTA01T1 + + + + 64600 + ARISTA02T1 + + + + 64600 + ARISTA03T1 + + + + 64600 + ARISTA04T1 + + +
+
+ + + + + + HostIP + Loopback0 + + 10.1.0.32/32 + + 10.1.0.32/32 + + + HostIP1 + Loopback0 + + FC00:1::32/128 + + FC00:1::32/128 + + + LoopbackIP1 + Loopback1 + + 10.10.0.99/32 + + 10.10.0.99/32 + + + LoopbackIP2 + Loopback2 + + 10.21.0.64/32 + + 10.21.0.64/32 + + + LoopbackIP3 + Loopback3 + + 10.21.64.2/32 + + 10.21.64.2/32 + + + + + HostIP + eth0 + + 10.0.0.100/24 + + 10.0.0.100/24 + + + HostIP + eth0 + + 2603:10e2:0:2902::8/64 + + 2603:10e2:0:2902::8/64 + + + + + + + switch-t0 + + + PortChannel01 + fortyGigE0/112 + + + + PortChannel02 + fortyGigE0/116 + + + + PortChannel03 + fortyGigE0/120 + + + + PortChannel04 + fortyGigE0/124 + + + + + + Vlan1000 + fortyGigE0/4;fortyGigE0/8;fortyGigE0/12;fortyGigE0/16;fortyGigE0/20;fortyGigE0/24;fortyGigE0/28;fortyGigE0/32;fortyGigE0/36;fortyGigE0/40;fortyGigE0/44;fortyGigE0/48;fortyGigE0/52;fortyGigE0/56;fortyGigE0/60;fortyGigE0/64;fortyGigE0/68;fortyGigE0/72;fortyGigE0/76;fortyGigE0/80;fortyGigE0/84;fortyGigE0/88;fortyGigE0/92;fortyGigE0/96 + False + 0.0.0.0/0 + + + 192.0.0.1;192.0.0.2 + fc02:2000::1;fc02:2000::2 + 1000 + 1000 + 192.168.0.0/27 + + + + + Vlan2000 + fortyGigE0/112;fortyGigE0/116;fortyGigE0/120 + False + 0.0.0.0/0 + + + + + 2000 + 2000 + 192.168.200.0/27 + + + + + Vlan99 + fortyGigE0/100 + False + 0.0.0.0/0 + + UserDefinedL2Vlan + 192.0.0.1;192.0.0.2 + 99 + 99 + + + + + + Vlan98 + fortyGigE0/100;PortChannel01;PortChannel03 + False + 0.0.0.0/0 + + UserDefinedL2Vlan + 192.0.0.1;192.0.0.2 + 98 + 98 + + + + + + + + + PortChannel01 + 10.0.0.56/31 + + + + PortChannel01 + FC00::71/126 + + + + PortChannel02 + 10.0.0.58/31 + + + + PortChannel02 + FC00::75/126 + + + + PortChannel03 + 10.0.0.60/31 + + + + PortChannel03 + FC00::79/126 + + + + PortChannel04 + 10.0.0.62/31 + + + + PortChannel04 + FC00::7D/126 + + + + Vlan1000 + 192.168.0.1/27 + + + + Vlan2000 + 192.168.200.1/27 + + + + + + ERSPAN + everflow + Everflow + + + ERSPANv6 + everflowV6 + Everflow + + + EGRESS_ERSPAN + everflow_egress + Everflow + + + PortChannel01;PortChannel02;PortChannel03;PortChannel04 + DataAclIngress + DataPlane + + + PortChannel01;PortChannel02;Vlan98 + DataAclEgress + DataPlane + + + SNMP + SNMP_ACL + SNMP + + + NTP + NTP_ACL + NTP + + + SSH + SSH_ACL + SSH + + + SSH + ROUTER-PROTECT + SSH + + + SNMP + ROUTER-PROTECT + SNMP + + + NTP + NTP_ACL + + + + + + + + + + DeviceInterfaceLink + ARISTA01T1 + Ethernet1/1 + switch-t0 + fortyGigE0/112 + + + DeviceInterfaceLink + ARISTA02T1 + Ethernet1/1 + switch-t0 + fortyGigE0/116 + + + DeviceInterfaceLink + ARISTA03T1 + Ethernet1/1 + switch-t0 + fortyGigE0/120 + + + DeviceInterfaceLink + ARISTA04T1 + Ethernet1/1 + switch-t0 + fortyGigE0/124 + 100000 + + + DeviceInterfaceLink + 100000 + switch-t0 + fortyGigE0/4 + true + ARISTA05T1 + Ethernet1/33 + true + + + DeviceInterfaceLink + Servers0 + eth0 + switch-t0 + fortyGigE0/4 + + + DeviceInterfaceLink + Servers100 + eth0 + switch-t0 + fortyGigE0/100 + + + + + switch-t0 + Force10-S6000 + + + ARISTA01T1 + Arista + + + ARISTA02T1 + Arista + + + ARISTA03T1 + Arista + + + ARISTA04T1 + Arista + + + + + + + + DeviceInterface + + true + 1 + Ethernet0 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet8 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet12 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet16 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet20 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet24 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet28 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet32 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet36 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet40 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet44 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet48 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet52 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet56 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet60 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet64 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet68 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet72 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet76 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet80 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet84 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet88 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet92 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet96 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet100 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet104 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet108 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet112 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet116 + + false + 0 + 0 + 40000 + + + DeviceInterface + + true + 1 + Ethernet120 + + false + 0 + 0 + 40000 + + + Force10-S6000 + + + + + + + switch-t0 + + + ErspanDestinationIpv4 + + 2.2.2.2 + + + + + + + + + + + + + AutoNegotiation + + True + + + FECDisabled + + True + + + ARISTA05T1:Ethernet1/33;switch-t0:fortyGigE0/4 + + + + + + AutoNegotiation + + False + + + FECDisabled + + True + + + ARISTA06T1:Ethernet1/34;switch-t0:fortyGigE0/8 + + + + + + + switch-t0 + + + DeploymentId + + 1 + + + + + + + switch-t0 + Force10-S6000 +
diff --git a/src/sonic-config-engine/tests/test_j2files.py b/src/sonic-config-engine/tests/test_j2files.py index 0bc849656575..d6a214809c69 100644 --- a/src/sonic-config-engine/tests/test_j2files.py +++ b/src/sonic-config-engine/tests/test_j2files.py @@ -24,6 +24,7 @@ def setUp(self): self.multi_asic_minigraph = os.path.join(self.test_dir, 'multi_npu_data', 'sample-minigraph.xml') self.multi_asic_port_config = os.path.join(self.test_dir, 'multi_npu_data', 'sample_port_config-0.ini') self.radv_test_minigraph = os.path.join(self.test_dir, 'radv-test-sample-graph.xml') + self.no_ip_helper_minigraph = os.path.join(self.test_dir, 't0-sample-no-ip-helper-graph.xml') self.output_file = os.path.join(self.test_dir, 'output') os.environ["CFGGEN_UNIT_TESTING"] = "2" @@ -107,6 +108,12 @@ def test_dhcp_relay(self): self.run_script(argument) self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'docker-dhcp-relay.supervisord.conf'), self.output_file)) + # Test generation of docker-dhcp-relay.supervisord.conf when a vlan is missing ip/ipv6 helpers + template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-dhcp-relay', 'docker-dhcp-relay.supervisord.conf.j2') + argument = '-m ' + self.no_ip_helper_minigraph + ' -p ' + self.t0_port_config + ' -t ' + template_path + ' > ' + self.output_file + self.run_script(argument) + self.assertTrue(utils.cmp(os.path.join(self.test_dir, 'sample_output', utils.PYvX_DIR, 'docker-dhcp-relay-no-ip-helper.supervisord.conf'), self.output_file)) + def test_radv(self): # Test generation of radvd.conf with multiple ipv6 prefixes template_path = os.path.join(self.test_dir, '..', '..', '..', 'dockers', 'docker-router-advertiser', 'radvd.conf.j2') From 62c6fb2eabca7c36b592f020cb975286d17784a9 Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Thu, 25 Aug 2022 17:14:54 -0700 Subject: [PATCH 046/106] Update cisco-8000 submodule to v0.111 (#11835) Update cisco-8000 submodule to v0.111 drop --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index 39edd61f25e6..7327f59c4d95 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.107 +ref=202012-v0.111 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 047/106] [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 da70e218b7b1..0b4ee57fa9e7 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 a8d7da245960..31151b99f696 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 1b5ad59ac9df..ab8db0a0df70 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 1b5ad59ac9df..ab8db0a0df70 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 e22333a98bd9..06eb9bdc2c4d 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 debe56e88395..476ab6569fef 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 8b638e27a593..83bda16e5d92 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 e71149dad247..80a4396adaf4 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 87c8a5d16e7d..c44749bd76b1 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 456819069211..583032f524a1 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 f6389557e01f..86bba8faec64 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 ee93e3c615cc..005f34eaba73 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 7892d9233999..15e1145efac5 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 b6445f629357..b891abb29c8f 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 6bb93e7b15f4..691707dc8da8 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 b6445f629357..b891abb29c8f 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 66df5e12d018..e30005ad69e9 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 8f0adeed12e2..f8897af63372 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 fdf7ab9b15b9..4fcd3403440c 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 41d78ade9df5..9359a4fb15fe 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 048/106] [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 3c3384cec8d1..bd79561c70aa 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 049/106] [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 476ab6569fef..0a75d6d99f09 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 933f061ad6cf..b73b037c50c9 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 714e0de0a715..77895b42f41c 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 15e1145efac5..3d832de2a610 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 b891abb29c8f..7a060c49256a 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 b891abb29c8f..7a060c49256a 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 e30005ad69e9..9db16421eed4 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 f8897af63372..a559cd4126a6 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 4fcd3403440c..8516bf3e77b9 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 050/106] [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 f8ae8e7199a2..ee4857fe23f1 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 051/106] [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 62a53fe328fc..283906c407e0 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 24e32b16bb15..8e9a0f17db16 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 2c603dd722fa..98a3322bf334 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 d52b24cf905d..4f82136007a3 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 72f46653d51a..e14ce1ce4ddb 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 052/106] [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 dd405301f720..5b4482bc74c7 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 8ee7a6714b1e..5b4482bc74c7 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 053/106] [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 fb89310e616c..3925249ab504 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 054/106] 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 53cf5265ecde..3a41fe58bbe6 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 055/106] [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 3a41fe58bbe6..86d50737b1c5 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 056/106] [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 ee4857fe23f1..f336367cc524 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 057/106] [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 f8704c582b6b..cd2b13d0cf7c 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 058/106] [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 01e55081d875..815cb3495443 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 e84a90140a81..eedf59dd935d 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 059/106] [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 000000000000..2905747f5b04 --- /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 000000000000..c01aebb7ae12 --- /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 000000000000..f22c56702af5 --- /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 000000000000..b87050280529 --- /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 000000000000..b0df4defd449 --- /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 000000000000..4ec20f1d9e84 --- /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 000000000000..7b78fb98ae37 --- /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 000000000000..d64b66b0b691 --- /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 000000000000..eccf286dc879 --- /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 000000000000..d20b5e46b843 --- /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 000000000000..f5d49f8b86ab --- /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 060/106] [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 0b4ee57fa9e7..d85ae1de4391 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 0a75d6d99f09..fff02985866d 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 25282ee1643b..2a7a468a4783 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 583032f524a1..da2717612855 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 3d832de2a610..c7f34c908429 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 7a060c49256a..b9783271f47a 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 7a060c49256a..b9783271f47a 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 061/106] 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 4b9649280e3d..5faf6423107d 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 000000000000..ef1aa62fe82d --- /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 000000000000..d55e6b8e6ce4 --- /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 ce955ea86d05..9b618254f9b4 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 062/106] [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 f336367cc524..f8ae8e7199a2 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 063/106] [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 31151b99f696..7e5141986cc8 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 ab2b43ab082f..d1092513c883 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 da2717612855..7d32d2f08aad 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 60b9f31f8e4a..e16074ca518b 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 9359a4fb15fe..afa7e2a9326e 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 064/106] [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 b034f0cbdd40..839625df982d 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit b034f0cbdd400c3d854b29f554292f5e1124b7ad +Subproject commit 839625df982d164815a8c5fe77cbb6251c8a1442 From edc4485d3074ef7a778d32c2a7ef5488f6a33eb7 Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Wed, 7 Sep 2022 08:33:18 +0300 Subject: [PATCH 065/106] [202012][Mellanox] Update SDK/FW to version 4.5.2320/2010_2320 (#11975) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update SDK/FW version - 4.5.2320/2010_2320 in order to have the following fixes: • Spectrum-3 | PCI calibration changes from a static to a dynamic mechanism. • [VxLAN] TTL was set to 0 for non IP traffic (such as ARP) --- platform/mellanox/fw.mk | 6 +++--- platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers | 2 +- platform/mellanox/sdk.mk | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/mellanox/fw.mk b/platform/mellanox/fw.mk index 7d252de8851b..e7504aa1e91b 100644 --- a/platform/mellanox/fw.mk +++ b/platform/mellanox/fw.mk @@ -11,17 +11,17 @@ else FW_FROM_URL = n endif -MLNX_SPC_FW_VERSION = 13.2010.2318 +MLNX_SPC_FW_VERSION = 13.2010.2320 MLNX_SPC_FW_FILE = fw-SPC-rel-$(subst .,_,$(MLNX_SPC_FW_VERSION))-EVB.mfa $(MLNX_SPC_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC_FW_FILE) -MLNX_SPC2_FW_VERSION = 29.2010.2318 +MLNX_SPC2_FW_VERSION = 29.2010.2320 MLNX_SPC2_FW_FILE = fw-SPC2-rel-$(subst .,_,$(MLNX_SPC2_FW_VERSION))-EVB.mfa $(MLNX_SPC2_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC2_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC2_FW_FILE) -MLNX_SPC3_FW_VERSION = 30.2010.2318 +MLNX_SPC3_FW_VERSION = 30.2010.2320 MLNX_SPC3_FW_FILE = fw-SPC3-rel-$(subst .,_,$(MLNX_SPC3_FW_VERSION))-EVB.mfa $(MLNX_SPC3_FW_FILE)_PATH = $(MLNX_FW_BASE_PATH) $(MLNX_SPC3_FW_FILE)_URL = $(MLNX_FW_BASE_URL)/$(MLNX_SPC3_FW_FILE) diff --git a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers index 3e3db8705f81..5650c3519b55 160000 --- a/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers +++ b/platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers @@ -1 +1 @@ -Subproject commit 3e3db8705f81dbeba8312fcc022969337fcc51ad +Subproject commit 5650c3519b55051124810a4625f8269694b1e592 diff --git a/platform/mellanox/sdk.mk b/platform/mellanox/sdk.mk index a1603b870981..439a2e1328ec 100644 --- a/platform/mellanox/sdk.mk +++ b/platform/mellanox/sdk.mk @@ -1,6 +1,6 @@ MLNX_SDK_BASE_PATH = $(PLATFORM_PATH)/sdk-src/sx-kernel/Switch-SDK-drivers/bin/ MLNX_SDK_PKG_BASE_PATH = $(MLNX_SDK_BASE_PATH)/$(BLDENV)/$(CONFIGURED_ARCH)/ -MLNX_SDK_VERSION = 4.5.2318 +MLNX_SDK_VERSION = 4.5.2320 MLNX_SDK_ISSU_VERSION = 101 MLNX_SDK_DEB_VERSION = $(subst -,.,$(subst _,.,$(MLNX_SDK_VERSION))) From 37d34ddd349e0f115c806db801aa7d2269856269 Mon Sep 17 00:00:00 2001 From: Aravind Mani <53524901+aravindmani-1@users.noreply.github.com> Date: Wed, 7 Sep 2022 22:05:59 +0530 Subject: [PATCH 066/106] DellEMC Z9332f: Fix SFP issue (#11819) * Update sfp * Update sfp * Update sfp.py --- .../z9332f/sonic_platform/sfp.py | 95 +++++++++++++++---- 1 file changed, 75 insertions(+), 20 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py index a08667a8e71e..c0ee8bdb84f6 100644 --- a/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py +++ b/platform/broadcom/sonic-platform-modules-dell/z9332f/sonic_platform/sfp.py @@ -70,7 +70,7 @@ SFP_DOM_OFFSET = 256 SFP_STATUS_CONTROL_OFFSET = 110 -SFP_STATUS_CONTROL_WIDTH = 7 +SFP_STATUS_CONTROL_WIDTH = 1 SFP_TX_DISABLE_HARD_BIT = 7 SFP_TX_DISABLE_SOFT_BIT = 6 @@ -912,15 +912,14 @@ def get_rx_los(self): rx_los_list = [] try: if self.sfp_type == 'QSFP_DD': - offset = 512 + offset = 2176 rx_los_mask = [ 0x01, 0x02, 0x04, 0x08 ,0x10, 0x20, 0x40, 0x80 ] dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path, - offset + QSFP_DD_RXLOS_OFFSET, QSFP_DD_RXLOS_WIDTH) + offset + 147, 1) if dom_channel_monitor_raw is not None: rx_los_data = int(dom_channel_monitor_raw[0], 8) for mask in rx_los_mask: - rx_los_list.append(rx_los_data & mask != 0) - + rx_los_list.append(bool(rx_los_data & mask != 0)) elif self.sfp_type == 'QSFP': rx_los_data = self._get_eeprom_data('rx_los') # As the function expects a single boolean, if any one channel experience LOS, @@ -962,13 +961,19 @@ def get_tx_disable(self): tx_disable_list = [] try: if self.sfp_type == 'QSFP_DD': - return False + dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path,2048 + 130, 1) + if dom_channel_monitor_raw is not None: + tx_disable_data = int(dom_channel_monitor_raw[0], 16) + for i in range(8): + tx_disable_list.append(bool(tx_disable_data & (1 << i) != 0)) + elif self.sfp_type == 'QSFP': tx_disable_data = self._get_eeprom_data('tx_disable') for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'): tx_disable_list.append(tx_disable_data['data'][tx_disable_id]['value'] == 'On') else: - tx_disable_data = self._read_eeprom_bytes(self.eeprom_path, SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH) + offset = 256 + tx_disable_data = self._read_eeprom_bytes(self.eeprom_path, offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH) data = int(tx_disable_data[0], 16) tx_disable_hard = (sffbase().test_bit(data, SFP_TX_DISABLE_HARD_BIT) != 0) tx_disable_soft = (sffbase().test_bit(data, SFP_TX_DISABLE_SOFT_BIT) != 0) @@ -977,19 +982,41 @@ def get_tx_disable(self): return 'N/A' return tx_disable_list + def tx_disable(self, tx_disable): + if self.sfp_type == 'QSFP_DD': + val = 0xff if tx_disable else 0x0 + return self._write_eeprom_bytes(2048 + 130, 1, bytearray([val])) + + elif self.sfp_type == 'QSFP': + val = 0xf if tx_disable else 0x0 + return self._write_eeprom_bytes( 0 + 86, 1, bytearray([val])) + + else: + offset = 256 + if tx_disable is True: + val = 64 + else: + val = 191 + return self._write_eeprom_bytes(offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH, bytearray([val])) + def get_tx_disable_channel(self): """ Retrieves the TX disabled channels in this SFP """ - tx_disable_channel = 0 + tx_disable_channel = None try: if self.sfp_type == 'QSFP_DD': - tx_disable_channel = 0 + offset = 2048 + dom_channel_monitor_raw = self._read_eeprom_bytes(self.eeprom_path, offset + 130, 1) + if dom_channel_monitor_raw is not None: + tx_disable_channel = int(dom_channel_monitor_raw[0], 16) elif self.sfp_type == 'QSFP': tx_disable_data = self._get_eeprom_data('tx_disable') for tx_disable_id in ('Tx1Disable', 'Tx2Disable', 'Tx3Disable', 'Tx4Disable'): tx_disable_channel <<= 1 tx_disable_channel |= (tx_disable_data['data']['Tx1Disable']['value'] == 'On') + else: + tx_disable_channel = int(self.get_tx_disable()[0]) except (TypeError, ValueError): return 'N/A' return tx_disable_channel @@ -1091,7 +1118,7 @@ def get_tx_bias(self): return None if not self.qsfp_dd_txbias_supported: for lane in range(0, 8): - tx_bias_list.append("N/A") + tx_bias_list.append(False) return tx_bias_list tx_bias_data_raw = self._read_eeprom_bytes(self.eeprom_path, offset + QSFP_DD_TXBIAS_OFFSET, QSFP_DD_TXBIAS_WIDTH) @@ -1128,7 +1155,7 @@ def get_rx_power(self): return None if not self.qsfp_dd_rxpower_supported: for lane in range(0, 8): - rx_power_list.append("N/A") + rx_power_list.append(False) return rx_power_list offset = QSFP_DD_PAGE17 @@ -1165,7 +1192,7 @@ def get_tx_power(self): return None if not self.qsfp_dd_txpower_supported: for lane in range(0, 8): - tx_power_list.append("N/A") + tx_power_list.append(False) return tx_power_list offset = QSFP_DD_PAGE17 @@ -1293,17 +1320,45 @@ def get_intl_state(self): except ValueError: pass return intl_state - def tx_disable(self, tx_disable): - """ - Disable SFP TX for all channels - """ - return False - def tx_disable_channel(self, channel, disable): """ - Sets the tx_disable for specified SFP channels + Enables/Disables TX channel for SFP based on disable flag """ - return False + channel_state = self.get_tx_disable_channel() + if channel_state is None or channel_state == 'N/A': + return False + if self.sfp_type == 'QSFP_DD': + for i in range(8): + mask = (1 << i) + if not (channel & mask): + continue + if disable: + channel_state |= mask + else: + channel_state &= ~mask + return self._write_eeprom_bytes(2048 + 130, 1, bytearray([channel_state])) + elif self.sfp_type == 'QSFP': + for i in range(4): + mask = (1 << i) + if not (channel & mask): + continue + if disable: + channel_state |= mask + else: + channel_state &= ~mask + return self._write_eeprom_bytes(86, 1, bytearray([channel_state])) + else: + channel_state = self.get_tx_disable_channel() + if channel_state is None or channel_state == "N/A": + return False + offset = 256 + mask = (1 << 0) + if disable: + channel_state |= mask + else: + channel_state &= ~mask + + return self._write_eeprom_bytes(offset + SFP_STATUS_CONTROL_OFFSET, SFP_STATUS_CONTROL_WIDTH, bytearray([channel_state])) def set_power_override(self, power_override, power_set): """ From d8c405bf89030b64425a91087acd7f5efd7fbbf6 Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Wed, 7 Sep 2022 18:11:29 -0700 Subject: [PATCH 067/106] Update cisco-8000 submodule to v0.112 (#11983) Update cisco-8000 submodule to v0.112 --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index 7327f59c4d95..2e81a9d5ad89 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.111 +ref=202012-v0.112 From f3443cbb97975e41851fb4424c7f1aca09599eb0 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Thu, 8 Sep 2022 15:54:24 +0800 Subject: [PATCH 068/106] [submodules] Update submodule sonic-gnmi HEAD pointer (#11933) --- .gitmodules | 2 +- src/sonic-telemetry | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index dd4d89d90b19..2d6500476739 100644 --- a/.gitmodules +++ b/.gitmodules @@ -72,7 +72,7 @@ url = https://github.com/Azure/sonic-mgmt-framework [submodule "src/sonic-telemetry"] path = src/sonic-telemetry - url = https://github.com/Azure/sonic-telemetry + url = https://github.com/sonic-net/sonic-gnmi [submodule "Switch-SDK-drivers"] path = platform/mellanox/sdk-src/sx-kernel/Switch-SDK-drivers url = https://github.com/Mellanox/Switch-SDK-drivers diff --git a/src/sonic-telemetry b/src/sonic-telemetry index c6063887bc4a..9897246795ed 160000 --- a/src/sonic-telemetry +++ b/src/sonic-telemetry @@ -1 +1 @@ -Subproject commit c6063887bc4a67ed3e40979b47f1b8e5caab6271 +Subproject commit 9897246795ed3ba3fde26a49ff64ff1d03b8dcc9 From 9db2e21c69f236c03976b39038fb9cd7ab746e5c Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Thu, 8 Sep 2022 08:00:40 -0700 Subject: [PATCH 069/106] [202012] Change dhcp6relay to be a submodule (#11922) * Add dhcprelay submodule --- .gitmodules | 7 + rules/dhcp6relay.dep | 9 - rules/dhcp6relay.mk | 12 - rules/dhcprelay.dep | 11 + rules/dhcprelay.mk | 12 + rules/docker-dhcp-relay.mk | 4 +- src/dhcp6relay/.gitignore | 5 - src/dhcp6relay/Makefile | 42 -- src/dhcp6relay/debian/changelog | 5 - src/dhcp6relay/debian/compat | 1 - src/dhcp6relay/debian/control | 17 - src/dhcp6relay/debian/rules | 6 - src/dhcp6relay/src/configInterface.cpp | 152 ----- src/dhcp6relay/src/configInterface.h | 75 --- src/dhcp6relay/src/main.cpp | 18 - src/dhcp6relay/src/relay.cpp | 861 ------------------------- src/dhcp6relay/src/relay.h | 358 ---------- src/dhcp6relay/src/subdir.mk | 23 - src/dhcprelay | 1 + 19 files changed, 33 insertions(+), 1586 deletions(-) delete mode 100644 rules/dhcp6relay.dep delete mode 100644 rules/dhcp6relay.mk create mode 100644 rules/dhcprelay.dep create mode 100644 rules/dhcprelay.mk delete mode 100644 src/dhcp6relay/.gitignore delete mode 100644 src/dhcp6relay/Makefile delete mode 100644 src/dhcp6relay/debian/changelog delete mode 100644 src/dhcp6relay/debian/compat delete mode 100644 src/dhcp6relay/debian/control delete mode 100755 src/dhcp6relay/debian/rules delete mode 100644 src/dhcp6relay/src/configInterface.cpp delete mode 100644 src/dhcp6relay/src/configInterface.h delete mode 100644 src/dhcp6relay/src/main.cpp delete mode 100644 src/dhcp6relay/src/relay.cpp delete mode 100644 src/dhcp6relay/src/relay.h delete mode 100644 src/dhcp6relay/src/subdir.mk create mode 160000 src/dhcprelay diff --git a/.gitmodules b/.gitmodules index 2d6500476739..d7f23984dbea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,3 +90,10 @@ path = src/linkmgrd url = https://github.com/Azure/sonic-linkmgrd.git branch = 202012 +[submodule "src/dhcprelay"] + path = src/dhcprelay + url = https://github.com/sonic-net/sonic-dhcp-relay.git + branch = 202012 +[submodule "sonic-dhcp-relay"] + path = sonic-dhcp-relay + url = https://github.com/kellyyeh/sonic-dhcp-relay.git diff --git a/rules/dhcp6relay.dep b/rules/dhcp6relay.dep deleted file mode 100644 index be82d326fe21..000000000000 --- a/rules/dhcp6relay.dep +++ /dev/null @@ -1,9 +0,0 @@ - -SPATH := $($(SONIC_DHCP6RELAY)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcp6relay.mk rules/dhcp6relay.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(SPATH)) - -$(SONIC_DHCP6RELAY)_CACHE_MODE := GIT_CONTENT_SHA -$(SONIC_DHCP6RELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_DHCP6RELAY)_DEP_FILES := $(DEP_FILES) diff --git a/rules/dhcp6relay.mk b/rules/dhcp6relay.mk deleted file mode 100644 index 204bf6fa34dd..000000000000 --- a/rules/dhcp6relay.mk +++ /dev/null @@ -1,12 +0,0 @@ -# SONiC DHCPV6 RELAY Package - -SONIC_DHCP6RELAY_VERSION = 1.0.0-0 -SONIC_DHCP6RELAY_PKG_NAME = dhcp6relay - -SONIC_DHCP6RELAY = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(SONIC_DHCP6RELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) -$(SONIC_DHCP6RELAY)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCP6RELAY_PKG_NAME) -SONIC_DPKG_DEBS += $(SONIC_DHCP6RELAY) - -SONIC_DHCP6RELAY_DBG = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)-dbgsym_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(SONIC_DHCP6RELAY),$(SONIC_DHCP6RELAY_DBG))) diff --git a/rules/dhcprelay.dep b/rules/dhcprelay.dep new file mode 100644 index 000000000000..5f6d77a84fc3 --- /dev/null +++ b/rules/dhcprelay.dep @@ -0,0 +1,11 @@ + +SPATH := $($(SONIC_DHCPRELAY)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcprelay.mk rules/dhcprelay.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_DHCPRELAY)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_DHCPRELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_DHCPRELAY)_DEP_FILES := $(DEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_PATHS := $(SPATH) diff --git a/rules/dhcprelay.mk b/rules/dhcprelay.mk new file mode 100644 index 000000000000..0a32d7d54297 --- /dev/null +++ b/rules/dhcprelay.mk @@ -0,0 +1,12 @@ +# SONiC DHCPV6 RELAY Package + +SONIC_DHCPRELAY_VERSION = 1.0.0-0 +SONIC_DHCPRELAY_PKG_NAME = dhcp6relay + +SONIC_DHCPRELAY = sonic-$(SONIC_DHCPRELAY_PKG_NAME)_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCPRELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) +$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay +SONIC_DPKG_DEBS += $(SONIC_DHCPRELAY) + +SONIC_DHCPRELAY_DBG = sonic-$(SONIC_DHCPRELAY_PKG_NAME)-dbgsym_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(SONIC_DHCPRELAY),$(SONIC_DHCPRELAY_DBG))) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 2ade8d641a02..3ecfb5195e2b 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -6,10 +6,10 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM) -$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON) +$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCPRELAY) $(LIBSWSSCOMMON) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCP6RELAY_DBG) $(SONIC_DHCPMON_DBG) +$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCPRELAY_DBG) $(SONIC_DHCPMON_DBG) $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/src/dhcp6relay/.gitignore b/src/dhcp6relay/.gitignore deleted file mode 100644 index 9d09ae6b3f1a..000000000000 --- a/src/dhcp6relay/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -debian/* -!debian/changelog -!debian/compat -!debian/control -!debian/rules diff --git a/src/dhcp6relay/Makefile b/src/dhcp6relay/Makefile deleted file mode 100644 index dd384452a5fc..000000000000 --- a/src/dhcp6relay/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -RM := rm -rf -DHCP6RELAY_TARGET := dhcp6relay -CP := cp -MKDIR := mkdir -CC := g++ -MV := mv -LIBS := -levent -lhiredis -lswsscommon -pthread -lboost_thread -lboost_system -CFLAGS += -Wall -std=c++17 -fPIE -I$(PWD)/../sonic-swss-common/common -PWD := $(shell pwd) - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) $(OBJS) -endif -endif - --include src/subdir.mk - -all: sonic-dhcp6relay - -sonic-dhcp6relay: $(OBJS) - @echo 'Building target: $@' - @echo 'Invoking: G++ Linker' - $(CC) $(LDFLAGS) -o $(DHCP6RELAY_TARGET) $(OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -install: - $(MKDIR) -p $(DESTDIR)/usr/sbin - $(MV) $(DHCP6RELAY_TARGET) $(DESTDIR)/usr/sbin - -deinstall: - $(RM) $(DESTDIR)/usr/sbin/$(DHCP6RELAY_TARGET) - $(RM) -rf $(DESTDIR)/usr/sbin - -clean: - -$(RM) $(EXECUTABLES) $(C_DEPS) $(OBJS) $(DHCP6RELAY_TARGET) - -@echo ' ' - -.PHONY: all clean dependents - - diff --git a/src/dhcp6relay/debian/changelog b/src/dhcp6relay/debian/changelog deleted file mode 100644 index 67ed277049e5..000000000000 --- a/src/dhcp6relay/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -sonic-dhcp6relay (1.0.0-0) UNRELEASED; urgency=medium - - * Initial release. - --- Kelly Yeh diff --git a/src/dhcp6relay/debian/compat b/src/dhcp6relay/debian/compat deleted file mode 100644 index ec635144f600..000000000000 --- a/src/dhcp6relay/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/src/dhcp6relay/debian/control b/src/dhcp6relay/debian/control deleted file mode 100644 index 31fdb6f41f3b..000000000000 --- a/src/dhcp6relay/debian/control +++ /dev/null @@ -1,17 +0,0 @@ -Source: sonic-dhcp6relay -Section: devel -Priority: optional -Maintainer: Kelly Yeh -Build-Depends: debhelper (>= 8.0.0), - dh-systemd -Standards-Version: 3.9.3 -Homepage: https://github.com/Azure/sonic-buildimage -XS-Go-Import-Path: github.com/Azure/sonic-buildimage - -Package: sonic-dhcp6relay -Architecture: any -Built-Using: ${misc:Built-Using} -Depends: libevent-2.1-6, - libboost-thread1.71.0, - libboost-system1.71.0 -Description: SONiC DHCPv6 Relay diff --git a/src/dhcp6relay/debian/rules b/src/dhcp6relay/debian/rules deleted file mode 100755 index ac2cd63889ef..000000000000 --- a/src/dhcp6relay/debian/rules +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/make -f - -export DEB_BUILD_MAINT_OPTIONS=hardening=+all - -%: - dh $@ --parallel diff --git a/src/dhcp6relay/src/configInterface.cpp b/src/dhcp6relay/src/configInterface.cpp deleted file mode 100644 index ca78d80e63da..000000000000 --- a/src/dhcp6relay/src/configInterface.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include -#include -#include "configInterface.h" - -constexpr auto DEFAULT_TIMEOUT_MSEC = 1000; - -bool pollSwssNotifcation = true; -std::shared_ptr mSwssThreadPtr; - -std::shared_ptr configDbPtr = std::make_shared ("CONFIG_DB", 0); -swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY"); -swss::Select swssSelect; - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans) -{ - try { - swssSelect.addSelectable(&ipHelpersTable); - get_dhcp(vlans); - mSwssThreadPtr = std::make_shared (&handleSwssNotification, vlans); - } - catch (const std::bad_alloc &e) { - syslog(LOG_ERR, "Failed allocate memory. Exception details: %s", e.what()); - } -} - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss() -{ - stopSwssNotificationPoll(); - mSwssThreadPtr->interrupt(); -} - - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan table information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans) { - swss::Selectable *selectable; - int ret = swssSelect.select(&selectable, DEFAULT_TIMEOUT_MSEC); - if (ret == swss::Select::ERROR) { - syslog(LOG_WARNING, "Select: returned ERROR"); - } else if (ret == swss::Select::TIMEOUT) { - } - if (selectable == static_cast (&ipHelpersTable)) { - handleRelayNotification(ipHelpersTable, vlans); - } -} -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans) -{ - while (pollSwssNotifcation) { - get_dhcp(vlans); - } -} - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) -{ - std::deque entries; - - ipHelpersTable.pops(entries); - processRelayNotification(entries, vlans); -} - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans) -{ - std::vector servers; - - for (auto &entry: entries) { - std::string vlan = kfvKey(entry); - std::string operation = kfvOp(entry); - std::vector fieldValues = kfvFieldsValues(entry); - - relay_config intf; - intf.is_option_79 = true; - intf.interface = vlan; - intf.db = nullptr; - for (auto &fieldValue: fieldValues) { - std::string f = fvField(fieldValue); - std::string v = fvValue(fieldValue); - if(f == "dhcpv6_servers") { - std::stringstream ss(v); - while (ss.good()) { - std::string substr; - getline(ss, substr, ','); - intf.servers.push_back(substr); - } - syslog(LOG_DEBUG, "key: %s, Operation: %s, f: %s, v: %s", vlan.c_str(), operation.c_str(), f.c_str(), v.c_str()); - } - if(f == "dhcpv6_option|rfc6939_support" && v == "false") { - intf.is_option_79 = false; - } - } - vlans->push_back(intf); - } -} - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll() { - pollSwssNotifcation = false; -}; diff --git a/src/dhcp6relay/src/configInterface.h b/src/dhcp6relay/src/configInterface.h deleted file mode 100644 index 20b0912c5cef..000000000000 --- a/src/dhcp6relay/src/configInterface.h +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include "subscriberstatetable.h" -#include "select.h" -#include "relay.h" - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans); - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss(); - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans); - -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans); - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &configMuxTable, std::vector *vlans); - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans); - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll(); diff --git a/src/dhcp6relay/src/main.cpp b/src/dhcp6relay/src/main.cpp deleted file mode 100644 index 9f5bc74bcfa0..000000000000 --- a/src/dhcp6relay/src/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include "configInterface.h" - -int main(int argc, char *argv[]) { - try { - std::vector vlans; - swss::DBConnector state_db("STATE_DB", 0); - initialize_swss(&vlans); - loop_relay(&vlans, &state_db); - } - catch (std::exception &e) - { - syslog(LOG_ERR, "An exception occurred.\n"); - return 1; - } - return 0; -} diff --git a/src/dhcp6relay/src/relay.cpp b/src/dhcp6relay/src/relay.cpp deleted file mode 100644 index 08cec458c74d..000000000000 --- a/src/dhcp6relay/src/relay.cpp +++ /dev/null @@ -1,861 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "configdb.h" -#include "sonicv2connector.h" -#include "dbconnector.h" -#include "configInterface.h" - - -struct event *listen_event; -struct event *server_listen_event; -struct event_base *base; -struct event *ev_sigint; -struct event *ev_sigterm; -static std::string counter_table = "DHCPv6_COUNTER_TABLE|"; - -/* DHCPv6 filter */ -/* sudo tcpdump -dd "ip6 dst ff02::1:2 && udp dst port 547" */ - -static struct sock_filter ether_relay_filter[] = { - - { 0x28, 0, 0, 0x0000000c }, - { 0x15, 0, 13, 0x000086dd }, - { 0x20, 0, 0, 0x00000026 }, - { 0x15, 0, 11, 0xff020000 }, - { 0x20, 0, 0, 0x0000002a }, - { 0x15, 0, 9, 0x00000000 }, - { 0x20, 0, 0, 0x0000002e }, - { 0x15, 0, 7, 0x00000000 }, - { 0x20, 0, 0, 0x00000032 }, - { 0x15, 0, 5, 0x00010002 }, - { 0x30, 0, 0, 0x00000014 }, - { 0x15, 0, 3, 0x00000011 }, - { 0x28, 0, 0, 0x00000038 }, - { 0x15, 0, 1, 0x00000223 }, - { 0x6, 0, 0, 0x00040000 }, - { 0x6, 0, 0, 0x00000000 }, -}; -const struct sock_fprog ether_relay_fprog = { - lengthof(ether_relay_filter), - ether_relay_filter -}; - -/* DHCPv6 Counter */ -uint64_t counters[DHCPv6_MESSAGE_TYPE_COUNT]; -std::map counterMap = {{DHCPv6_MESSAGE_TYPE_UNKNOWN, "Unknown"}, - {DHCPv6_MESSAGE_TYPE_SOLICIT, "Solicit"}, - {DHCPv6_MESSAGE_TYPE_ADVERTISE, "Advertise"}, - {DHCPv6_MESSAGE_TYPE_REQUEST, "Request"}, - {DHCPv6_MESSAGE_TYPE_CONFIRM, "Confirm"}, - {DHCPv6_MESSAGE_TYPE_RENEW, "Renew"}, - {DHCPv6_MESSAGE_TYPE_REBIND, "Rebind"}, - {DHCPv6_MESSAGE_TYPE_REPLY, "Reply"}, - {DHCPv6_MESSAGE_TYPE_RELEASE, "Release"}, - {DHCPv6_MESSAGE_TYPE_DECLINE, "Decline"}, - {DHCPv6_MESSAGE_TYPE_RECONFIGURE, "Reconfigure"}, - {DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST, "Information-Request"}, - {DHCPv6_MESSAGE_TYPE_RELAY_FORW, "Relay-Forward"}, - {DHCPv6_MESSAGE_TYPE_RELAY_REPL, "Relay-Reply"}, - {DHCPv6_MESSAGE_TYPE_MALFORMED, "Malformed"}}; - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan) { - db->hset(counterVlan, "Unknown", toString(counters[DHCPv6_MESSAGE_TYPE_UNKNOWN])); - db->hset(counterVlan, "Solicit", toString(counters[DHCPv6_MESSAGE_TYPE_SOLICIT])); - db->hset(counterVlan, "Advertise", toString(counters[DHCPv6_MESSAGE_TYPE_ADVERTISE])); - db->hset(counterVlan, "Request", toString(counters[DHCPv6_MESSAGE_TYPE_REQUEST])); - db->hset(counterVlan, "Confirm", toString(counters[DHCPv6_MESSAGE_TYPE_CONFIRM])); - db->hset(counterVlan, "Renew", toString(counters[DHCPv6_MESSAGE_TYPE_RENEW])); - db->hset(counterVlan, "Rebind", toString(counters[DHCPv6_MESSAGE_TYPE_REBIND])); - db->hset(counterVlan, "Reply", toString(counters[DHCPv6_MESSAGE_TYPE_REPLY])); - db->hset(counterVlan, "Release", toString(counters[DHCPv6_MESSAGE_TYPE_RELEASE])); - db->hset(counterVlan, "Decline", toString(counters[DHCPv6_MESSAGE_TYPE_DECLINE])); - db->hset(counterVlan, "Reconfigure", toString(counters[DHCPv6_MESSAGE_TYPE_RECONFIGURE])); - db->hset(counterVlan, "Information-Request", toString(counters[DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST])); - db->hset(counterVlan, "Relay-Forward", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_FORW])); - db->hset(counterVlan, "Relay-Reply", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_REPL])); - db->hset(counterVlan, "Malformed", toString(counters[DHCPv6_MESSAGE_TYPE_MALFORMED])); -} - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type) { - db->hset(counterVlan, counterMap.find(msg_type)->second, toString(counters[msg_type])); -} - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count) { - std::stringstream ss; - ss << count; - std::string countValue = ss.str(); - return countValue; -} - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ether_header); - return (const struct ether_header *)buffer; -} - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ip6_hdr); - return (struct ip6_hdr *)buffer; -} - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct udphdr); - return (const struct udphdr *)buffer; -} - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer) { - return (const struct dhcpv6_msg *)buffer; -} - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer) { - return (const struct dhcpv6_relay_msg *)buffer; -} - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end) { - auto option = (const struct dhcpv6_option *)buffer; - uint8_t size = 4; // option-code + option-len - size += *(uint16_t *)(buffer); - (*out_end) = buffer + size + ntohs(option->option_length); - - return option; -} - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type) { - std::string counterVlan = counter_table; - if(sendto(sock, buffer, n, 0, (const struct sockaddr *)&target, sizeof(target)) == -1) - syslog(LOG_ERR, "sendto: Failed to send to target address\n"); - else if (counterMap.find(msg_type) != counterMap.end()) { - counters[msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg_type); - } else { - syslog(LOG_WARNING, "unexpected message type %d(0x%x)\n", msg_type, msg_type); - } -} - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length) { - struct dhcpv6_option option; - option.option_code = htons(OPTION_RELAY_MSG); - option.option_length = htons(msg_length); - memcpy(buffer, &option, sizeof(struct dhcpv6_option)); - memcpy(buffer + sizeof(struct dhcpv6_option), msg, msg_length); -} - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog) -{ - if (!ifindex) { - errno = EINVAL; - return -1; - } - - int s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); - if (s == -1) { - syslog(LOG_ERR, "socket: Failed to create socket\n"); - return -1; - } - - struct sockaddr_ll sll = { - .sll_family = AF_PACKET, - .sll_protocol = htons(ETH_P_ALL), - .sll_ifindex = ifindex - }; - - if (bind(s, (struct sockaddr *)&sll, sizeof sll) == -1) { - syslog(LOG_ERR, "bind: Failed to bind to specified interface\n"); - (void) close(s); - return -1; - } - - if (fprog && setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, fprog, sizeof *fprog) == -1) - { - syslog(LOG_ERR, "setsockopt: Failed to attach filter\n"); - (void) close(s); - return -1; - } - - return s; -} - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 non_link_local; - sockaddr_in6 link_local; - - interface_config->local_sock = *local_sock; - interface_config->filter = filter; - - for(auto server: interface_config->servers) { - sockaddr_in6 tmp; - if(inet_pton(AF_INET6, server.c_str(), &tmp.sin6_addr) != 1) - { - syslog(LOG_WARNING, "inet_pton: Failed to convert IPv6 address\n"); - } - tmp.sin6_family = AF_INET6; - tmp.sin6_flowinfo = 0; - tmp.sin6_port = htons(RELAY_PORT); - tmp.sin6_scope_id = 0; - interface_config->servers_sock.push_back(tmp); - } - - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces\n"); - exit(1); - } - - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && ifa_tmp->ifa_addr->sa_family == AF_INET6) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && !IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - non_link_local = *in6; - break; - } - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - link_local = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - - if(!IN6_IS_ADDR_LINKLOCAL(&non_link_local.sin6_addr)) { - interface_config->link_address = non_link_local; - } - else { - interface_config->link_address = link_local; - } -} - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 addr; - sockaddr_in6 ll_addr; - memset(&addr, 0, sizeof(addr)); - memset(&ll_addr, 0, sizeof(ll_addr)); - - if ((*local_sock = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - if ((*server_sock= socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - int retry = 0; - bool bind_addr = false; - bool bind_ll_addr = false; - do { - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces with %s\n", strerror(errno)); - } - else { - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && (ifa_tmp->ifa_addr->sa_family == AF_INET6) && (strcmp(ifa_tmp->ifa_name, config->interface.c_str()) == 0)) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if(!IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - addr = *in6; - } - if(IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_ll_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - ll_addr = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - } - - if (bind_addr && bind_ll_addr) { - break; - } - - syslog(LOG_WARNING, "Retry #%d to bind to sockets on interface %s\n", ++retry, config->interface.c_str()); - sleep(5); - } while (retry < 6); - - if ((!bind_addr) || (bind(*local_sock, (sockaddr *)&addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to global ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } - - if ((!bind_ll_addr) || (bind(*server_sock, (sockaddr *)&ll_addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to link local ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } -} - - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config) { - static uint8_t buffer[4096]; - auto current_buffer_position = buffer; - dhcpv6_relay_msg new_message; - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = 0; - - memcpy(&new_message.link_address, &config->link_address.sin6_addr, sizeof(in6_addr)); - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - if(config->is_option_79) { - linklayer_addr_option option79; - option79.link_layer_type = htons(1); - option79.option_code = htons(OPTION_CLIENT_LINKLAYER_ADDR); - option79.option_length = htons(2 + 6); // link_layer_type field + address - - memcpy(current_buffer_position, &option79, sizeof(linklayer_addr_option)); - current_buffer_position += sizeof(linklayer_addr_option); - - memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost)); - current_buffer_position += sizeof(ether_hdr->ether_shost); - } - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) { - static uint8_t buffer[4096]; - dhcpv6_relay_msg new_message; - auto current_buffer_position = buffer; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - - if (dhcp_relay_header->hop_count >= HOP_LIMIT) - return; - - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = dhcp_relay_header->hop_count + 1; - - memset(&new_message.link_address, 0, sizeof(in6_addr)); - - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ - void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *config) { - static uint8_t buffer[4096]; - uint8_t type = 0; - struct sockaddr_in6 target_addr; - auto current_buffer_position = buffer; - auto current_position = msg; - const uint8_t *tmp = NULL; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - current_position += sizeof(struct dhcpv6_relay_msg); - - auto position = current_position + sizeof(struct dhcpv6_option); - auto dhcpv6msg = parse_dhcpv6_hdr(position); - - while ((current_position - msg) < len) { - auto option = parse_dhcpv6_opt(current_position, &tmp); - current_position = tmp; - if (current_position - msg > len || ntohs(option->option_length) > sizeof(buffer) - (current_buffer_position - buffer)) { - break; - } - switch (ntohs(option->option_code)) { - case OPTION_RELAY_MSG: - memcpy(current_buffer_position, ((uint8_t *)option) + sizeof(struct dhcpv6_option), ntohs(option->option_length)); - current_buffer_position += ntohs(option->option_length); - type = dhcpv6msg->msg_type; - break; - default: - break; - } - } - - memcpy(&target_addr.sin6_addr, &dhcp_relay_header->peer_address, sizeof(struct in6_addr)); - target_addr.sin6_family = AF_INET6; - target_addr.sin6_flowinfo = 0; - target_addr.sin6_port = htons(CLIENT_PORT); - target_addr.sin6_scope_id = if_nametoindex(config->interface.c_str()); - - send_udp(sock, buffer, target_addr, current_buffer_position - buffer, config, type); -} - - -/** - * @code callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the filter socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - static uint8_t message_buffer[4096]; - std::string counterVlan = counter_table; - int32_t len = recv(config->filter, message_buffer, 4096, 0); - if (len <= 0) { - syslog(LOG_WARNING, "recv: Failed to receive data at filter socket: %s\n", strerror(errno)); - return; - } - - char* ptr = (char *)message_buffer; - const uint8_t *current_position = (uint8_t *)ptr; - const uint8_t *tmp = NULL; - const uint8_t *prev = NULL; - - auto ether_header = parse_ether_frame(current_position, &tmp); - current_position = tmp; - - auto ip_header = parse_ip6_hdr(current_position, &tmp); - current_position = tmp; - - prev = current_position; - if (ip_header->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_UDP) { - const struct ip6_ext *ext_header; - do { - ext_header = (const struct ip6_ext *)current_position; - current_position += ext_header->ip6e_len; - if((current_position == prev) || (current_position >= (uint8_t *)ptr + sizeof(message_buffer))) { - return; - } - prev = current_position; - } - while (ext_header->ip6e_nxt != IPPROTO_UDP); - } - - auto udp_header = parse_udp(current_position, &tmp); - current_position = tmp; - - auto msg = parse_dhcpv6_hdr(current_position); - auto option_position = current_position + sizeof(struct dhcpv6_msg); - - switch (msg->msg_type) { - case DHCPv6_MESSAGE_TYPE_RELAY_FORW: - { - relay_relay_forw(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, config); - break; - } - case DHCPv6_MESSAGE_TYPE_SOLICIT: - case DHCPv6_MESSAGE_TYPE_REQUEST: - case DHCPv6_MESSAGE_TYPE_CONFIRM: - case DHCPv6_MESSAGE_TYPE_RENEW: - case DHCPv6_MESSAGE_TYPE_REBIND: - case DHCPv6_MESSAGE_TYPE_RELEASE: - case DHCPv6_MESSAGE_TYPE_DECLINE: - case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST: - { - while (option_position - message_buffer < len) { - auto option = parse_dhcpv6_opt(option_position, &tmp); - option_position = tmp; - if (ntohs(option->option_code) > DHCPv6_OPTION_LIMIT) { - counters[DHCPv6_MESSAGE_TYPE_MALFORMED]++; - update_counter(config->db, counterVlan.append(config->interface), DHCPv6_MESSAGE_TYPE_MALFORMED); - syslog(LOG_WARNING, "DHCPv6 option is invalid or contains malformed payload\n"); - return; - } - } - counters[msg->msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - relay_client(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, ether_header, config); - break; - } - default: - { - syslog(LOG_WARNING, "DHCPv6 client message received was not relayed\n"); - break; - } - } -} - -/** - * @code void server_callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the server socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void server_callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - sockaddr_in6 from; - socklen_t len = sizeof(from); - int32_t data = 0; - static uint8_t message_buffer[4096]; - - if ((data = recvfrom(config->local_sock, message_buffer, 4096, 0, (sockaddr *)&from, &len)) == -1) { - syslog(LOG_WARNING, "recv: Failed to receive data from server\n"); - } - - auto msg = parse_dhcpv6_hdr(message_buffer); - counters[msg->msg_type]++; - std::string counterVlan = counter_table; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - if (msg->msg_type == DHCPv6_MESSAGE_TYPE_RELAY_REPL) { - relay_relay_reply(config->server_sock, message_buffer, data, config); - } -} - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init() { - int rv = -1; - do { - ev_sigint = evsignal_new(base, SIGINT, signal_callback, base); - if (ev_sigint == NULL) { - syslog(LOG_ERR, "Could not create SIGINT libevent signal\n"); - break; - } - - ev_sigterm = evsignal_new(base, SIGTERM, signal_callback, base); - if (ev_sigterm == NULL) { - syslog(LOG_ERR, "Could not create SIGTERM libevent signal\n"); - break; - } - rv = 0; - } while(0); - return rv; -} - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start() -{ - int rv = -1; - do - { - if (evsignal_add(ev_sigint, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGINT libevent signal\n"); - break; - } - - if (evsignal_add(ev_sigterm, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGTERM libevent signal\n"); - break; - } - - if (event_base_dispatch(base) != 0) { - syslog(LOG_ERR, "Could not start libevent dispatching loop\n"); - } - - rv = 0; - } while (0); - - return rv; -} - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg) -{ - syslog(LOG_ALERT, "Received signal: '%s'\n", strsignal(fd)); - if ((fd == SIGTERM) || (fd == SIGINT)) { - dhcp6relay_stop(); - } -} - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop() -{ - event_base_loopexit(base, NULL); -} - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db) { - std::vector sockets; - base = event_base_new(); - if(base == NULL) { - syslog(LOG_ERR, "libevent: Failed to create base\n"); - } - - for(relay_config &vlan : *vlans) { - relay_config *config = &vlan; - int filter = 0; - int local_sock = 0; - int server_sock = 0; - int index = if_nametoindex(config->interface.c_str()); - config->db = db; - - std::string counterVlan = counter_table; - initialize_counter(config->db, counterVlan.append(config->interface)); - - filter = sock_open(index, ðer_relay_fprog); - prepare_socket(&local_sock, &server_sock, config, index); - - config->local_sock = local_sock; - config->server_sock = server_sock; - - sockets.push_back(filter); - sockets.push_back(local_sock); - sockets.push_back(server_sock); - - prepare_relay_config(config, &local_sock, filter); - - evutil_make_listen_socket_reuseable(filter); - evutil_make_socket_nonblocking(filter); - - evutil_make_listen_socket_reuseable(local_sock); - evutil_make_socket_nonblocking(local_sock); - - listen_event = event_new(base, filter, EV_READ|EV_PERSIST, callback, config); - server_listen_event = event_new(base, local_sock, EV_READ|EV_PERSIST, server_callback, config); - if (listen_event == NULL || server_listen_event == NULL) { - syslog(LOG_ERR, "libevent: Failed to create libevent\n"); - } - - event_add(listen_event, NULL); - event_add(server_listen_event, NULL); - } - - if((signal_init() == 0) && signal_start() == 0) { - shutdown(); - for(std::size_t i = 0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define PACKED __attribute__ ((packed)) - -#define RELAY_PORT 547 -#define CLIENT_PORT 546 -#define HOP_LIMIT 8 //HOP_LIMIT reduced from 32 to 8 as stated in RFC8415 -#define DHCPv6_OPTION_LIMIT 56 // DHCPv6 option code greater than 56 are currently unassigned - -#define lengthof(A) (sizeof (A) / sizeof (A)[0]) - -#define OPTION_RELAY_MSG 9 -#define OPTION_CLIENT_LINKLAYER_ADDR 79 - -/* DHCPv6 message types */ -typedef enum -{ - DHCPv6_MESSAGE_TYPE_UNKNOWN = 0, - DHCPv6_MESSAGE_TYPE_SOLICIT = 1, - DHCPv6_MESSAGE_TYPE_ADVERTISE = 2, - DHCPv6_MESSAGE_TYPE_REQUEST = 3, - DHCPv6_MESSAGE_TYPE_CONFIRM = 4, - DHCPv6_MESSAGE_TYPE_RENEW = 5, - DHCPv6_MESSAGE_TYPE_REBIND = 6, - DHCPv6_MESSAGE_TYPE_REPLY = 7, - DHCPv6_MESSAGE_TYPE_RELEASE = 8, - DHCPv6_MESSAGE_TYPE_DECLINE = 9, - DHCPv6_MESSAGE_TYPE_RECONFIGURE = 10, - DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST = 11, - DHCPv6_MESSAGE_TYPE_RELAY_FORW = 12, - DHCPv6_MESSAGE_TYPE_RELAY_REPL = 13, - DHCPv6_MESSAGE_TYPE_MALFORMED = 14, - - DHCPv6_MESSAGE_TYPE_COUNT -} dhcp_message_type_t; - -struct relay_config { - int local_sock; - int server_sock; - int filter; - sockaddr_in6 link_address; - swss::DBConnector *db; - std::string interface; - std::vector servers; - std::vector servers_sock; - bool is_option_79; -}; - - -/* DHCPv6 messages and options */ - -struct dhcpv6_msg { - uint8_t msg_type; - uint8_t xid[3]; -}; - -struct PACKED dhcpv6_relay_msg { - uint8_t msg_type; - uint8_t hop_count; - struct in6_addr link_address; - struct in6_addr peer_address; -}; - - -struct dhcpv6_option { - uint16_t option_code; - uint16_t option_length; -}; - -struct linklayer_addr_option { - uint16_t option_code; - uint16_t option_length; - uint16_t link_layer_type; -}; - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog); - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter); - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config); - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ -void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db); - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init(); - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start(); - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop(); - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg); - -/** - * @code shutdown(); - * - * @brief free signals and terminate threads - */ -void shutdown(); - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan); - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type); - -/* Helper functions */ - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count); - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - diff --git a/src/dhcp6relay/src/subdir.mk b/src/dhcp6relay/src/subdir.mk deleted file mode 100644 index 1c93d490ec63..000000000000 --- a/src/dhcp6relay/src/subdir.mk +++ /dev/null @@ -1,23 +0,0 @@ -CC := g++ - -C_SRCS += \ -../src/relay.c \ -../src/configInterface.c \ -../src/main.c - -OBJS += \ -./src/relay.o \ -./src/configInterface.o \ -./src/main.o - -C_DEPS += \ -./src/relay.d \ -./src/configInterface.d \ -./src/main.d - -src/%.o: src/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - $(CC) -D__FILENAME__="$(subst src/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' diff --git a/src/dhcprelay b/src/dhcprelay new file mode 160000 index 000000000000..40ad1676e4d0 --- /dev/null +++ b/src/dhcprelay @@ -0,0 +1 @@ +Subproject commit 40ad1676e4d07c3eec2153017997bb04b33a94c8 From a668ccf6dfdba9b4938fecb51f005a3cb8657052 Mon Sep 17 00:00:00 2001 From: arlakshm <55814491+arlakshm@users.noreply.github.com> Date: Thu, 8 Sep 2022 11:03:19 -0700 Subject: [PATCH 070/106] [FRR] add patch in zebra to ignore route update on RT_TABLE_DEFAULT (#12023) Why I did it Fixes #11995 and #9188 How I did it Add a patch for zebra to ignore sending netlink messages for routes in the table RT_DEFAULT_TABLE How to verify it Test mentioned in the github issues #11995 and #9188 Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan --- ...0009-ignore-route-from-default-table.patch | 32 +++++++++++++++++++ src/sonic-frr/patch/series | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/sonic-frr/patch/0009-ignore-route-from-default-table.patch diff --git a/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch b/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch new file mode 100644 index 000000000000..850c2a6dbeaa --- /dev/null +++ b/src/sonic-frr/patch/0009-ignore-route-from-default-table.patch @@ -0,0 +1,32 @@ +From 96dadc6719dafdd7d58e715f59e0d1a8edc3d58f Mon Sep 17 00:00:00 2001 +From: Arvindsrinivasan Lakshmi Narasimhan +Date: Wed, 7 Sep 2022 23:59:03 +0000 +Subject: [PATCH] ignore route from default table + +Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan +--- + zebra/zebra_fpm_netlink.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/zebra/zebra_fpm_netlink.c b/zebra/zebra_fpm_netlink.c +index 60ea7f97e..c6a2edf03 100644 +--- a/zebra/zebra_fpm_netlink.c ++++ b/zebra/zebra_fpm_netlink.c +@@ -284,6 +284,14 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd, + { + struct nexthop *nexthop; + ++ struct rib_table_info *table_info = ++ rib_table_info(rib_dest_table(dest)); ++ ++ if (table_info->table_id == RT_TABLE_DEFAULT) { ++ zfpm_debug("%s: Discard default table route", __func__); ++ return 0; ++ } ++ + memset(ri, 0, sizeof(*ri)); + + ri->prefix = rib_dest_prefix(dest); +-- +2.25.1 + diff --git a/src/sonic-frr/patch/series b/src/sonic-frr/patch/series index 69dd5991a7cb..34a323782c8e 100644 --- a/src/sonic-frr/patch/series +++ b/src/sonic-frr/patch/series @@ -5,3 +5,4 @@ 0005-nexthops-compare-vrf-only-if-ip-type.patch 0007-frr-remove-frr-log-outchannel-to-var-log-frr.log.patch 0008-Add-support-of-bgp-l3vni-evpn.patch +0009-ignore-route-from-default-table.patch \ No newline at end of file From d892214209d86939db5c00584f879478e48510d5 Mon Sep 17 00:00:00 2001 From: Qi Luo Date: Thu, 8 Sep 2022 13:59:49 -0700 Subject: [PATCH 071/106] Revert "[202012] Change dhcp6relay to be a submodule (#11922)" (#12028) This reverts commit 9db2e21c69f236c03976b39038fb9cd7ab746e5c. --- .gitmodules | 7 - rules/dhcp6relay.dep | 9 + rules/dhcp6relay.mk | 12 + rules/dhcprelay.dep | 11 - rules/dhcprelay.mk | 12 - rules/docker-dhcp-relay.mk | 4 +- src/dhcp6relay/.gitignore | 5 + src/dhcp6relay/Makefile | 42 ++ src/dhcp6relay/debian/changelog | 5 + src/dhcp6relay/debian/compat | 1 + src/dhcp6relay/debian/control | 17 + src/dhcp6relay/debian/rules | 6 + src/dhcp6relay/src/configInterface.cpp | 152 +++++ src/dhcp6relay/src/configInterface.h | 75 +++ src/dhcp6relay/src/main.cpp | 18 + src/dhcp6relay/src/relay.cpp | 861 +++++++++++++++++++++++++ src/dhcp6relay/src/relay.h | 358 ++++++++++ src/dhcp6relay/src/subdir.mk | 23 + src/dhcprelay | 1 - 19 files changed, 1586 insertions(+), 33 deletions(-) create mode 100644 rules/dhcp6relay.dep create mode 100644 rules/dhcp6relay.mk delete mode 100644 rules/dhcprelay.dep delete mode 100644 rules/dhcprelay.mk create mode 100644 src/dhcp6relay/.gitignore create mode 100644 src/dhcp6relay/Makefile create mode 100644 src/dhcp6relay/debian/changelog create mode 100644 src/dhcp6relay/debian/compat create mode 100644 src/dhcp6relay/debian/control create mode 100755 src/dhcp6relay/debian/rules create mode 100644 src/dhcp6relay/src/configInterface.cpp create mode 100644 src/dhcp6relay/src/configInterface.h create mode 100644 src/dhcp6relay/src/main.cpp create mode 100644 src/dhcp6relay/src/relay.cpp create mode 100644 src/dhcp6relay/src/relay.h create mode 100644 src/dhcp6relay/src/subdir.mk delete mode 160000 src/dhcprelay diff --git a/.gitmodules b/.gitmodules index d7f23984dbea..2d6500476739 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,10 +90,3 @@ path = src/linkmgrd url = https://github.com/Azure/sonic-linkmgrd.git branch = 202012 -[submodule "src/dhcprelay"] - path = src/dhcprelay - url = https://github.com/sonic-net/sonic-dhcp-relay.git - branch = 202012 -[submodule "sonic-dhcp-relay"] - path = sonic-dhcp-relay - url = https://github.com/kellyyeh/sonic-dhcp-relay.git diff --git a/rules/dhcp6relay.dep b/rules/dhcp6relay.dep new file mode 100644 index 000000000000..be82d326fe21 --- /dev/null +++ b/rules/dhcp6relay.dep @@ -0,0 +1,9 @@ + +SPATH := $($(SONIC_DHCP6RELAY)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcp6relay.mk rules/dhcp6relay.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +DEP_FILES += $(shell git ls-files $(SPATH)) + +$(SONIC_DHCP6RELAY)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_DHCP6RELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_DHCP6RELAY)_DEP_FILES := $(DEP_FILES) diff --git a/rules/dhcp6relay.mk b/rules/dhcp6relay.mk new file mode 100644 index 000000000000..204bf6fa34dd --- /dev/null +++ b/rules/dhcp6relay.mk @@ -0,0 +1,12 @@ +# SONiC DHCPV6 RELAY Package + +SONIC_DHCP6RELAY_VERSION = 1.0.0-0 +SONIC_DHCP6RELAY_PKG_NAME = dhcp6relay + +SONIC_DHCP6RELAY = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCP6RELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) +$(SONIC_DHCP6RELAY)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCP6RELAY_PKG_NAME) +SONIC_DPKG_DEBS += $(SONIC_DHCP6RELAY) + +SONIC_DHCP6RELAY_DBG = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)-dbgsym_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(SONIC_DHCP6RELAY),$(SONIC_DHCP6RELAY_DBG))) diff --git a/rules/dhcprelay.dep b/rules/dhcprelay.dep deleted file mode 100644 index 5f6d77a84fc3..000000000000 --- a/rules/dhcprelay.dep +++ /dev/null @@ -1,11 +0,0 @@ - -SPATH := $($(SONIC_DHCPRELAY)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcprelay.mk rules/dhcprelay.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) - -$(SONIC_DHCPRELAY)_CACHE_MODE := GIT_CONTENT_SHA -$(SONIC_DHCPRELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_DHCPRELAY)_DEP_FILES := $(DEP_FILES) -$(SONIC_DHCPRELAY)_SMDEP_FILES := $(SMDEP_FILES) -$(SONIC_DHCPRELAY)_SMDEP_PATHS := $(SPATH) diff --git a/rules/dhcprelay.mk b/rules/dhcprelay.mk deleted file mode 100644 index 0a32d7d54297..000000000000 --- a/rules/dhcprelay.mk +++ /dev/null @@ -1,12 +0,0 @@ -# SONiC DHCPV6 RELAY Package - -SONIC_DHCPRELAY_VERSION = 1.0.0-0 -SONIC_DHCPRELAY_PKG_NAME = dhcp6relay - -SONIC_DHCPRELAY = sonic-$(SONIC_DHCPRELAY_PKG_NAME)_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(SONIC_DHCPRELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) -$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay -SONIC_DPKG_DEBS += $(SONIC_DHCPRELAY) - -SONIC_DHCPRELAY_DBG = sonic-$(SONIC_DHCPRELAY_PKG_NAME)-dbgsym_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(SONIC_DHCPRELAY),$(SONIC_DHCPRELAY_DBG))) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 3ecfb5195e2b..2ade8d641a02 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -6,10 +6,10 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM) -$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCPRELAY) $(LIBSWSSCOMMON) +$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCPRELAY_DBG) $(SONIC_DHCPMON_DBG) +$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCP6RELAY_DBG) $(SONIC_DHCPMON_DBG) $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/src/dhcp6relay/.gitignore b/src/dhcp6relay/.gitignore new file mode 100644 index 000000000000..9d09ae6b3f1a --- /dev/null +++ b/src/dhcp6relay/.gitignore @@ -0,0 +1,5 @@ +debian/* +!debian/changelog +!debian/compat +!debian/control +!debian/rules diff --git a/src/dhcp6relay/Makefile b/src/dhcp6relay/Makefile new file mode 100644 index 000000000000..dd384452a5fc --- /dev/null +++ b/src/dhcp6relay/Makefile @@ -0,0 +1,42 @@ +RM := rm -rf +DHCP6RELAY_TARGET := dhcp6relay +CP := cp +MKDIR := mkdir +CC := g++ +MV := mv +LIBS := -levent -lhiredis -lswsscommon -pthread -lboost_thread -lboost_system +CFLAGS += -Wall -std=c++17 -fPIE -I$(PWD)/../sonic-swss-common/common +PWD := $(shell pwd) + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(strip $(C_DEPS)),) +-include $(C_DEPS) $(OBJS) +endif +endif + +-include src/subdir.mk + +all: sonic-dhcp6relay + +sonic-dhcp6relay: $(OBJS) + @echo 'Building target: $@' + @echo 'Invoking: G++ Linker' + $(CC) $(LDFLAGS) -o $(DHCP6RELAY_TARGET) $(OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +install: + $(MKDIR) -p $(DESTDIR)/usr/sbin + $(MV) $(DHCP6RELAY_TARGET) $(DESTDIR)/usr/sbin + +deinstall: + $(RM) $(DESTDIR)/usr/sbin/$(DHCP6RELAY_TARGET) + $(RM) -rf $(DESTDIR)/usr/sbin + +clean: + -$(RM) $(EXECUTABLES) $(C_DEPS) $(OBJS) $(DHCP6RELAY_TARGET) + -@echo ' ' + +.PHONY: all clean dependents + + diff --git a/src/dhcp6relay/debian/changelog b/src/dhcp6relay/debian/changelog new file mode 100644 index 000000000000..67ed277049e5 --- /dev/null +++ b/src/dhcp6relay/debian/changelog @@ -0,0 +1,5 @@ +sonic-dhcp6relay (1.0.0-0) UNRELEASED; urgency=medium + + * Initial release. + +-- Kelly Yeh diff --git a/src/dhcp6relay/debian/compat b/src/dhcp6relay/debian/compat new file mode 100644 index 000000000000..ec635144f600 --- /dev/null +++ b/src/dhcp6relay/debian/compat @@ -0,0 +1 @@ +9 diff --git a/src/dhcp6relay/debian/control b/src/dhcp6relay/debian/control new file mode 100644 index 000000000000..31fdb6f41f3b --- /dev/null +++ b/src/dhcp6relay/debian/control @@ -0,0 +1,17 @@ +Source: sonic-dhcp6relay +Section: devel +Priority: optional +Maintainer: Kelly Yeh +Build-Depends: debhelper (>= 8.0.0), + dh-systemd +Standards-Version: 3.9.3 +Homepage: https://github.com/Azure/sonic-buildimage +XS-Go-Import-Path: github.com/Azure/sonic-buildimage + +Package: sonic-dhcp6relay +Architecture: any +Built-Using: ${misc:Built-Using} +Depends: libevent-2.1-6, + libboost-thread1.71.0, + libboost-system1.71.0 +Description: SONiC DHCPv6 Relay diff --git a/src/dhcp6relay/debian/rules b/src/dhcp6relay/debian/rules new file mode 100755 index 000000000000..ac2cd63889ef --- /dev/null +++ b/src/dhcp6relay/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +%: + dh $@ --parallel diff --git a/src/dhcp6relay/src/configInterface.cpp b/src/dhcp6relay/src/configInterface.cpp new file mode 100644 index 000000000000..ca78d80e63da --- /dev/null +++ b/src/dhcp6relay/src/configInterface.cpp @@ -0,0 +1,152 @@ +#include +#include +#include +#include "configInterface.h" + +constexpr auto DEFAULT_TIMEOUT_MSEC = 1000; + +bool pollSwssNotifcation = true; +std::shared_ptr mSwssThreadPtr; + +std::shared_ptr configDbPtr = std::make_shared ("CONFIG_DB", 0); +swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY"); +swss::Select swssSelect; + +/** + * @code void initialize_swss() + * + * @brief initialize DB tables and start SWSS listening thread + * + * @return none + */ +void initialize_swss(std::vector *vlans) +{ + try { + swssSelect.addSelectable(&ipHelpersTable); + get_dhcp(vlans); + mSwssThreadPtr = std::make_shared (&handleSwssNotification, vlans); + } + catch (const std::bad_alloc &e) { + syslog(LOG_ERR, "Failed allocate memory. Exception details: %s", e.what()); + } +} + +/** + * @code void deinitialize_swss() + * + * @brief deinitialize DB interface and join SWSS listening thread + * + * @return none + */ +void deinitialize_swss() +{ + stopSwssNotificationPoll(); + mSwssThreadPtr->interrupt(); +} + + +/** + * @code void get_dhcp(std::vector *vlans) + * + * @brief initialize and get vlan table information from DHCP_RELAY + * + * @return none + */ +void get_dhcp(std::vector *vlans) { + swss::Selectable *selectable; + int ret = swssSelect.select(&selectable, DEFAULT_TIMEOUT_MSEC); + if (ret == swss::Select::ERROR) { + syslog(LOG_WARNING, "Select: returned ERROR"); + } else if (ret == swss::Select::TIMEOUT) { + } + if (selectable == static_cast (&ipHelpersTable)) { + handleRelayNotification(ipHelpersTable, vlans); + } +} +/** + * @code void handleSwssNotification(std::vector *vlans) + * + * @brief main thread for handling SWSS notification + * + * @param context list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void handleSwssNotification(std::vector *vlans) +{ + while (pollSwssNotifcation) { + get_dhcp(vlans); + } +} + +/** + * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) + * + * @brief handles DHCPv6 relay configuration change notification + * + * @param ipHelpersTable DHCP table + * @param vlans list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) +{ + std::deque entries; + + ipHelpersTable.pops(entries); + processRelayNotification(entries, vlans); +} + +/** + * @code void processRelayNotification(std::deque &entries, std::vector *vlans) + * + * @brief process DHCPv6 relay servers and options configuration change notification + * + * @param entries queue of std::tuple> entries in DHCP table + * @param vlans list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void processRelayNotification(std::deque &entries, std::vector *vlans) +{ + std::vector servers; + + for (auto &entry: entries) { + std::string vlan = kfvKey(entry); + std::string operation = kfvOp(entry); + std::vector fieldValues = kfvFieldsValues(entry); + + relay_config intf; + intf.is_option_79 = true; + intf.interface = vlan; + intf.db = nullptr; + for (auto &fieldValue: fieldValues) { + std::string f = fvField(fieldValue); + std::string v = fvValue(fieldValue); + if(f == "dhcpv6_servers") { + std::stringstream ss(v); + while (ss.good()) { + std::string substr; + getline(ss, substr, ','); + intf.servers.push_back(substr); + } + syslog(LOG_DEBUG, "key: %s, Operation: %s, f: %s, v: %s", vlan.c_str(), operation.c_str(), f.c_str(), v.c_str()); + } + if(f == "dhcpv6_option|rfc6939_support" && v == "false") { + intf.is_option_79 = false; + } + } + vlans->push_back(intf); + } +} + +/** +*@code stopSwssNotificationPoll +* +*@brief stop SWSS listening thread +* +*@return none +*/ +void stopSwssNotificationPoll() { + pollSwssNotifcation = false; +}; diff --git a/src/dhcp6relay/src/configInterface.h b/src/dhcp6relay/src/configInterface.h new file mode 100644 index 000000000000..20b0912c5cef --- /dev/null +++ b/src/dhcp6relay/src/configInterface.h @@ -0,0 +1,75 @@ +#include +#include "subscriberstatetable.h" +#include "select.h" +#include "relay.h" + +/** + * @code void initialize_swss() + * + * @brief initialize DB tables and start SWSS listening thread + * + * @return none + */ +void initialize_swss(std::vector *vlans); + +/** + * @code void deinitialize_swss() + * + * @brief deinitialize DB interface and join SWSS listening thread + * + * @return none + */ +void deinitialize_swss(); + +/** + * @code void get_dhcp(std::vector *vlans) + * + * @brief initialize and get vlan information from DHCP_RELAY + * + * @return none + */ +void get_dhcp(std::vector *vlans); + +/** + * @code void handleSwssNotification(std::vector *vlans) + * + * @brief main thread for handling SWSS notification + * + * @param vlans list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void handleSwssNotification(std::vector *vlans); + +/** + * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) + * + * @brief handles DHCPv6 relay configuration change notification + * + * @param ipHelpersTable DHCP table + * @param vlans list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void handleRelayNotification(swss::SubscriberStateTable &configMuxTable, std::vector *vlans); + +/** + * @code void processRelayNotification(std::deque &entries, std::vector *vlans) + * + * @brief process DHCPv6 relay servers and options configuration change notification + * + * @param entries queue of std::tuple> entries in DHCP table + * @param context list of vlans/argument config that contains strings of server and option + * + * @return none + */ +void processRelayNotification(std::deque &entries, std::vector *vlans); + +/** +*@code stopSwssNotificationPoll +* +*@brief stop SWSS listening thread +* +*@return none +*/ +void stopSwssNotificationPoll(); diff --git a/src/dhcp6relay/src/main.cpp b/src/dhcp6relay/src/main.cpp new file mode 100644 index 000000000000..9f5bc74bcfa0 --- /dev/null +++ b/src/dhcp6relay/src/main.cpp @@ -0,0 +1,18 @@ +#include +#include +#include "configInterface.h" + +int main(int argc, char *argv[]) { + try { + std::vector vlans; + swss::DBConnector state_db("STATE_DB", 0); + initialize_swss(&vlans); + loop_relay(&vlans, &state_db); + } + catch (std::exception &e) + { + syslog(LOG_ERR, "An exception occurred.\n"); + return 1; + } + return 0; +} diff --git a/src/dhcp6relay/src/relay.cpp b/src/dhcp6relay/src/relay.cpp new file mode 100644 index 000000000000..08cec458c74d --- /dev/null +++ b/src/dhcp6relay/src/relay.cpp @@ -0,0 +1,861 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "configdb.h" +#include "sonicv2connector.h" +#include "dbconnector.h" +#include "configInterface.h" + + +struct event *listen_event; +struct event *server_listen_event; +struct event_base *base; +struct event *ev_sigint; +struct event *ev_sigterm; +static std::string counter_table = "DHCPv6_COUNTER_TABLE|"; + +/* DHCPv6 filter */ +/* sudo tcpdump -dd "ip6 dst ff02::1:2 && udp dst port 547" */ + +static struct sock_filter ether_relay_filter[] = { + + { 0x28, 0, 0, 0x0000000c }, + { 0x15, 0, 13, 0x000086dd }, + { 0x20, 0, 0, 0x00000026 }, + { 0x15, 0, 11, 0xff020000 }, + { 0x20, 0, 0, 0x0000002a }, + { 0x15, 0, 9, 0x00000000 }, + { 0x20, 0, 0, 0x0000002e }, + { 0x15, 0, 7, 0x00000000 }, + { 0x20, 0, 0, 0x00000032 }, + { 0x15, 0, 5, 0x00010002 }, + { 0x30, 0, 0, 0x00000014 }, + { 0x15, 0, 3, 0x00000011 }, + { 0x28, 0, 0, 0x00000038 }, + { 0x15, 0, 1, 0x00000223 }, + { 0x6, 0, 0, 0x00040000 }, + { 0x6, 0, 0, 0x00000000 }, +}; +const struct sock_fprog ether_relay_fprog = { + lengthof(ether_relay_filter), + ether_relay_filter +}; + +/* DHCPv6 Counter */ +uint64_t counters[DHCPv6_MESSAGE_TYPE_COUNT]; +std::map counterMap = {{DHCPv6_MESSAGE_TYPE_UNKNOWN, "Unknown"}, + {DHCPv6_MESSAGE_TYPE_SOLICIT, "Solicit"}, + {DHCPv6_MESSAGE_TYPE_ADVERTISE, "Advertise"}, + {DHCPv6_MESSAGE_TYPE_REQUEST, "Request"}, + {DHCPv6_MESSAGE_TYPE_CONFIRM, "Confirm"}, + {DHCPv6_MESSAGE_TYPE_RENEW, "Renew"}, + {DHCPv6_MESSAGE_TYPE_REBIND, "Rebind"}, + {DHCPv6_MESSAGE_TYPE_REPLY, "Reply"}, + {DHCPv6_MESSAGE_TYPE_RELEASE, "Release"}, + {DHCPv6_MESSAGE_TYPE_DECLINE, "Decline"}, + {DHCPv6_MESSAGE_TYPE_RECONFIGURE, "Reconfigure"}, + {DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST, "Information-Request"}, + {DHCPv6_MESSAGE_TYPE_RELAY_FORW, "Relay-Forward"}, + {DHCPv6_MESSAGE_TYPE_RELAY_REPL, "Relay-Reply"}, + {DHCPv6_MESSAGE_TYPE_MALFORMED, "Malformed"}}; + +/** + * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); + * + * @brief initialize the counter by each Vlan + * + * @param swss::DBConnector *db state_db connector + * @param counterVlan counter table with interface name + * + * @return none + */ +void initialize_counter(swss::DBConnector *db, std::string counterVlan) { + db->hset(counterVlan, "Unknown", toString(counters[DHCPv6_MESSAGE_TYPE_UNKNOWN])); + db->hset(counterVlan, "Solicit", toString(counters[DHCPv6_MESSAGE_TYPE_SOLICIT])); + db->hset(counterVlan, "Advertise", toString(counters[DHCPv6_MESSAGE_TYPE_ADVERTISE])); + db->hset(counterVlan, "Request", toString(counters[DHCPv6_MESSAGE_TYPE_REQUEST])); + db->hset(counterVlan, "Confirm", toString(counters[DHCPv6_MESSAGE_TYPE_CONFIRM])); + db->hset(counterVlan, "Renew", toString(counters[DHCPv6_MESSAGE_TYPE_RENEW])); + db->hset(counterVlan, "Rebind", toString(counters[DHCPv6_MESSAGE_TYPE_REBIND])); + db->hset(counterVlan, "Reply", toString(counters[DHCPv6_MESSAGE_TYPE_REPLY])); + db->hset(counterVlan, "Release", toString(counters[DHCPv6_MESSAGE_TYPE_RELEASE])); + db->hset(counterVlan, "Decline", toString(counters[DHCPv6_MESSAGE_TYPE_DECLINE])); + db->hset(counterVlan, "Reconfigure", toString(counters[DHCPv6_MESSAGE_TYPE_RECONFIGURE])); + db->hset(counterVlan, "Information-Request", toString(counters[DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST])); + db->hset(counterVlan, "Relay-Forward", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_FORW])); + db->hset(counterVlan, "Relay-Reply", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_REPL])); + db->hset(counterVlan, "Malformed", toString(counters[DHCPv6_MESSAGE_TYPE_MALFORMED])); +} + +/** + * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); + * + * @brief update the counter in state_db with count of each DHCPv6 message type + * + * @param swss::DBConnector *db state_db connector + * @param counterVlan counter table with interface name + * @param msg_type dhcpv6 message type to be updated in counter + * + * @return none + */ +void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type) { + db->hset(counterVlan, counterMap.find(msg_type)->second, toString(counters[msg_type])); +} + +/** + * @code std::string toString(uint16_t count); + * + * @brief convert uint16_t to string + * + * @param count count of messages in counter + * + * @return count in string + */ +std::string toString(uint16_t count) { + std::stringstream ss; + ss << count; + std::string countValue = ss.str(); + return countValue; +} + +/** + * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through ethernet frame + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return ether_header end of ethernet header position + */ +const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end) { + (*out_end) = buffer + sizeof(struct ether_header); + return (const struct ether_header *)buffer; +} + +/** + * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through ipv6 header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return ip6_hdr end of ipv6 header position + */ +const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end) { + (*out_end) = buffer + sizeof(struct ip6_hdr); + return (struct ip6_hdr *)buffer; +} + +/** + * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through udp header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return udphdr end of udp header position + */ +const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end) { + (*out_end) = buffer + sizeof(struct udphdr); + return (const struct udphdr *)buffer; +} + +/** + * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); + * + * @brief parse through dhcpv6 header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_msg end of dhcpv6 header position + */ +const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer) { + return (const struct dhcpv6_msg *)buffer; +} + +/** + * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); + * + * @brief parse through dhcpv6 relay message + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position + */ +const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer) { + return (const struct dhcpv6_relay_msg *)buffer; +} + +/** + * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through dhcpv6 option + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_option end of dhcpv6 message option + */ +const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end) { + auto option = (const struct dhcpv6_option *)buffer; + uint8_t size = 4; // option-code + option-len + size += *(uint16_t *)(buffer); + (*out_end) = buffer + size + ntohs(option->option_length); + + return option; +} + +/** + * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); + * + * @brief send udp packet + * + * @param *buffer message buffer + * @param sockaddr_in6 target target socket + * @param n length of message + * @param relay_config *config pointer to relay_config + * @param uint8_t msg_type message type of dhcpv6 option of relayed message + * + * @return dhcpv6_option end of dhcpv6 message option + */ +void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type) { + std::string counterVlan = counter_table; + if(sendto(sock, buffer, n, 0, (const struct sockaddr *)&target, sizeof(target)) == -1) + syslog(LOG_ERR, "sendto: Failed to send to target address\n"); + else if (counterMap.find(msg_type) != counterMap.end()) { + counters[msg_type]++; + update_counter(config->db, counterVlan.append(config->interface), msg_type); + } else { + syslog(LOG_WARNING, "unexpected message type %d(0x%x)\n", msg_type, msg_type); + } +} + +/** + * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); + * + * @brief embed the DHCPv6 message received into DHCPv6 relay forward message + * + * @param buffer pointer to buffer + * @param msg pointer to parsed DHCPv6 message + * @param msg_length length of DHCPv6 message + * + * @return none + */ +void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length) { + struct dhcpv6_option option; + option.option_code = htons(OPTION_RELAY_MSG); + option.option_length = htons(msg_length); + memcpy(buffer, &option, sizeof(struct dhcpv6_option)); + memcpy(buffer + sizeof(struct dhcpv6_option), msg, msg_length); +} + +/** + * @code sock_open(int ifindex, const struct sock_fprog *fprog); + * + * @brief prepare L2 socket to attach to "udp and port 547" filter + * + * @param ifindex interface index + * @param fprog bpf filter "udp and port 547" + * + * @return socket descriptor + */ +int sock_open(int ifindex, const struct sock_fprog *fprog) +{ + if (!ifindex) { + errno = EINVAL; + return -1; + } + + int s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (s == -1) { + syslog(LOG_ERR, "socket: Failed to create socket\n"); + return -1; + } + + struct sockaddr_ll sll = { + .sll_family = AF_PACKET, + .sll_protocol = htons(ETH_P_ALL), + .sll_ifindex = ifindex + }; + + if (bind(s, (struct sockaddr *)&sll, sizeof sll) == -1) { + syslog(LOG_ERR, "bind: Failed to bind to specified interface\n"); + (void) close(s); + return -1; + } + + if (fprog && setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, fprog, sizeof *fprog) == -1) + { + syslog(LOG_ERR, "setsockopt: Failed to attach filter\n"); + (void) close(s); + return -1; + } + + return s; +} + +/** + * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); + * + * @brief prepare for specified relay interface config: server and link address + * + * @param interface_config pointer to relay config to be prepared + * @param local_sock L3 socket used for relaying messages + * @param filter socket attached with filter + * + * @return none + */ +void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter) { + struct ifaddrs *ifa, *ifa_tmp; + sockaddr_in6 non_link_local; + sockaddr_in6 link_local; + + interface_config->local_sock = *local_sock; + interface_config->filter = filter; + + for(auto server: interface_config->servers) { + sockaddr_in6 tmp; + if(inet_pton(AF_INET6, server.c_str(), &tmp.sin6_addr) != 1) + { + syslog(LOG_WARNING, "inet_pton: Failed to convert IPv6 address\n"); + } + tmp.sin6_family = AF_INET6; + tmp.sin6_flowinfo = 0; + tmp.sin6_port = htons(RELAY_PORT); + tmp.sin6_scope_id = 0; + interface_config->servers_sock.push_back(tmp); + } + + if (getifaddrs(&ifa) == -1) { + syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces\n"); + exit(1); + } + + ifa_tmp = ifa; + while (ifa_tmp) { + if (ifa_tmp->ifa_addr && ifa_tmp->ifa_addr->sa_family == AF_INET6) { + struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; + if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && !IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { + non_link_local = *in6; + break; + } + if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { + link_local = *in6; + } + } + ifa_tmp = ifa_tmp->ifa_next; + } + freeifaddrs(ifa); + + if(!IN6_IS_ADDR_LINKLOCAL(&non_link_local.sin6_addr)) { + interface_config->link_address = non_link_local; + } + else { + interface_config->link_address = link_local; + } +} + +/** + * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); + * + * @brief prepare L3 socket for sending + * + * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message + * @param server_sock pointer to socket binded to link_local address for relaying server message to client + * @param index scope id of interface + * + * @return none + */ +void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index) { + struct ifaddrs *ifa, *ifa_tmp; + sockaddr_in6 addr; + sockaddr_in6 ll_addr; + memset(&addr, 0, sizeof(addr)); + memset(&ll_addr, 0, sizeof(ll_addr)); + + if ((*local_sock = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { + syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); + } + + if ((*server_sock= socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { + syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); + } + + int retry = 0; + bool bind_addr = false; + bool bind_ll_addr = false; + do { + if (getifaddrs(&ifa) == -1) { + syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces with %s\n", strerror(errno)); + } + else { + ifa_tmp = ifa; + while (ifa_tmp) { + if (ifa_tmp->ifa_addr && (ifa_tmp->ifa_addr->sa_family == AF_INET6) && (strcmp(ifa_tmp->ifa_name, config->interface.c_str()) == 0)) { + struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; + if(!IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { + bind_addr = true; + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(RELAY_PORT); + addr = *in6; + } + if(IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { + bind_ll_addr = true; + in6->sin6_family = AF_INET6; + in6->sin6_port = htons(RELAY_PORT); + ll_addr = *in6; + } + } + ifa_tmp = ifa_tmp->ifa_next; + } + freeifaddrs(ifa); + } + + if (bind_addr && bind_ll_addr) { + break; + } + + syslog(LOG_WARNING, "Retry #%d to bind to sockets on interface %s\n", ++retry, config->interface.c_str()); + sleep(5); + } while (retry < 6); + + if ((!bind_addr) || (bind(*local_sock, (sockaddr *)&addr, sizeof(addr)) == -1)) { + syslog(LOG_ERR, "bind: Failed to bind socket to global ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); + } + + if ((!bind_ll_addr) || (bind(*server_sock, (sockaddr *)&ll_addr, sizeof(addr)) == -1)) { + syslog(LOG_ERR, "bind: Failed to bind socket to link local ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); + } +} + + +/** + * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); + * + * @brief construct relay-forward message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param ip_hdr pointer to IPv6 header + * @param ether_hdr pointer to Ethernet header + * @param config pointer to the relay interface config + * + * @return none + */ +void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config) { + static uint8_t buffer[4096]; + auto current_buffer_position = buffer; + dhcpv6_relay_msg new_message; + new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; + memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); + new_message.hop_count = 0; + + memcpy(&new_message.link_address, &config->link_address.sin6_addr, sizeof(in6_addr)); + memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); + current_buffer_position += sizeof(dhcpv6_relay_msg); + + if(config->is_option_79) { + linklayer_addr_option option79; + option79.link_layer_type = htons(1); + option79.option_code = htons(OPTION_CLIENT_LINKLAYER_ADDR); + option79.option_length = htons(2 + 6); // link_layer_type field + address + + memcpy(current_buffer_position, &option79, sizeof(linklayer_addr_option)); + current_buffer_position += sizeof(linklayer_addr_option); + + memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost)); + current_buffer_position += sizeof(ether_hdr->ether_shost); + } + + auto dhcp_message_length = len; + relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); + current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); + + for(auto server: config->servers_sock) { + send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); + } +} + +/** + * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) + * + * @brief construct a relay-forward message encapsulated relay-forward message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param ip_hdr pointer to IPv6 header + * @param config pointer to the relay interface config + * + * @return none + */ +void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) { + static uint8_t buffer[4096]; + dhcpv6_relay_msg new_message; + auto current_buffer_position = buffer; + auto dhcp_relay_header = parse_dhcpv6_relay(msg); + + if (dhcp_relay_header->hop_count >= HOP_LIMIT) + return; + + new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; + memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); + new_message.hop_count = dhcp_relay_header->hop_count + 1; + + memset(&new_message.link_address, 0, sizeof(in6_addr)); + + memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); + current_buffer_position += sizeof(dhcpv6_relay_msg); + + auto dhcp_message_length = len; + relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); + current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); + + for(auto server: config->servers_sock) { + send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); + } +} + +/** + * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); + * + * @brief relay and unwrap a relay-reply message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param config relay interface config + * + * @return none + */ + void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *config) { + static uint8_t buffer[4096]; + uint8_t type = 0; + struct sockaddr_in6 target_addr; + auto current_buffer_position = buffer; + auto current_position = msg; + const uint8_t *tmp = NULL; + auto dhcp_relay_header = parse_dhcpv6_relay(msg); + current_position += sizeof(struct dhcpv6_relay_msg); + + auto position = current_position + sizeof(struct dhcpv6_option); + auto dhcpv6msg = parse_dhcpv6_hdr(position); + + while ((current_position - msg) < len) { + auto option = parse_dhcpv6_opt(current_position, &tmp); + current_position = tmp; + if (current_position - msg > len || ntohs(option->option_length) > sizeof(buffer) - (current_buffer_position - buffer)) { + break; + } + switch (ntohs(option->option_code)) { + case OPTION_RELAY_MSG: + memcpy(current_buffer_position, ((uint8_t *)option) + sizeof(struct dhcpv6_option), ntohs(option->option_length)); + current_buffer_position += ntohs(option->option_length); + type = dhcpv6msg->msg_type; + break; + default: + break; + } + } + + memcpy(&target_addr.sin6_addr, &dhcp_relay_header->peer_address, sizeof(struct in6_addr)); + target_addr.sin6_family = AF_INET6; + target_addr.sin6_flowinfo = 0; + target_addr.sin6_port = htons(CLIENT_PORT); + target_addr.sin6_scope_id = if_nametoindex(config->interface.c_str()); + + send_udp(sock, buffer, target_addr, current_buffer_position - buffer, config, type); +} + + +/** + * @code callback(evutil_socket_t fd, short event, void *arg); + * + * @brief callback for libevent that is called everytime data is received at the filter socket + * + * @param fd filter socket + * @param event libevent triggered event + * @param arg callback argument provided by user + * + * @return none + */ +void callback(evutil_socket_t fd, short event, void *arg) { + struct relay_config *config = (struct relay_config *)arg; + static uint8_t message_buffer[4096]; + std::string counterVlan = counter_table; + int32_t len = recv(config->filter, message_buffer, 4096, 0); + if (len <= 0) { + syslog(LOG_WARNING, "recv: Failed to receive data at filter socket: %s\n", strerror(errno)); + return; + } + + char* ptr = (char *)message_buffer; + const uint8_t *current_position = (uint8_t *)ptr; + const uint8_t *tmp = NULL; + const uint8_t *prev = NULL; + + auto ether_header = parse_ether_frame(current_position, &tmp); + current_position = tmp; + + auto ip_header = parse_ip6_hdr(current_position, &tmp); + current_position = tmp; + + prev = current_position; + if (ip_header->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_UDP) { + const struct ip6_ext *ext_header; + do { + ext_header = (const struct ip6_ext *)current_position; + current_position += ext_header->ip6e_len; + if((current_position == prev) || (current_position >= (uint8_t *)ptr + sizeof(message_buffer))) { + return; + } + prev = current_position; + } + while (ext_header->ip6e_nxt != IPPROTO_UDP); + } + + auto udp_header = parse_udp(current_position, &tmp); + current_position = tmp; + + auto msg = parse_dhcpv6_hdr(current_position); + auto option_position = current_position + sizeof(struct dhcpv6_msg); + + switch (msg->msg_type) { + case DHCPv6_MESSAGE_TYPE_RELAY_FORW: + { + relay_relay_forw(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, config); + break; + } + case DHCPv6_MESSAGE_TYPE_SOLICIT: + case DHCPv6_MESSAGE_TYPE_REQUEST: + case DHCPv6_MESSAGE_TYPE_CONFIRM: + case DHCPv6_MESSAGE_TYPE_RENEW: + case DHCPv6_MESSAGE_TYPE_REBIND: + case DHCPv6_MESSAGE_TYPE_RELEASE: + case DHCPv6_MESSAGE_TYPE_DECLINE: + case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST: + { + while (option_position - message_buffer < len) { + auto option = parse_dhcpv6_opt(option_position, &tmp); + option_position = tmp; + if (ntohs(option->option_code) > DHCPv6_OPTION_LIMIT) { + counters[DHCPv6_MESSAGE_TYPE_MALFORMED]++; + update_counter(config->db, counterVlan.append(config->interface), DHCPv6_MESSAGE_TYPE_MALFORMED); + syslog(LOG_WARNING, "DHCPv6 option is invalid or contains malformed payload\n"); + return; + } + } + counters[msg->msg_type]++; + update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); + relay_client(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, ether_header, config); + break; + } + default: + { + syslog(LOG_WARNING, "DHCPv6 client message received was not relayed\n"); + break; + } + } +} + +/** + * @code void server_callback(evutil_socket_t fd, short event, void *arg); + * + * @brief callback for libevent that is called everytime data is received at the server socket + * + * @param fd filter socket + * @param event libevent triggered event + * @param arg callback argument provided by user + * + * @return none + */ +void server_callback(evutil_socket_t fd, short event, void *arg) { + struct relay_config *config = (struct relay_config *)arg; + sockaddr_in6 from; + socklen_t len = sizeof(from); + int32_t data = 0; + static uint8_t message_buffer[4096]; + + if ((data = recvfrom(config->local_sock, message_buffer, 4096, 0, (sockaddr *)&from, &len)) == -1) { + syslog(LOG_WARNING, "recv: Failed to receive data from server\n"); + } + + auto msg = parse_dhcpv6_hdr(message_buffer); + counters[msg->msg_type]++; + std::string counterVlan = counter_table; + update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); + if (msg->msg_type == DHCPv6_MESSAGE_TYPE_RELAY_REPL) { + relay_relay_reply(config->server_sock, message_buffer, data, config); + } +} + +/** + * @code signal_init(); + * + * @brief initialize DHCPv6 Relay libevent signals + */ +int signal_init() { + int rv = -1; + do { + ev_sigint = evsignal_new(base, SIGINT, signal_callback, base); + if (ev_sigint == NULL) { + syslog(LOG_ERR, "Could not create SIGINT libevent signal\n"); + break; + } + + ev_sigterm = evsignal_new(base, SIGTERM, signal_callback, base); + if (ev_sigterm == NULL) { + syslog(LOG_ERR, "Could not create SIGTERM libevent signal\n"); + break; + } + rv = 0; + } while(0); + return rv; +} + +/** + * @code signal_start(); + * + * @brief start DHCPv6 Relay libevent base and add signals + */ +int signal_start() +{ + int rv = -1; + do + { + if (evsignal_add(ev_sigint, NULL) != 0) { + syslog(LOG_ERR, "Could not add SIGINT libevent signal\n"); + break; + } + + if (evsignal_add(ev_sigterm, NULL) != 0) { + syslog(LOG_ERR, "Could not add SIGTERM libevent signal\n"); + break; + } + + if (event_base_dispatch(base) != 0) { + syslog(LOG_ERR, "Could not start libevent dispatching loop\n"); + } + + rv = 0; + } while (0); + + return rv; +} + +/** + * @code signal_callback(fd, event, arg); + * + * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught + * + * @param fd libevent socket + * @param event event triggered + * @param arg pointer to libevent base + * + * @return none + */ +void signal_callback(evutil_socket_t fd, short event, void *arg) +{ + syslog(LOG_ALERT, "Received signal: '%s'\n", strsignal(fd)); + if ((fd == SIGTERM) || (fd == SIGINT)) { + dhcp6relay_stop(); + } +} + +/** + * @code dhcp6relay_stop(); + * + * @brief stop DHCPv6 Relay libevent loop upon signal + */ +void dhcp6relay_stop() +{ + event_base_loopexit(base, NULL); +} + +/** + * @code loop_relay(std::vector *vlans, swss::DBConnector *db); + * + * @brief main loop: configure sockets, create libevent base, start server listener thread + * + * @param vlans list of vlans retrieved from config_db + * @param db state_db connector + */ +void loop_relay(std::vector *vlans, swss::DBConnector *db) { + std::vector sockets; + base = event_base_new(); + if(base == NULL) { + syslog(LOG_ERR, "libevent: Failed to create base\n"); + } + + for(relay_config &vlan : *vlans) { + relay_config *config = &vlan; + int filter = 0; + int local_sock = 0; + int server_sock = 0; + int index = if_nametoindex(config->interface.c_str()); + config->db = db; + + std::string counterVlan = counter_table; + initialize_counter(config->db, counterVlan.append(config->interface)); + + filter = sock_open(index, ðer_relay_fprog); + prepare_socket(&local_sock, &server_sock, config, index); + + config->local_sock = local_sock; + config->server_sock = server_sock; + + sockets.push_back(filter); + sockets.push_back(local_sock); + sockets.push_back(server_sock); + + prepare_relay_config(config, &local_sock, filter); + + evutil_make_listen_socket_reuseable(filter); + evutil_make_socket_nonblocking(filter); + + evutil_make_listen_socket_reuseable(local_sock); + evutil_make_socket_nonblocking(local_sock); + + listen_event = event_new(base, filter, EV_READ|EV_PERSIST, callback, config); + server_listen_event = event_new(base, local_sock, EV_READ|EV_PERSIST, server_callback, config); + if (listen_event == NULL || server_listen_event == NULL) { + syslog(LOG_ERR, "libevent: Failed to create libevent\n"); + } + + event_add(listen_event, NULL); + event_add(server_listen_event, NULL); + } + + if((signal_init() == 0) && signal_start() == 0) { + shutdown(); + for(std::size_t i = 0; i +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define PACKED __attribute__ ((packed)) + +#define RELAY_PORT 547 +#define CLIENT_PORT 546 +#define HOP_LIMIT 8 //HOP_LIMIT reduced from 32 to 8 as stated in RFC8415 +#define DHCPv6_OPTION_LIMIT 56 // DHCPv6 option code greater than 56 are currently unassigned + +#define lengthof(A) (sizeof (A) / sizeof (A)[0]) + +#define OPTION_RELAY_MSG 9 +#define OPTION_CLIENT_LINKLAYER_ADDR 79 + +/* DHCPv6 message types */ +typedef enum +{ + DHCPv6_MESSAGE_TYPE_UNKNOWN = 0, + DHCPv6_MESSAGE_TYPE_SOLICIT = 1, + DHCPv6_MESSAGE_TYPE_ADVERTISE = 2, + DHCPv6_MESSAGE_TYPE_REQUEST = 3, + DHCPv6_MESSAGE_TYPE_CONFIRM = 4, + DHCPv6_MESSAGE_TYPE_RENEW = 5, + DHCPv6_MESSAGE_TYPE_REBIND = 6, + DHCPv6_MESSAGE_TYPE_REPLY = 7, + DHCPv6_MESSAGE_TYPE_RELEASE = 8, + DHCPv6_MESSAGE_TYPE_DECLINE = 9, + DHCPv6_MESSAGE_TYPE_RECONFIGURE = 10, + DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST = 11, + DHCPv6_MESSAGE_TYPE_RELAY_FORW = 12, + DHCPv6_MESSAGE_TYPE_RELAY_REPL = 13, + DHCPv6_MESSAGE_TYPE_MALFORMED = 14, + + DHCPv6_MESSAGE_TYPE_COUNT +} dhcp_message_type_t; + +struct relay_config { + int local_sock; + int server_sock; + int filter; + sockaddr_in6 link_address; + swss::DBConnector *db; + std::string interface; + std::vector servers; + std::vector servers_sock; + bool is_option_79; +}; + + +/* DHCPv6 messages and options */ + +struct dhcpv6_msg { + uint8_t msg_type; + uint8_t xid[3]; +}; + +struct PACKED dhcpv6_relay_msg { + uint8_t msg_type; + uint8_t hop_count; + struct in6_addr link_address; + struct in6_addr peer_address; +}; + + +struct dhcpv6_option { + uint16_t option_code; + uint16_t option_length; +}; + +struct linklayer_addr_option { + uint16_t option_code; + uint16_t option_length; + uint16_t link_layer_type; +}; + +/** + * @code sock_open(int ifindex, const struct sock_fprog *fprog); + * + * @brief prepare L2 socket to attach to "udp and port 547" filter + * + * @param ifindex interface index + * @param fprog bpf filter "udp and port 547" + * + * @return socket descriptor + */ +int sock_open(int ifindex, const struct sock_fprog *fprog); + +/** + * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); + * + * @brief prepare L3 socket for sending + * + * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message + * @param server_sock pointer to socket binded to link_local address for relaying server message to client + * @param index scope id of interface + * + * @return none + */ +void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); + +/** + * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); + * + * @brief prepare for specified relay interface config: server and link address + * + * @param interface_config pointer to relay config to be prepared + * @param local_sock L3 socket used for relaying messages + * @param filter socket attached with filter + * + * @return none + */ +void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter); + +/** + * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); + * + * @brief embed the DHCPv6 message received into DHCPv6 relay forward message + * + * @param buffer pointer to buffer + * @param msg pointer to parsed DHCPv6 message + * @param msg_length length of DHCPv6 message + * + * @return none + */ +void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); + +/** + * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); + * + * @brief construct relay-forward message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param ip_hdr pointer to IPv6 header + * @param ether_hdr pointer to Ethernet header + * @param config pointer to the relay interface config + * + * @return none + */ +void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); + +/** + * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) + * + * @brief construct a relay-forward message encapsulated relay-forward message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param ip_hdr pointer to IPv6 header + * @param config pointer to the relay interface config + * + * @return none + */ +void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config); + +/** + * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); + * + * @brief relay and unwrap a relay-reply message + * + * @param sock L3 socket for sending data to servers + * @param msg pointer to dhcpv6 message header position + * @param len size of data received + * @param config relay interface config + * + * @return none + */ +void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); + +/** + * @code loop_relay(std::vector *vlans, swss::DBConnector *db); + * + * @brief main loop: configure sockets, create libevent base, start server listener thread + * + * @param vlans list of vlans retrieved from config_db + * @param db state_db connector + */ +void loop_relay(std::vector *vlans, swss::DBConnector *db); + +/** + * @code signal_init(); + * + * @brief initialize DHCPv6 Relay libevent signals + */ +int signal_init(); + +/** + * @code signal_start(); + * + * @brief start DHCPv6 Relay libevent base and add signals + */ +int signal_start(); + +/** + * @code dhcp6relay_stop(); + * + * @brief stop DHCPv6 Relay libevent loop upon signal + */ +void dhcp6relay_stop(); + +/** + * @code signal_callback(fd, event, arg); + * + * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught + * + * @param fd libevent socket + * @param event event triggered + * @param arg pointer to libevent base + * + * @return none + */ +void signal_callback(evutil_socket_t fd, short event, void *arg); + +/** + * @code shutdown(); + * + * @brief free signals and terminate threads + */ +void shutdown(); + +/** + * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); + * + * @brief initialize the counter by each Vlan + * + * @param swss::DBConnector *db state_db connector + * @param counterVlan counter table with interface name + * + * @return none + */ +void initialize_counter(swss::DBConnector *db, std::string counterVlan); + +/** + * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); + * + * @brief update the counter in state_db with count of each DHCPv6 message type + * + * @param swss::DBConnector *db state_db connector + * @param counterVlan counter table with interface name + * @param msg_type dhcpv6 message type to be updated in counter + * + * @return none + */ +void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type); + +/* Helper functions */ + +/** + * @code std::string toString(uint16_t count); + * + * @brief convert uint16_t to string + * + * @param count count of messages in counter + * + * @return count in string + */ +std::string toString(uint16_t count); + +/** + * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through ethernet frame + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return ether_header end of ethernet header position + */ +const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); + +/** + * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through ipv6 header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return ip6_hdr end of ipv6 header position + */ +const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); + +/** + * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through udp header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return udphdr end of udp header position + */ +const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); + +/** + * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); + * + * @brief parse through dhcpv6 header + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_msg end of dhcpv6 header position + */ +const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); + +/** + * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); + * + * @brief parse through dhcpv6 relay message + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position + */ +const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); + +/** + * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); + * + * @brief parse through dhcpv6 option + * + * @param *buffer message buffer + * @param **out_end pointer + * + * @return dhcpv6_option end of dhcpv6 message option + */ +const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); + +/** + * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); + * + * @brief send udp packet + * + * @param *buffer message buffer + * @param sockaddr_in6 target target socket + * @param n length of message + * @param relay_config *config pointer to relay_config + * @param uint8_t msg_type message type of dhcpv6 option of relayed message + * + * @return dhcpv6_option end of dhcpv6 message option + */ +void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); + diff --git a/src/dhcp6relay/src/subdir.mk b/src/dhcp6relay/src/subdir.mk new file mode 100644 index 000000000000..1c93d490ec63 --- /dev/null +++ b/src/dhcp6relay/src/subdir.mk @@ -0,0 +1,23 @@ +CC := g++ + +C_SRCS += \ +../src/relay.c \ +../src/configInterface.c \ +../src/main.c + +OBJS += \ +./src/relay.o \ +./src/configInterface.o \ +./src/main.o + +C_DEPS += \ +./src/relay.d \ +./src/configInterface.d \ +./src/main.d + +src/%.o: src/%.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + $(CC) -D__FILENAME__="$(subst src/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' diff --git a/src/dhcprelay b/src/dhcprelay deleted file mode 160000 index 40ad1676e4d0..000000000000 --- a/src/dhcprelay +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 40ad1676e4d07c3eec2153017997bb04b33a94c8 From 3445104d72795a9f9ca0e4a6113f095e68206499 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Fri, 9 Sep 2022 05:23:50 +0800 Subject: [PATCH 072/106] [202012] Fix vs check install login timeout issue (#11727) (#12011) Why I did it Fix a build not stable issue: #11620 The vs vm has started successfully, but failed to wait for the message "sonic login:". There were 55 builds failed caused by the issue in the last 30 days. AzurePipelineBuildLogs | where startTime > ago(30d) | where type =~ "task" | where result =~ "failed" | where name =~ "Build sonic image" | where content contains "Timeout exceeded" | where content contains "re.compile('sonic login:')" | project-away content | extend branchName=case(reason=~"pullRequest", tostring(todynamic(parameters)['system.pullRequest.targetBranch']), replace("refs/heads/", "", sourceBranch)) | summarize FailedCount=dcount(buildId) by branchName branchName FailedCount master 37 202012 9 202106 4 202111 2 202205 1 201911 1 It is caused by the login message mixed with the output message of the /etc/rc.local, one of the examples as below: (see the message rc.local[307]: sonic+ onie_disco_subnet=255.255.255.0 login: ) The check_install.py was waiting for the message "sonic login:", and Linux console was waiting for the username input (the login message has already printed in the console). https://dev.azure.com/mssonic/build/_build/results?buildId=123294&view=logs&j=cef3d8a9-152e-5193-620b-567dc18af272&t=359769c4-8b5e-5976-a793-85da132e0a6f 2022-07-17T15:00:58.9198877Z [ 25.493855] rc.local[307]: + onie_disco_opt53=05 2022-07-17T15:00:58.9199330Z [ 25.595054] rc.local[307]: + onie_disco_router=10.0.2.2 2022-07-17T15:00:58.9199781Z [ 25.699409] rc.local[307]: + onie_disco_serverid=10.0.2.2 2022-07-17T15:00:58.9200252Z [ 25.789891] rc.local[307]: + onie_disco_siaddr=10.0.2.2 2022-07-17T15:00:58.9200622Z [ 25.880920] 2022-07-17T15:00:58.9200745Z 2022-07-17T15:00:58.9201019Z Debian GNU/Linux 10 sonic ttyS0 2022-07-17T15:00:58.9201201Z 2022-07-17T15:00:58.9201542Z rc.local[307]: sonic+ onie_disco_subnet=255.255.255.0 login: 2022-07-17T15:00:58.9202309Z [ 26.079767] rc.local[307]: + onie_exec_url=file://dev/vdb/onie-installer.bin How I did it Input a newline when finished to run the script /etc/rc.local. If entering a newline, the message "sonic login:" will prompt again. --- check_install.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check_install.py b/check_install.py index 08759db127f9..6ed5683a2a4e 100755 --- a/check_install.py +++ b/check_install.py @@ -24,6 +24,7 @@ def main(): passwd_prompt = 'Password:' cmd_prompt = "{}@sonic:~\$ $".format(args.u) grub_selection = "The highlighted entry will be executed" + firsttime_prompt = 'firsttime_exit' i = 0 while True: @@ -43,7 +44,7 @@ def main(): # install sonic image while True: - i = p.expect([login_prompt, passwd_prompt, grub_selection, cmd_prompt]) + i = p.expect([login_prompt, passwd_prompt, firsttime_prompt, grub_selection, cmd_prompt]) if i == 0: # send user name p.sendline(args.u) @@ -51,6 +52,10 @@ def main(): # send password p.sendline(args.P) elif i == 2: + # fix a login timeout issue, caused by the login_prompt message mixed with the output message of the rc.local + time.sleep(1) + p.sendline() + elif i == 3: # select onie install p.sendline() else: From 10b6a5c40247885b16de06dd6855585e7f41bb53 Mon Sep 17 00:00:00 2001 From: siqbal1986 Date: Thu, 8 Sep 2022 14:57:20 -0700 Subject: [PATCH 073/106] [202012] StateDB table cleanup for VNET routes (#11999) * added cleanup of tables. 'VNET_ROUTE_TUNNEL_TABLE*', 'VNET_ROUTE_TABLE*' --- files/scripts/swss.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 32d7e3ba4d67..ceb3a057ae3e 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -147,7 +147,7 @@ start() { $SONIC_DB_CLI COUNTERS_DB FLUSHDB $SONIC_DB_CLI FLEX_COUNTER_DB FLUSHDB $SONIC_DB_CLI RESTAPI_DB FLUSHDB - clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*'" + clean_up_tables STATE_DB "'PORT_TABLE*', 'MGMT_PORT_TABLE*', 'VLAN_TABLE*', 'VLAN_MEMBER_TABLE*', 'LAG_TABLE*', 'LAG_MEMBER_TABLE*', 'INTERFACE_TABLE*', 'MIRROR_SESSION*', 'VRF_TABLE*', 'FDB_TABLE*', 'FG_ROUTE_TABLE*', 'BUFFER_POOL*', 'BUFFER_PROFILE*', 'MUX_CABLE_TABLE*', 'ADVERTISE_NETWORK_TABLE*', 'VXLAN_TUNNEL_TABLE*', 'VNET_ROUTE*'" fi # start service docker From 5b9fc0aef504fc8524972d761a4ba484a923123e Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Thu, 8 Sep 2022 19:49:53 -0700 Subject: [PATCH 074/106] [202012][submodule] Update sonic-swss-common submodule (#11994) Update sonic-swss-common submodule pointer to include the following: * VxLAN Tunnel Counters and Rates implementation (#519) ([#679](https://github.com/Azure/sonic-swss-common/pull/679)) --- 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 3925249ab504..30aa38c167c3 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 3925249ab50485bb9e48dbb939a716162911196f +Subproject commit 30aa38c167c34b727e31db6b0e317647e7ff47b7 From aa715b9b4b9581183d0abc42cc52ae46cab9681b Mon Sep 17 00:00:00 2001 From: Sumukha Tumkur Vani Date: Thu, 8 Sep 2022 19:51:20 -0700 Subject: [PATCH 075/106] [202012] [RESTAPI] Update submodule [202012] [RESTAPI] Update submodule Fix missing dependencies and improve dependency management sonic-restapi#123 [Static Route Expiry] Update API contract sonic-restapi#125 [Static Route Expiry] Feature support sonic-restapi#124 Handle IPv6 VNET routes sonic-restapi#127 --- src/sonic-restapi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-restapi b/src/sonic-restapi index bcc6f704a544..dac446feb2be 160000 --- a/src/sonic-restapi +++ b/src/sonic-restapi @@ -1 +1 @@ -Subproject commit bcc6f704a54454f326f069501b01759dbb732bb3 +Subproject commit dac446feb2be3aa348f633a4d2e3c64993d7483a From 5e8332f5058932cd31bfc04e437f05faabdc33dd Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 9 Sep 2022 21:46:28 +0800 Subject: [PATCH 076/106] [ci/build]: Upgrade SONiC package versions (#12039) --- .../versions-deb-buster | 34 +++++++++--------- files/build/versions/default/versions-git | 2 +- .../versions-deb-buster | 18 +++++----- .../docker-platform-monitor/versions-py2 | 2 +- .../docker-platform-monitor/versions-py3 | 2 +- .../docker-syncd-centec-rpc/versions-py2 | 3 ++ .../docker-syncd-mlnx/versions-deb-buster | 36 +++++++++---------- .../dockers/docker-syncd-mlnx/versions-py2 | 2 +- .../dockers/docker-syncd-mlnx/versions-py3 | 2 +- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- .../versions/host-image/versions-deb-buster | 2 +- files/build/versions/host-image/versions-py3 | 4 +-- .../host-image/versions-py3-all-arm64 | 1 + .../host-image/versions-py3-all-armhf | 1 + 15 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 files/build/versions/host-image/versions-py3-all-arm64 diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster index 131f0755077b..79d904a93254 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster @@ -1,9 +1,9 @@ -applibs==1.mlnx.4.5.2318 -applibs-dev==1.mlnx.4.5.2318 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 bfnplatform==1.0.0 innovium-sai==0.107.6 innovium-sai-headers==0.107.6 -iproute2-dev==1.mlnx.4.5.2318 +iproute2-dev==1.mlnx.4.5.2320 isc-dhcp-relay==4.4.1-2 kernel-mft-dkms==4.18.0-106 libhiredis-dev==0.14.0-3~bpo9+1 @@ -55,20 +55,20 @@ sonic-mgmt-common==1.0.0 sonic-mgmt-common-codegen==1.0.0 sonic-mgmt-framework==1.0-01 swss==1.0.0 -sx-acl-helper==1.mlnx.4.5.2318 -sx-acl-helper-dev==1.mlnx.4.5.2318 -sx-complib==1.mlnx.4.5.2318 -sx-complib-dev==1.mlnx.4.5.2318 -sx-examples==1.mlnx.4.5.2318 -sx-examples-dev==1.mlnx.4.5.2318 -sx-gen-utils==1.mlnx.4.5.2318 -sx-gen-utils-dev==1.mlnx.4.5.2318 -sx-scew==1.mlnx.4.5.2318 -sx-scew-dev==1.mlnx.4.5.2318 -sxd-libs==1.mlnx.4.5.2318 -sxd-libs-dev==1.mlnx.4.5.2318 +sx-acl-helper==1.mlnx.4.5.2320 +sx-acl-helper-dev==1.mlnx.4.5.2320 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-examples==1.mlnx.4.5.2320 +sx-examples-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sx-scew==1.mlnx.4.5.2320 +sx-scew-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 syncd==1.0.0 syncd-vs==1.0.0 thrift-compiler==0.11.0-4 -wjh-libs==1.mlnx.4.5.2318 -wjh-libs-dev==1.mlnx.4.5.2318 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2320 +wjh-libs-dev==1.mlnx.4.5.2320 \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index fff02985866d..beefaabdb03c 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==a089281a82f9481e246dcc1292145d0e8635f51c +https://chromium.googlesource.com/chromium/tools/depot_tools.git==443f9851a46a45b5caac81a64704cb48f52e961b 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-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index eee6e7112be4..fe10cb5261a2 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -1,5 +1,5 @@ -applibs==1.mlnx.4.5.2318 -applibs-dev==1.mlnx.4.5.2318 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 binutils==2.31.1-16 binutils-common==2.31.1-16 binutils-x86-64-linux-gnu==2.31.1-16 @@ -108,7 +108,7 @@ python-dev==2.7.16-1 python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 -python-sdk-api==1.mlnx.4.5.2318 +python-sdk-api==1.mlnx.4.5.2320 python-smbus==4.1-1 python-swsscommon==1.0.0 python2==2.7.16-1 @@ -129,12 +129,12 @@ sensord-dbgsym==1:3.5.0-3 smartmontools==6.6-1 sshpass==1.06-1 strace==4.26-0.2 -sx-complib==1.mlnx.4.5.2318 -sx-complib-dev==1.mlnx.4.5.2318 -sx-gen-utils==1.mlnx.4.5.2318 -sx-gen-utils-dev==1.mlnx.4.5.2318 -sxd-libs==1.mlnx.4.5.2318 -sxd-libs-dev==1.mlnx.4.5.2318 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 ucf==3.0038+nmu1 udev==241-7~deb10u8 vim==2:8.1.0875-5+deb10u2 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py2 b/files/build/versions/dockers/docker-platform-monitor/versions-py2 index 46f00feb42ad..ef1c55ef6e56 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py2 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py2 @@ -14,7 +14,7 @@ netaddr==0.8.0 pathlib2==2.3.7.post1 pyang==2.5.3 pyangbind==0.6.0 -python-sdk-api==4.5.2318 +python-sdk-api==4.5.2320 pyyaml==5.4.1 redis==3.5.3 redis-dump-load==1.1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-py3 b/files/build/versions/dockers/docker-platform-monitor/versions-py3 index 95c54aad2eae..3b41ecca6169 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-py3 +++ b/files/build/versions/dockers/docker-platform-monitor/versions-py3 @@ -1,3 +1,3 @@ jsonschema==2.6.0 -python_sdk_api==4.5.2318 +python_sdk_api==4.5.2320 thrift==0.13.0 \ No newline at end of file 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 e16074ca518b..60b9f31f8e4a 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-py2 @@ -1,2 +1,5 @@ +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/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index 03d0fa93cc1c..b79cef8243c7 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -1,8 +1,8 @@ -applibs==1.mlnx.4.5.2318 -applibs-dev==1.mlnx.4.5.2318 +applibs==1.mlnx.4.5.2320 +applibs-dev==1.mlnx.4.5.2320 gdb==8.2.1-2+b3 gdbserver==8.2.1-2+b3 -iproute2-dev==1.mlnx.4.5.2318 +iproute2-dev==1.mlnx.4.5.2320 libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libc-dev-bin==2.28-10+deb10u1 @@ -41,7 +41,7 @@ python-minimal==2.7.16-1 python-pip==18.1-5 python-pip-whl==18.1-5 python-pkg-resources==40.8.0-1 -python-sdk-api==1.mlnx.4.5.2318 +python-sdk-api==1.mlnx.4.5.2320 python-setuptools==40.8.0-1 python2==2.7.16-1 python2-dev==2.7.16-1 @@ -51,21 +51,21 @@ python2.7-dev==2.7.16-2+deb10u1 python2.7-minimal==2.7.16-2+deb10u1 sshpass==1.06-1 strace==4.26-0.2 -sx-acl-helper==1.mlnx.4.5.2318 -sx-acl-helper-dev==1.mlnx.4.5.2318 -sx-complib==1.mlnx.4.5.2318 -sx-complib-dev==1.mlnx.4.5.2318 -sx-examples==1.mlnx.4.5.2318 -sx-examples-dev==1.mlnx.4.5.2318 -sx-gen-utils==1.mlnx.4.5.2318 -sx-gen-utils-dev==1.mlnx.4.5.2318 -sx-scew==1.mlnx.4.5.2318 -sx-scew-dev==1.mlnx.4.5.2318 -sxd-libs==1.mlnx.4.5.2318 -sxd-libs-dev==1.mlnx.4.5.2318 +sx-acl-helper==1.mlnx.4.5.2320 +sx-acl-helper-dev==1.mlnx.4.5.2320 +sx-complib==1.mlnx.4.5.2320 +sx-complib-dev==1.mlnx.4.5.2320 +sx-examples==1.mlnx.4.5.2320 +sx-examples-dev==1.mlnx.4.5.2320 +sx-gen-utils==1.mlnx.4.5.2320 +sx-gen-utils-dev==1.mlnx.4.5.2320 +sx-scew==1.mlnx.4.5.2320 +sx-scew-dev==1.mlnx.4.5.2320 +sxd-libs==1.mlnx.4.5.2320 +sxd-libs-dev==1.mlnx.4.5.2320 syncd==1.0.0 syncd-dbg==1.0.0 vim==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 -wjh-libs==1.mlnx.4.5.2318 -wjh-libs-dev==1.mlnx.4.5.2318 \ No newline at end of file +wjh-libs==1.mlnx.4.5.2320 +wjh-libs-dev==1.mlnx.4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 index c93675e51015..1f331339b2a0 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py2 @@ -1 +1 @@ -python-sdk-api==4.5.2318 \ No newline at end of file +python-sdk-api==4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 index 73eea649d6a2..7a17510aeb5e 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-py3 @@ -1 +1 @@ -python_sdk_api==4.5.2318 \ No newline at end of file +python_sdk_api==4.5.2320 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index b9783271f47a..262b4ecd8209 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==a089281a82f9481e246dcc1292145d0e8635f51c +https://chromium.googlesource.com/chromium/tools/depot_tools.git==443f9851a46a45b5caac81a64704cb48f52e961b 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 b9783271f47a..262b4ecd8209 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==a089281a82f9481e246dcc1292145d0e8635f51c +https://chromium.googlesource.com/chromium/tools/depot_tools.git==443f9851a46a45b5caac81a64704cb48f52e961b 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 9db16421eed4..d0703d02a49b 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -311,7 +311,7 @@ squashfs-tools==1:4.3-12+deb10u2 sudo==1.8.27-1+deb10u3 swig==3.0.12-2 swig3.0==3.0.12-2 -sx-kernel==1.mlnx.4.5.2318 +sx-kernel==1.mlnx.4.5.2320 sysfsutils==2.1.0+repack-5 systemd==247.3-6~bpo10+1 systemd-sonic-generator==1.0.0 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index afa7e2a9326e..2ceee4ead1cf 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -2,11 +2,11 @@ azure-common==1.1.28 azure-nspkg==3.0.2 azure-storage==0.36.0 bitarray==1.5.3 -certifi==2022.6.15 +certifi==2022.6.15.1 cffi==1.15.1 charset-normalizer==2.1.1 click==7.0 -cryptography==37.0.4 +cryptography==38.0.1 docker==4.3.1 idna==3.3 ijson==2.6.1 diff --git a/files/build/versions/host-image/versions-py3-all-arm64 b/files/build/versions/host-image/versions-py3-all-arm64 new file mode 100644 index 000000000000..7e5f6237fd0b --- /dev/null +++ b/files/build/versions/host-image/versions-py3-all-arm64 @@ -0,0 +1 @@ +certifi==2022.6.15 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3-all-armhf b/files/build/versions/host-image/versions-py3-all-armhf index 431dc5a43838..9675eeb0dc50 100644 --- a/files/build/versions/host-image/versions-py3-all-armhf +++ b/files/build/versions/host-image/versions-py3-all-armhf @@ -1 +1,2 @@ +certifi==2022.6.15 cryptography==3.3.1 \ No newline at end of file From 81e139f48307fece4cfc6c0f35a4a63cce2c7a57 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Fri, 9 Sep 2022 16:43:09 -0700 Subject: [PATCH 077/106] VxLAN Tunnel Counters and Rates implementation (#8369) (#11986) * Enable flex counters for Vxlan tunnel * VxLAN Tunnel Counters and Rates implementation (#8369) (#11986) --- 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 a00bd3facce7..0c966593f5b2 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 37ada92ad58b09581943c8465ce5a4ec541d6a8b Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 11 Sep 2022 18:59:58 +0800 Subject: [PATCH 078/106] [ci/build]: Upgrade SONiC package versions (#12043) --- files/build/versions/default/versions-git | 2 +- .../docker-base-buster/versions-deb-buster | 8 +- .../versions-deb-buster-arm64 | 4 +- .../versions-deb-buster-armhf | 4 +- .../versions-deb-buster | 4 +- .../docker-sonic-mgmt-framework/versions-py3 | 2 +- .../docker-sonic-vs/versions-deb-buster | 12 +-- .../dockers/docker-sonic-vs/versions-py3 | 2 +- .../docker-syncd-bfn-rpc/versions-deb-buster | 6 +- .../docker-syncd-brcm-rpc/versions-deb-buster | 6 +- .../versions-deb-buster | 6 +- .../docker-syncd-mlnx-rpc/versions-deb-buster | 6 +- .../sonic-slave-buster/versions-deb-buster | 92 +++++++++---------- .../versions-deb-buster-arm64 | 2 +- .../versions-deb-buster-armhf | 2 +- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- .../host-base-image/versions-deb-buster | 16 ++-- .../versions/host-image/versions-deb-buster | 23 ++--- .../host-image/versions-deb-buster-arm64 | 28 +----- .../host-image/versions-deb-buster-armhf | 28 +----- .../host-image/versions-py3-all-arm64 | 1 - .../host-image/versions-py3-all-armhf | 1 - 23 files changed, 104 insertions(+), 155 deletions(-) delete mode 100644 files/build/versions/host-image/versions-py3-all-arm64 diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index beefaabdb03c..686c4ce896aa 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==443f9851a46a45b5caac81a64704cb48f52e961b +https://chromium.googlesource.com/chromium/tools/depot_tools.git==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 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 b73b037c50c9..c6c2a79c8b20 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -11,14 +11,14 @@ libexpat1==2.2.6-2+deb10u4 libfastjson4==0.99.8-2 libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 -libgssapi-krb5-2==1.17-3+deb10u3 +libgssapi-krb5-2==1.17-3+deb10u4 libjansson4==2.12-1 libjemalloc2==5.1.0-3 libjq1==1.5+dfsg-2+b1 -libk5crypto3==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 libkeyutils1==1.6-6 -libkrb5-3==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libldap-2.4-2==2.4.47+dfsg-3+deb10u7 libldap-common==2.4.47+dfsg-3+deb10u7 liblognorm5==2.0.5-1 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 index 1f699501031d..e41cb53abe80 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 @@ -5,7 +5,7 @@ libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 -libxslt1-dev==1.1.32-2.2~deb10u1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 +libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf index 967b10df80c8..04588e0ccb8b 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf @@ -5,7 +5,7 @@ libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 -libxslt1-dev==1.1.32-2.2~deb10u1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 +libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index fe10cb5261a2..d2ea89bc3b57 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -38,8 +38,8 @@ libedit2==3.1-20181209-1 libexpat1-dev==2.2.6-2+deb10u4 libfontconfig1==2.13.1-2 libfreeipmi17==1.6.3-1.1 -libfreetype6==2.9.1-3+deb10u2 -libfribidi0==1.0.5-3.1+deb10u1 +libfreetype6==2.9.1-3+deb10u3 +libfribidi0==1.0.5-3.1+deb10u2 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u3 libgomp1==8.3.0-6 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 7d32d2f08aad..e8290b7742dd 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -12,7 +12,7 @@ importlib-metadata==4.12.0 importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 -jsonschema==4.15.0 +jsonschema==4.16.0 jsonschema-spec==0.1.1 lazy-object-proxy==1.7.1 openapi-schema-validator==0.3.3 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index 4d8a15f57215..1fef1edfbbfb 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -28,8 +28,8 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -grub-common==2.02+dfsg1-20+deb10u4 -grub2-common==2.02+dfsg1-20+deb10u4 +grub-common==2.06-3~deb10u1 +grub2-common==2.06-3~deb10u1 ifupdown==0.8.35 iptables==1.8.2-4 libasan5==8.3.0-6 @@ -51,7 +51,7 @@ libedit2==3.1-20181209-1 libefiboot1==37-2+deb10u1 libefivar1==37-2+deb10u1 libexpat1-dev==2.2.6-2+deb10u4 -libfreetype6==2.9.1-3+deb10u2 +libfreetype6==2.9.1-3+deb10u3 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u3 @@ -88,9 +88,9 @@ libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 libpython3-dev==3.7.3-1 libpython3.7-dev==3.7.3-2+deb10u3 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 libsaimetadata==1.0.0 libsairedis==1.0.0 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index 005f34eaba73..a33bfa1e168e 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,4 +1,4 @@ -certifi==2022.6.15 +certifi==2022.6.15.1 charset-normalizer==2.1.1 click==7.0 idna==3.3 diff --git a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster index f9af0d7d4e73..83dcc958c5a2 100644 --- a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster @@ -39,9 +39,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster index ada44fa26eb0..662bcb8745f8 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster @@ -40,9 +40,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster index 099d8c888783..cb40c38d3f70 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster @@ -42,9 +42,9 @@ libpython2.7==2.7.16-2+deb10u1 libpython2.7-dev==2.7.16-2+deb10u1 libpython2.7-minimal==2.7.16-2+deb10u1 libpython2.7-stdlib==2.7.16-2+deb10u1 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster index b7a3d88403b3..d7e2c268d7be 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster @@ -30,9 +30,9 @@ libmpfr6==4.0.2-1 libmpx2==8.3.0-6 libpcre2-16-0==10.32-5 libpcre2-8-0==10.32-5 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 libquadmath0==8.3.0-6 librhash0==1.3.8-1 libssl-dev==1.1.1n-0+deb10u3 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 c7f34c908429..20d822b69226 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -66,7 +66,7 @@ dconf-service==0.30.1-2 dctrl-tools==2.24-3 debhelper==12.1.1 debian-keyring==2019.02.25 -debootstrap==1.0.114 +debootstrap==1.0.114+deb10u1 default-jdk-headless==2:1.11-71 default-jre==2:1.11-71 default-jre-headless==2:1.11-71 @@ -83,7 +83,7 @@ dh-systemd==12.1.1 dictionaries-common==1.28.1 diffstat==1.62-1 dirmngr==2.2.12-1+deb10u2 -distro-info-data==0.41+deb10u4 +distro-info-data==0.41+deb10u5 dkms==2.6.1-4 dmeventd==2:1.02.155-3 dmsetup==2:1.02.155-3 @@ -199,8 +199,8 @@ javahelper==0.72.9 javascript-common==11 kernel-wedge==2.99 kmod==26-1 -krb5-locales==1.17-3+deb10u3 -krb5-multidev==1.17-3+deb10u3 +krb5-locales==1.17-3+deb10u4 +krb5-multidev==1.17-3+deb10u4 lcov==1.13-4 less==487-0.1+b1 lib32asan5==8.3.0-6 @@ -503,10 +503,10 @@ libfontconfig1==2.13.1-2 libfontconfig1-dev==2.13.1-2 libfontenc1==1:1.1.3-1+b2 libfop-java==1:2.3-2 -libfreetype6==2.9.1-3+deb10u2 -libfreetype6-dev==2.9.1-3+deb10u2 -libfribidi-dev==1.0.5-3.1+deb10u1 -libfribidi0==1.0.5-3.1+deb10u1 +libfreetype6==2.9.1-3+deb10u3 +libfreetype6-dev==2.9.1-3+deb10u3 +libfribidi-dev==1.0.5-3.1+deb10u2 +libfribidi0==1.0.5-3.1+deb10u2 libfstrm0==0.4.0-1 libfuture-perl==0.39-1 libgail-common==2.24.32-3 @@ -566,8 +566,8 @@ libgraphite2-dev==1.3.13-7 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 +libgssapi-krb5-2==1.17-3+deb10u4 +libgssrpc4==1.17-3+deb10u4 libgstreamer-plugins-base1.0-0==1.14.4-2+deb10u1 libgstreamer1.0-0==1.14.4-1 libgtest-dev==1.8.1-3 @@ -689,16 +689,16 @@ libjudy-dev==1.0.5-5 libjudydebian1==1.0.5-5 libjxr-tools==1.1-6+b1 libjxr0==1.1-6+b1 -libk5crypto3==1.17-3+deb10u3 -libkadm5clnt-mit11==1.17-3+deb10u3 -libkadm5srv-mit11==1.17-3+deb10u3 -libkdb5-9==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 +libkadm5clnt-mit11==1.17-3+deb10u4 +libkadm5srv-mit11==1.17-3+deb10u4 +libkdb5-9==1.17-3+deb10u4 libkeyutils1==1.6-6 libkmod2==26-1 libkpathsea6==2018.20181218.49446-1 -libkrb5-3==1.17-3+deb10u3 -libkrb5-dev==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5-dev==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libksba8==1.3.5-2 liblab-gamut1==2.40.1-6+deb10u1 liblcms2-2==2.9-3 @@ -793,7 +793,7 @@ libnet-http-perl==6.18-1 libnet-ip-perl==1.26-2 libnet-libidn-perl==0.12.ds-3+b1 libnet-smtp-ssl-perl==1.04-1 -libnet-ssleay-perl==1.85-2+b1 +libnet-ssleay-perl==1.85-2+deb10u1 libnetfilter-conntrack-dev==1.0.7-1 libnetfilter-conntrack3==1.0.7-1 libnetpbm10==2:10.0-15.3+b2 @@ -966,20 +966,20 @@ libqt4-svg==4:4.8.7+dfsg-18+deb10u1 libqt4-test==4:4.8.7+dfsg-18+deb10u1 libqt4-xml==4:4.8.7+dfsg-18+deb10u1 libqt4-xmlpatterns==4:4.8.7+dfsg-18+deb10u1 -libqt5concurrent5==5.11.3+dfsg1-1+deb10u4 -libqt5core5a==5.11.3+dfsg1-1+deb10u4 -libqt5dbus5==5.11.3+dfsg1-1+deb10u4 -libqt5gui5==5.11.3+dfsg1-1+deb10u4 -libqt5network5==5.11.3+dfsg1-1+deb10u4 -libqt5opengl5==5.11.3+dfsg1-1+deb10u4 -libqt5opengl5-dev==5.11.3+dfsg1-1+deb10u4 -libqt5printsupport5==5.11.3+dfsg1-1+deb10u4 -libqt5sql5==5.11.3+dfsg1-1+deb10u4 -libqt5sql5-sqlite==5.11.3+dfsg1-1+deb10u4 +libqt5concurrent5==5.11.3+dfsg1-1+deb10u5 +libqt5core5a==5.11.3+dfsg1-1+deb10u5 +libqt5dbus5==5.11.3+dfsg1-1+deb10u5 +libqt5gui5==5.11.3+dfsg1-1+deb10u5 +libqt5network5==5.11.3+dfsg1-1+deb10u5 +libqt5opengl5==5.11.3+dfsg1-1+deb10u5 +libqt5opengl5-dev==5.11.3+dfsg1-1+deb10u5 +libqt5printsupport5==5.11.3+dfsg1-1+deb10u5 +libqt5sql5==5.11.3+dfsg1-1+deb10u5 +libqt5sql5-sqlite==5.11.3+dfsg1-1+deb10u5 libqt5svg5==5.11.3-2 -libqt5test5==5.11.3+dfsg1-1+deb10u4 -libqt5widgets5==5.11.3+dfsg1-1+deb10u4 -libqt5xml5==5.11.3+dfsg1-1+deb10u4 +libqt5test5==5.11.3+dfsg1-1+deb10u5 +libqt5widgets5==5.11.3+dfsg1-1+deb10u5 +libqt5xml5==5.11.3+dfsg1-1+deb10u5 libqtcore4==4:4.8.7+dfsg-18+deb10u1 libqtdbus4==4:4.8.7+dfsg-18+deb10u1 libqtgui4==4:4.8.7+dfsg-18+deb10u1 @@ -999,8 +999,8 @@ librhash0==1.3.8-1 librole-tiny-perl==2.000006-1 librrd-dev==1.7.1-2 librrd8==1.7.1-2 -librsvg2-2==2.44.10-2.1 -librsvg2-common==2.44.10-2.1 +librsvg2-2==2.44.10-2.1+deb10u3 +librsvg2-common==2.44.10-2.1+deb10u3 librtmp1==2.4+20151223.gitfa8646d.1-2 librubberband2==1.8.1-7 libruby2.5==2.5.5-3+deb10u4 @@ -1290,7 +1290,7 @@ libxrender-dev==1:0.9.10-1 libxrender1==1:0.9.10-1 libxshmfence-dev==1.3-1 libxshmfence1==1.3-1 -libxslt1.1==1.1.32-2.2~deb10u1 +libxslt1.1==1.1.32-2.2~deb10u2 libxss1==1:1.2.3-1 libxt-dev==1:1.1.5-1+b3 libxt6==1:1.1.5-1+b3 @@ -1429,12 +1429,12 @@ poppler-data==0.4.9-2 pps-tools==1.0.2-1 preview-latex-style==11.91-2 pristine-tar==1.46 -procmail==3.22-26 +procmail==3.22-26+deb10u1 procps==2:3.3.15-2 protobuf-compiler==3.6.1.3-2 psmisc==23.2-1+deb10u1 psutils==1.17.dfsg-4 -publicsuffix==20211109.1735-0+deb10u1 +publicsuffix==20220811.1734-0+deb10u1 pylint==1.9.4-1 python==2.7.16-1 python-alabaster==0.7.8-1 @@ -1521,9 +1521,9 @@ python-soupsieve==1.8+dfsg-1 python-sphinx==1.8.4-1 python-stdeb==0.8.5-1 python-tk==2.7.16-2 -python-twisted==18.9.0-3 -python-twisted-bin==18.9.0-3 -python-twisted-core==18.9.0-3 +python-twisted==18.9.0-3+deb10u1 +python-twisted-bin==18.9.0-3+deb10u1 +python-twisted-core==18.9.0-3+deb10u1 python-typing==3.6.6-1 python-tz==2019.1-1 python-urllib3==1.24.1-1 @@ -1618,12 +1618,12 @@ 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 -qt5-default==5.11.3+dfsg1-1+deb10u4 -qt5-gtk-platformtheme==5.11.3+dfsg1-1+deb10u4 -qt5-qmake==5.11.3+dfsg1-1+deb10u4 -qt5-qmake-bin==5.11.3+dfsg1-1+deb10u4 -qtbase5-dev==5.11.3+dfsg1-1+deb10u4 -qtbase5-dev-tools==5.11.3+dfsg1-1+deb10u4 +qt5-default==5.11.3+dfsg1-1+deb10u5 +qt5-gtk-platformtheme==5.11.3+dfsg1-1+deb10u5 +qt5-qmake==5.11.3+dfsg1-1+deb10u5 +qt5-qmake-bin==5.11.3+dfsg1-1+deb10u5 +qtbase5-dev==5.11.3+dfsg1-1+deb10u5 +qtbase5-dev-tools==5.11.3+dfsg1-1+deb10u5 qtchooser==66-2 qtcore4-l10n==4:4.8.7+dfsg-18+deb10u1 qttranslations5-l10n==5.11.3-2 @@ -1724,7 +1724,7 @@ xfonts-utils==1:7.7+6 xkb-data==2.26-2 xml-core==0.18+nmu1 xorg-sgml-doctools==1:1.11-1 -xsltproc==1.1.32-2.2~deb10u1 +xsltproc==1.1.32-2.2~deb10u2 xterm==344-1+deb10u2 xtrans-dev==1.3.5-1 xxd==2:8.1.0875-5+deb10u2 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 index ae8f49c2dc58..28d7f9a6edb3 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 @@ -3,5 +3,5 @@ libdrm-etnaviv1==2.4.97-1 libdrm-freedreno1==2.4.97-1 libdrm-tegra0==2.4.97-1 libtext-iconv-perl==1.7-5+b6 -libxslt1-dev==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 nodejs==14.20.0-deb-1nodesource1 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf index a994f5f0fe27..ea310c2fd01f 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf @@ -97,7 +97,7 @@ libsombok3==2.4.0-2 libspecio-perl==0.43-1 libunicode-linebreak-perl==0.0.20190101-1 libxapian-dev==1.4.11-1 -libxslt1-dev==1.1.32-2.2~deb10u1 +libxslt1-dev==1.1.32-2.2~deb10u2 libyaml-tiny-perl==1.73-1 linux-compiler-gcc-8-arm==4.19.249-2 llvm-6.0==1:6.0.1-10 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 262b4ecd8209..5a794f76868e 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==443f9851a46a45b5caac81a64704cb48f52e961b +https://chromium.googlesource.com/chromium/tools/depot_tools.git==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 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 262b4ecd8209..5a794f76868e 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==443f9851a46a45b5caac81a64704cb48f52e961b +https://chromium.googlesource.com/chromium/tools/depot_tools.git==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file diff --git a/files/build/versions/host-base-image/versions-deb-buster b/files/build/versions/host-base-image/versions-deb-buster index d95e8a34c208..44598d7dbfb3 100644 --- a/files/build/versions/host-base-image/versions-deb-buster +++ b/files/build/versions/host-base-image/versions-deb-buster @@ -1,6 +1,6 @@ adduser==3.118 apt==1.8.2.3 -base-files==10.3+deb10u12 +base-files==10.3+deb10u13 base-passwd==3.5.46 bash==5.0-4 bsdutils==1:2.33.1-0.1 @@ -10,14 +10,14 @@ debconf==1.5.71+deb10u1 debian-archive-keyring==2019.1+deb10u1 debianutils==4.8.6.1 diffutils==1:3.7-3 -dpkg==1.19.7 +dpkg==1.19.8 e2fsprogs==1.44.5-1+deb10u3 fdisk==2.33.1-0.1 findutils==4.6.0+git+20190209-2 gcc-8-base==8.3.0-6 -gpgv==2.2.12-1+deb10u1 +gpgv==2.2.12-1+deb10u2 grep==3.3-1 -gzip==1.9-3 +gzip==1.9-3+deb10u1 hostname==3.21 init-system-helpers==1.56+nmu1 libacl1==2.2.53-4 @@ -39,12 +39,12 @@ libffi6==3.2.1-9 libgcc1==1:8.3.0-6 libgcrypt20==1.8.4-5+deb10u1 libgmp10==2:6.1.2+dfsg-4+deb10u1 -libgnutls30==3.6.7-4+deb10u7 +libgnutls30==3.6.7-4+deb10u8 libgpg-error0==1.35-1 libhogweed4==3.4.1-1+deb10u1 libidn2-0==2.0.5-1+deb10u1 liblz4-1==1.8.3-1+deb10u1 -liblzma5==5.2.4-1 +liblzma5==5.2.4-1+deb10u1 libmount1==2.33.1-0.1 libncursesw6==6.1+20181013-2+deb10u2 libnettle6==3.4.1-1+deb10u1 @@ -79,6 +79,6 @@ perl-base==5.28.1-6+deb10u1 sed==4.7-1 sysvinit-utils==2.93-8 tar==1.30+dfsg-6 -tzdata==2021a-0+deb10u3 +tzdata==2021a-0+deb10u6 util-linux==2.33.1-0.1 -zlib1g==1:1.2.11.dfsg-1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u1 \ 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 d0703d02a49b..be7292013fdd 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -24,12 +24,11 @@ dbus==1.12.20-0+deb10u1 device-tree-compiler==1.4.7-4 dh-python==3.20190308 dirmngr==2.2.12-1+deb10u2 -distro-info-data==0.41+deb10u4 +distro-info-data==0.41+deb10u5 dmidecode==3.2-1 dmsetup==2:1.02.155-3 docker-ce==5:18.09.8~3-0~debian-buster docker-ce-cli==5:18.09.8~3-0~debian-buster -dpkg==1.19.8 dpkg-dev==1.19.8 ebtables==2.0.10.4+snapshot20181205-3 efibootmgr==15-1 @@ -57,10 +56,8 @@ gpg-wks-client==2.2.12-1+deb10u2 gpg-wks-server==2.2.12-1+deb10u2 gpgconf==2.2.12-1+deb10u2 gpgsm==2.2.12-1+deb10u2 -gpgv==2.2.12-1+deb10u2 -grub-common==2.02+dfsg1-20+deb10u4 -grub2-common==2.02+dfsg1-20+deb10u4 -gzip==1.9-3+deb10u1 +grub-common==2.06-3~deb10u1 +grub2-common==2.06-3~deb10u1 haveged==1.9.1-7 hdparm==9.58+ds-1 hping3==3.a2.ds2-7 @@ -120,7 +117,7 @@ libexpat1-dev==2.2.6-2+deb10u4 libfastjson4==0.99.8-2 libffi-dev==3.2.1-9 libfreeipmi17==1.6.3-1.1 -libfreetype6==2.9.1-3+deb10u2 +libfreetype6==2.9.1-3+deb10u3 libftdi1-2==1.4-1+b2 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 @@ -131,7 +128,7 @@ libglib2.0-0==2.58.3-2+deb10u3 libgnutls30==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgpm2==1.20.7-5 -libgssapi-krb5-2==1.17-3+deb10u3 +libgssapi-krb5-2==1.17-3+deb10u4 libhavege1==1.9.1-7 libhiredis0.14==0.14.0-3~bpo9+1 libi2c0==4.1-1 @@ -144,18 +141,17 @@ libisl19==0.20-2 libitm1==8.3.0-6 libjq1==1.5+dfsg-2+b1 libjson-c3==0.12.1+ds-2+deb10u1 -libk5crypto3==1.17-3+deb10u3 +libk5crypto3==1.17-3+deb10u4 libkeyutils1==1.6-6 libklibc==2.0.6-1+deb10u1 libkmod2==26-1 -libkrb5-3==1.17-3+deb10u3 -libkrb5support0==1.17-3+deb10u3 +libkrb5-3==1.17-3+deb10u4 +libkrb5support0==1.17-3+deb10u4 libksba8==1.3.5-2 libldap-2.4-2==2.4.47+dfsg-3+deb10u7 libldap-common==2.4.47+dfsg-3+deb10u7 liblognorm5==2.0.5-1 liblsan0==8.3.0-6 -liblzma5==5.2.4-1+deb10u1 liblzo2-2==2.10-0.1 libmagic-mgc==1:5.35-4+deb10u2 libmagic1==1:5.35-4+deb10u2 @@ -330,5 +326,4 @@ vim==2:8.1.0875-5+deb10u2 vim-common==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 xxd==2:8.1.0875-5+deb10u2 -xz-utils==5.2.4-1+deb10u1 -zlib1g==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +xz-utils==5.2.4-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index a559cd4126a6..86853a6d9ac9 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -1,38 +1,16 @@ 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 -gnupg-l10n==2.2.12-1+deb10u1 -gnupg-utils==2.2.12-1+deb10u1 -gnupg2==2.2.12-1+deb10u1 -gpg==2.2.12-1+deb10u1 -gpg-agent==2.2.12-1+deb10u1 -gpg-wks-client==2.2.12-1+deb10u1 -gpg-wks-server==2.2.12-1+deb10u1 -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 -libldap-2.4-2==2.4.47+dfsg-3+deb10u6 -libldap-common==2.4.47+dfsg-3+deb10u6 -libssl-dev==1.1.1n-0+deb10u1 -libssl1.1==1.1.1n-0+deb10u1 -libxml2==2.9.4+dfsg1-7+deb10u3 -libxml2-dev==2.9.4+dfsg1-7+deb10u3 +libxml2==2.9.4+dfsg1-7+deb10u4 +libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-arm64-unsigned==4.19.152-1 -linux-libc-dev==4.19.235-1 -openssl==1.1.1n-0+deb10u1 pkg-config==0.29-6 -rsyslog==8.1901.0-1+deb10u1 tsingma-bsp==1.0 -tzdata==2021a-0+deb10u6 -xz-utils==5.2.4-1 -zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file +zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ 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 8516bf3e77b9..b119c920e8c4 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -1,38 +1,16 @@ 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 -gnupg-l10n==2.2.12-1+deb10u1 -gnupg-utils==2.2.12-1+deb10u1 -gnupg2==2.2.12-1+deb10u1 -gpg==2.2.12-1+deb10u1 -gpg-agent==2.2.12-1+deb10u1 -gpg-wks-client==2.2.12-1+deb10u1 -gpg-wks-server==2.2.12-1+deb10u1 -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 -libldap-2.4-2==2.4.47+dfsg-3+deb10u6 -libldap-common==2.4.47+dfsg-3+deb10u6 -libssl-dev==1.1.1n-0+deb10u1 -libssl1.1==1.1.1n-0+deb10u1 -libxml2==2.9.4+dfsg1-7+deb10u3 -libxml2-dev==2.9.4+dfsg1-7+deb10u3 +libxml2==2.9.4+dfsg1-7+deb10u4 +libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-armmp==4.19.152-1 -linux-libc-dev==4.19.235-1 mrvlprestera==1.0 -openssl==1.1.1n-0+deb10u1 pkg-config==0.29-6 -rsyslog==8.1901.0-1+deb10u1 -tzdata==2021a-0+deb10u6 -xz-utils==5.2.4-1 -zlib1g-dev==1:1.2.11.dfsg-1 \ No newline at end of file +zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3-all-arm64 b/files/build/versions/host-image/versions-py3-all-arm64 deleted file mode 100644 index 7e5f6237fd0b..000000000000 --- a/files/build/versions/host-image/versions-py3-all-arm64 +++ /dev/null @@ -1 +0,0 @@ -certifi==2022.6.15 \ No newline at end of file diff --git a/files/build/versions/host-image/versions-py3-all-armhf b/files/build/versions/host-image/versions-py3-all-armhf index 9675eeb0dc50..431dc5a43838 100644 --- a/files/build/versions/host-image/versions-py3-all-armhf +++ b/files/build/versions/host-image/versions-py3-all-armhf @@ -1,2 +1 @@ -certifi==2022.6.15 cryptography==3.3.1 \ No newline at end of file From 2f7ca1d7b62cb02d0361a70f115f0b9ecf4946ab Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Mon, 12 Sep 2022 18:12:05 -0700 Subject: [PATCH 079/106] Add dhcprelay submodule (#12030) --- .gitmodules | 4 + rules/dhcp6relay.dep | 9 - rules/dhcp6relay.mk | 12 - rules/dhcprelay.dep | 11 + rules/dhcprelay.mk | 12 + rules/docker-dhcp-relay.mk | 4 +- src/dhcp6relay/.gitignore | 5 - src/dhcp6relay/Makefile | 42 -- src/dhcp6relay/debian/changelog | 5 - src/dhcp6relay/debian/compat | 1 - src/dhcp6relay/debian/control | 17 - src/dhcp6relay/debian/rules | 6 - src/dhcp6relay/src/configInterface.cpp | 152 ----- src/dhcp6relay/src/configInterface.h | 75 --- src/dhcp6relay/src/main.cpp | 18 - src/dhcp6relay/src/relay.cpp | 861 ------------------------- src/dhcp6relay/src/relay.h | 358 ---------- src/dhcp6relay/src/subdir.mk | 23 - src/dhcprelay | 1 + 19 files changed, 30 insertions(+), 1586 deletions(-) delete mode 100644 rules/dhcp6relay.dep delete mode 100644 rules/dhcp6relay.mk create mode 100644 rules/dhcprelay.dep create mode 100644 rules/dhcprelay.mk delete mode 100644 src/dhcp6relay/.gitignore delete mode 100644 src/dhcp6relay/Makefile delete mode 100644 src/dhcp6relay/debian/changelog delete mode 100644 src/dhcp6relay/debian/compat delete mode 100644 src/dhcp6relay/debian/control delete mode 100755 src/dhcp6relay/debian/rules delete mode 100644 src/dhcp6relay/src/configInterface.cpp delete mode 100644 src/dhcp6relay/src/configInterface.h delete mode 100644 src/dhcp6relay/src/main.cpp delete mode 100644 src/dhcp6relay/src/relay.cpp delete mode 100644 src/dhcp6relay/src/relay.h delete mode 100644 src/dhcp6relay/src/subdir.mk create mode 160000 src/dhcprelay diff --git a/.gitmodules b/.gitmodules index 2d6500476739..65ecc37dd7b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,3 +90,7 @@ path = src/linkmgrd url = https://github.com/Azure/sonic-linkmgrd.git branch = 202012 +[submodule "src/dhcprelay"] + path = src/dhcprelay + url = https://github.com/sonic-net/sonic-dhcp-relay.git + branch = 202012 diff --git a/rules/dhcp6relay.dep b/rules/dhcp6relay.dep deleted file mode 100644 index be82d326fe21..000000000000 --- a/rules/dhcp6relay.dep +++ /dev/null @@ -1,9 +0,0 @@ - -SPATH := $($(SONIC_DHCP6RELAY)_SRC_PATH) -DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcp6relay.mk rules/dhcp6relay.dep -DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) -DEP_FILES += $(shell git ls-files $(SPATH)) - -$(SONIC_DHCP6RELAY)_CACHE_MODE := GIT_CONTENT_SHA -$(SONIC_DHCP6RELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) -$(SONIC_DHCP6RELAY)_DEP_FILES := $(DEP_FILES) diff --git a/rules/dhcp6relay.mk b/rules/dhcp6relay.mk deleted file mode 100644 index 204bf6fa34dd..000000000000 --- a/rules/dhcp6relay.mk +++ /dev/null @@ -1,12 +0,0 @@ -# SONiC DHCPV6 RELAY Package - -SONIC_DHCP6RELAY_VERSION = 1.0.0-0 -SONIC_DHCP6RELAY_PKG_NAME = dhcp6relay - -SONIC_DHCP6RELAY = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(SONIC_DHCP6RELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) -$(SONIC_DHCP6RELAY)_SRC_PATH = $(SRC_PATH)/$(SONIC_DHCP6RELAY_PKG_NAME) -SONIC_DPKG_DEBS += $(SONIC_DHCP6RELAY) - -SONIC_DHCP6RELAY_DBG = sonic-$(SONIC_DHCP6RELAY_PKG_NAME)-dbgsym_$(SONIC_DHCP6RELAY_VERSION)_$(CONFIGURED_ARCH).deb -$(eval $(call add_derived_package,$(SONIC_DHCP6RELAY),$(SONIC_DHCP6RELAY_DBG))) diff --git a/rules/dhcprelay.dep b/rules/dhcprelay.dep new file mode 100644 index 000000000000..5f6d77a84fc3 --- /dev/null +++ b/rules/dhcprelay.dep @@ -0,0 +1,11 @@ + +SPATH := $($(SONIC_DHCPRELAY)_SRC_PATH) +DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/dhcprelay.mk rules/dhcprelay.dep +DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) +SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) + +$(SONIC_DHCPRELAY)_CACHE_MODE := GIT_CONTENT_SHA +$(SONIC_DHCPRELAY)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) +$(SONIC_DHCPRELAY)_DEP_FILES := $(DEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_FILES := $(SMDEP_FILES) +$(SONIC_DHCPRELAY)_SMDEP_PATHS := $(SPATH) diff --git a/rules/dhcprelay.mk b/rules/dhcprelay.mk new file mode 100644 index 000000000000..0a32d7d54297 --- /dev/null +++ b/rules/dhcprelay.mk @@ -0,0 +1,12 @@ +# SONiC DHCPV6 RELAY Package + +SONIC_DHCPRELAY_VERSION = 1.0.0-0 +SONIC_DHCPRELAY_PKG_NAME = dhcp6relay + +SONIC_DHCPRELAY = sonic-$(SONIC_DHCPRELAY_PKG_NAME)_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(SONIC_DHCPRELAY)_DEPENDS = $(LIBSWSSCOMMON) $(LIBHIREDIS) $(LIBSWSSCOMMON_DEV) $(LIBHIREDIS_DEV) +$(SONIC_DHCPRELAY)_SRC_PATH = $(SRC_PATH)/dhcprelay +SONIC_DPKG_DEBS += $(SONIC_DHCPRELAY) + +SONIC_DHCPRELAY_DBG = sonic-$(SONIC_DHCPRELAY_PKG_NAME)-dbgsym_$(SONIC_DHCPRELAY_VERSION)_$(CONFIGURED_ARCH).deb +$(eval $(call add_derived_package,$(SONIC_DHCPRELAY),$(SONIC_DHCPRELAY_DBG))) diff --git a/rules/docker-dhcp-relay.mk b/rules/docker-dhcp-relay.mk index 2ade8d641a02..3ecfb5195e2b 100644 --- a/rules/docker-dhcp-relay.mk +++ b/rules/docker-dhcp-relay.mk @@ -6,10 +6,10 @@ DOCKER_DHCP_RELAY_DBG = $(DOCKER_DHCP_RELAY_STEM)-$(DBG_IMAGE_MARK).gz $(DOCKER_DHCP_RELAY)_PATH = $(DOCKERS_PATH)/$(DOCKER_DHCP_RELAY_STEM) -$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCP6RELAY) $(LIBSWSSCOMMON) +$(DOCKER_DHCP_RELAY)_DEPENDS += $(ISC_DHCP_RELAY) $(SONIC_DHCPMON) $(SONIC_DHCPRELAY) $(LIBSWSSCOMMON) $(DOCKER_DHCP_RELAY)_DBG_DEPENDS = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_DEPENDS) -$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCP6RELAY_DBG) $(SONIC_DHCPMON_DBG) +$(DOCKER_DHCP_RELAY)_DBG_DEPENDS += $(ISC_DHCP_RELAY_DBG) $(SONIC_DHCPRELAY_DBG) $(SONIC_DHCPMON_DBG) $(DOCKER_DHCP_RELAY)_DBG_IMAGE_PACKAGES = $($(DOCKER_CONFIG_ENGINE_BUSTER)_DBG_IMAGE_PACKAGES) diff --git a/src/dhcp6relay/.gitignore b/src/dhcp6relay/.gitignore deleted file mode 100644 index 9d09ae6b3f1a..000000000000 --- a/src/dhcp6relay/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -debian/* -!debian/changelog -!debian/compat -!debian/control -!debian/rules diff --git a/src/dhcp6relay/Makefile b/src/dhcp6relay/Makefile deleted file mode 100644 index dd384452a5fc..000000000000 --- a/src/dhcp6relay/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -RM := rm -rf -DHCP6RELAY_TARGET := dhcp6relay -CP := cp -MKDIR := mkdir -CC := g++ -MV := mv -LIBS := -levent -lhiredis -lswsscommon -pthread -lboost_thread -lboost_system -CFLAGS += -Wall -std=c++17 -fPIE -I$(PWD)/../sonic-swss-common/common -PWD := $(shell pwd) - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) $(OBJS) -endif -endif - --include src/subdir.mk - -all: sonic-dhcp6relay - -sonic-dhcp6relay: $(OBJS) - @echo 'Building target: $@' - @echo 'Invoking: G++ Linker' - $(CC) $(LDFLAGS) -o $(DHCP6RELAY_TARGET) $(OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - -install: - $(MKDIR) -p $(DESTDIR)/usr/sbin - $(MV) $(DHCP6RELAY_TARGET) $(DESTDIR)/usr/sbin - -deinstall: - $(RM) $(DESTDIR)/usr/sbin/$(DHCP6RELAY_TARGET) - $(RM) -rf $(DESTDIR)/usr/sbin - -clean: - -$(RM) $(EXECUTABLES) $(C_DEPS) $(OBJS) $(DHCP6RELAY_TARGET) - -@echo ' ' - -.PHONY: all clean dependents - - diff --git a/src/dhcp6relay/debian/changelog b/src/dhcp6relay/debian/changelog deleted file mode 100644 index 67ed277049e5..000000000000 --- a/src/dhcp6relay/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -sonic-dhcp6relay (1.0.0-0) UNRELEASED; urgency=medium - - * Initial release. - --- Kelly Yeh diff --git a/src/dhcp6relay/debian/compat b/src/dhcp6relay/debian/compat deleted file mode 100644 index ec635144f600..000000000000 --- a/src/dhcp6relay/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/src/dhcp6relay/debian/control b/src/dhcp6relay/debian/control deleted file mode 100644 index 31fdb6f41f3b..000000000000 --- a/src/dhcp6relay/debian/control +++ /dev/null @@ -1,17 +0,0 @@ -Source: sonic-dhcp6relay -Section: devel -Priority: optional -Maintainer: Kelly Yeh -Build-Depends: debhelper (>= 8.0.0), - dh-systemd -Standards-Version: 3.9.3 -Homepage: https://github.com/Azure/sonic-buildimage -XS-Go-Import-Path: github.com/Azure/sonic-buildimage - -Package: sonic-dhcp6relay -Architecture: any -Built-Using: ${misc:Built-Using} -Depends: libevent-2.1-6, - libboost-thread1.71.0, - libboost-system1.71.0 -Description: SONiC DHCPv6 Relay diff --git a/src/dhcp6relay/debian/rules b/src/dhcp6relay/debian/rules deleted file mode 100755 index ac2cd63889ef..000000000000 --- a/src/dhcp6relay/debian/rules +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/make -f - -export DEB_BUILD_MAINT_OPTIONS=hardening=+all - -%: - dh $@ --parallel diff --git a/src/dhcp6relay/src/configInterface.cpp b/src/dhcp6relay/src/configInterface.cpp deleted file mode 100644 index ca78d80e63da..000000000000 --- a/src/dhcp6relay/src/configInterface.cpp +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include -#include -#include "configInterface.h" - -constexpr auto DEFAULT_TIMEOUT_MSEC = 1000; - -bool pollSwssNotifcation = true; -std::shared_ptr mSwssThreadPtr; - -std::shared_ptr configDbPtr = std::make_shared ("CONFIG_DB", 0); -swss::SubscriberStateTable ipHelpersTable(configDbPtr.get(), "DHCP_RELAY"); -swss::Select swssSelect; - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans) -{ - try { - swssSelect.addSelectable(&ipHelpersTable); - get_dhcp(vlans); - mSwssThreadPtr = std::make_shared (&handleSwssNotification, vlans); - } - catch (const std::bad_alloc &e) { - syslog(LOG_ERR, "Failed allocate memory. Exception details: %s", e.what()); - } -} - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss() -{ - stopSwssNotificationPoll(); - mSwssThreadPtr->interrupt(); -} - - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan table information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans) { - swss::Selectable *selectable; - int ret = swssSelect.select(&selectable, DEFAULT_TIMEOUT_MSEC); - if (ret == swss::Select::ERROR) { - syslog(LOG_WARNING, "Select: returned ERROR"); - } else if (ret == swss::Select::TIMEOUT) { - } - if (selectable == static_cast (&ipHelpersTable)) { - handleRelayNotification(ipHelpersTable, vlans); - } -} -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans) -{ - while (pollSwssNotifcation) { - get_dhcp(vlans); - } -} - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) -{ - std::deque entries; - - ipHelpersTable.pops(entries); - processRelayNotification(entries, vlans); -} - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans) -{ - std::vector servers; - - for (auto &entry: entries) { - std::string vlan = kfvKey(entry); - std::string operation = kfvOp(entry); - std::vector fieldValues = kfvFieldsValues(entry); - - relay_config intf; - intf.is_option_79 = true; - intf.interface = vlan; - intf.db = nullptr; - for (auto &fieldValue: fieldValues) { - std::string f = fvField(fieldValue); - std::string v = fvValue(fieldValue); - if(f == "dhcpv6_servers") { - std::stringstream ss(v); - while (ss.good()) { - std::string substr; - getline(ss, substr, ','); - intf.servers.push_back(substr); - } - syslog(LOG_DEBUG, "key: %s, Operation: %s, f: %s, v: %s", vlan.c_str(), operation.c_str(), f.c_str(), v.c_str()); - } - if(f == "dhcpv6_option|rfc6939_support" && v == "false") { - intf.is_option_79 = false; - } - } - vlans->push_back(intf); - } -} - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll() { - pollSwssNotifcation = false; -}; diff --git a/src/dhcp6relay/src/configInterface.h b/src/dhcp6relay/src/configInterface.h deleted file mode 100644 index 20b0912c5cef..000000000000 --- a/src/dhcp6relay/src/configInterface.h +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include "subscriberstatetable.h" -#include "select.h" -#include "relay.h" - -/** - * @code void initialize_swss() - * - * @brief initialize DB tables and start SWSS listening thread - * - * @return none - */ -void initialize_swss(std::vector *vlans); - -/** - * @code void deinitialize_swss() - * - * @brief deinitialize DB interface and join SWSS listening thread - * - * @return none - */ -void deinitialize_swss(); - -/** - * @code void get_dhcp(std::vector *vlans) - * - * @brief initialize and get vlan information from DHCP_RELAY - * - * @return none - */ -void get_dhcp(std::vector *vlans); - -/** - * @code void handleSwssNotification(std::vector *vlans) - * - * @brief main thread for handling SWSS notification - * - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleSwssNotification(std::vector *vlans); - -/** - * @code void handleRelayNotification(swss::SubscriberStateTable &ipHelpersTable, std::vector *vlans) - * - * @brief handles DHCPv6 relay configuration change notification - * - * @param ipHelpersTable DHCP table - * @param vlans list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void handleRelayNotification(swss::SubscriberStateTable &configMuxTable, std::vector *vlans); - -/** - * @code void processRelayNotification(std::deque &entries, std::vector *vlans) - * - * @brief process DHCPv6 relay servers and options configuration change notification - * - * @param entries queue of std::tuple> entries in DHCP table - * @param context list of vlans/argument config that contains strings of server and option - * - * @return none - */ -void processRelayNotification(std::deque &entries, std::vector *vlans); - -/** -*@code stopSwssNotificationPoll -* -*@brief stop SWSS listening thread -* -*@return none -*/ -void stopSwssNotificationPoll(); diff --git a/src/dhcp6relay/src/main.cpp b/src/dhcp6relay/src/main.cpp deleted file mode 100644 index 9f5bc74bcfa0..000000000000 --- a/src/dhcp6relay/src/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include "configInterface.h" - -int main(int argc, char *argv[]) { - try { - std::vector vlans; - swss::DBConnector state_db("STATE_DB", 0); - initialize_swss(&vlans); - loop_relay(&vlans, &state_db); - } - catch (std::exception &e) - { - syslog(LOG_ERR, "An exception occurred.\n"); - return 1; - } - return 0; -} diff --git a/src/dhcp6relay/src/relay.cpp b/src/dhcp6relay/src/relay.cpp deleted file mode 100644 index 08cec458c74d..000000000000 --- a/src/dhcp6relay/src/relay.cpp +++ /dev/null @@ -1,861 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "configdb.h" -#include "sonicv2connector.h" -#include "dbconnector.h" -#include "configInterface.h" - - -struct event *listen_event; -struct event *server_listen_event; -struct event_base *base; -struct event *ev_sigint; -struct event *ev_sigterm; -static std::string counter_table = "DHCPv6_COUNTER_TABLE|"; - -/* DHCPv6 filter */ -/* sudo tcpdump -dd "ip6 dst ff02::1:2 && udp dst port 547" */ - -static struct sock_filter ether_relay_filter[] = { - - { 0x28, 0, 0, 0x0000000c }, - { 0x15, 0, 13, 0x000086dd }, - { 0x20, 0, 0, 0x00000026 }, - { 0x15, 0, 11, 0xff020000 }, - { 0x20, 0, 0, 0x0000002a }, - { 0x15, 0, 9, 0x00000000 }, - { 0x20, 0, 0, 0x0000002e }, - { 0x15, 0, 7, 0x00000000 }, - { 0x20, 0, 0, 0x00000032 }, - { 0x15, 0, 5, 0x00010002 }, - { 0x30, 0, 0, 0x00000014 }, - { 0x15, 0, 3, 0x00000011 }, - { 0x28, 0, 0, 0x00000038 }, - { 0x15, 0, 1, 0x00000223 }, - { 0x6, 0, 0, 0x00040000 }, - { 0x6, 0, 0, 0x00000000 }, -}; -const struct sock_fprog ether_relay_fprog = { - lengthof(ether_relay_filter), - ether_relay_filter -}; - -/* DHCPv6 Counter */ -uint64_t counters[DHCPv6_MESSAGE_TYPE_COUNT]; -std::map counterMap = {{DHCPv6_MESSAGE_TYPE_UNKNOWN, "Unknown"}, - {DHCPv6_MESSAGE_TYPE_SOLICIT, "Solicit"}, - {DHCPv6_MESSAGE_TYPE_ADVERTISE, "Advertise"}, - {DHCPv6_MESSAGE_TYPE_REQUEST, "Request"}, - {DHCPv6_MESSAGE_TYPE_CONFIRM, "Confirm"}, - {DHCPv6_MESSAGE_TYPE_RENEW, "Renew"}, - {DHCPv6_MESSAGE_TYPE_REBIND, "Rebind"}, - {DHCPv6_MESSAGE_TYPE_REPLY, "Reply"}, - {DHCPv6_MESSAGE_TYPE_RELEASE, "Release"}, - {DHCPv6_MESSAGE_TYPE_DECLINE, "Decline"}, - {DHCPv6_MESSAGE_TYPE_RECONFIGURE, "Reconfigure"}, - {DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST, "Information-Request"}, - {DHCPv6_MESSAGE_TYPE_RELAY_FORW, "Relay-Forward"}, - {DHCPv6_MESSAGE_TYPE_RELAY_REPL, "Relay-Reply"}, - {DHCPv6_MESSAGE_TYPE_MALFORMED, "Malformed"}}; - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan) { - db->hset(counterVlan, "Unknown", toString(counters[DHCPv6_MESSAGE_TYPE_UNKNOWN])); - db->hset(counterVlan, "Solicit", toString(counters[DHCPv6_MESSAGE_TYPE_SOLICIT])); - db->hset(counterVlan, "Advertise", toString(counters[DHCPv6_MESSAGE_TYPE_ADVERTISE])); - db->hset(counterVlan, "Request", toString(counters[DHCPv6_MESSAGE_TYPE_REQUEST])); - db->hset(counterVlan, "Confirm", toString(counters[DHCPv6_MESSAGE_TYPE_CONFIRM])); - db->hset(counterVlan, "Renew", toString(counters[DHCPv6_MESSAGE_TYPE_RENEW])); - db->hset(counterVlan, "Rebind", toString(counters[DHCPv6_MESSAGE_TYPE_REBIND])); - db->hset(counterVlan, "Reply", toString(counters[DHCPv6_MESSAGE_TYPE_REPLY])); - db->hset(counterVlan, "Release", toString(counters[DHCPv6_MESSAGE_TYPE_RELEASE])); - db->hset(counterVlan, "Decline", toString(counters[DHCPv6_MESSAGE_TYPE_DECLINE])); - db->hset(counterVlan, "Reconfigure", toString(counters[DHCPv6_MESSAGE_TYPE_RECONFIGURE])); - db->hset(counterVlan, "Information-Request", toString(counters[DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST])); - db->hset(counterVlan, "Relay-Forward", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_FORW])); - db->hset(counterVlan, "Relay-Reply", toString(counters[DHCPv6_MESSAGE_TYPE_RELAY_REPL])); - db->hset(counterVlan, "Malformed", toString(counters[DHCPv6_MESSAGE_TYPE_MALFORMED])); -} - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type) { - db->hset(counterVlan, counterMap.find(msg_type)->second, toString(counters[msg_type])); -} - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count) { - std::stringstream ss; - ss << count; - std::string countValue = ss.str(); - return countValue; -} - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ether_header); - return (const struct ether_header *)buffer; -} - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct ip6_hdr); - return (struct ip6_hdr *)buffer; -} - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end) { - (*out_end) = buffer + sizeof(struct udphdr); - return (const struct udphdr *)buffer; -} - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer) { - return (const struct dhcpv6_msg *)buffer; -} - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer) { - return (const struct dhcpv6_relay_msg *)buffer; -} - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end) { - auto option = (const struct dhcpv6_option *)buffer; - uint8_t size = 4; // option-code + option-len - size += *(uint16_t *)(buffer); - (*out_end) = buffer + size + ntohs(option->option_length); - - return option; -} - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type) { - std::string counterVlan = counter_table; - if(sendto(sock, buffer, n, 0, (const struct sockaddr *)&target, sizeof(target)) == -1) - syslog(LOG_ERR, "sendto: Failed to send to target address\n"); - else if (counterMap.find(msg_type) != counterMap.end()) { - counters[msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg_type); - } else { - syslog(LOG_WARNING, "unexpected message type %d(0x%x)\n", msg_type, msg_type); - } -} - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length) { - struct dhcpv6_option option; - option.option_code = htons(OPTION_RELAY_MSG); - option.option_length = htons(msg_length); - memcpy(buffer, &option, sizeof(struct dhcpv6_option)); - memcpy(buffer + sizeof(struct dhcpv6_option), msg, msg_length); -} - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog) -{ - if (!ifindex) { - errno = EINVAL; - return -1; - } - - int s = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); - if (s == -1) { - syslog(LOG_ERR, "socket: Failed to create socket\n"); - return -1; - } - - struct sockaddr_ll sll = { - .sll_family = AF_PACKET, - .sll_protocol = htons(ETH_P_ALL), - .sll_ifindex = ifindex - }; - - if (bind(s, (struct sockaddr *)&sll, sizeof sll) == -1) { - syslog(LOG_ERR, "bind: Failed to bind to specified interface\n"); - (void) close(s); - return -1; - } - - if (fprog && setsockopt(s, SOL_SOCKET, SO_ATTACH_FILTER, fprog, sizeof *fprog) == -1) - { - syslog(LOG_ERR, "setsockopt: Failed to attach filter\n"); - (void) close(s); - return -1; - } - - return s; -} - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 non_link_local; - sockaddr_in6 link_local; - - interface_config->local_sock = *local_sock; - interface_config->filter = filter; - - for(auto server: interface_config->servers) { - sockaddr_in6 tmp; - if(inet_pton(AF_INET6, server.c_str(), &tmp.sin6_addr) != 1) - { - syslog(LOG_WARNING, "inet_pton: Failed to convert IPv6 address\n"); - } - tmp.sin6_family = AF_INET6; - tmp.sin6_flowinfo = 0; - tmp.sin6_port = htons(RELAY_PORT); - tmp.sin6_scope_id = 0; - interface_config->servers_sock.push_back(tmp); - } - - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces\n"); - exit(1); - } - - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && ifa_tmp->ifa_addr->sa_family == AF_INET6) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && !IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - non_link_local = *in6; - break; - } - if((strcmp(ifa_tmp->ifa_name, interface_config->interface.c_str()) == 0) && IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - link_local = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - - if(!IN6_IS_ADDR_LINKLOCAL(&non_link_local.sin6_addr)) { - interface_config->link_address = non_link_local; - } - else { - interface_config->link_address = link_local; - } -} - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index) { - struct ifaddrs *ifa, *ifa_tmp; - sockaddr_in6 addr; - sockaddr_in6 ll_addr; - memset(&addr, 0, sizeof(addr)); - memset(&ll_addr, 0, sizeof(ll_addr)); - - if ((*local_sock = socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - if ((*server_sock= socket(AF_INET6, SOCK_DGRAM, 0)) == -1) { - syslog(LOG_ERR, "socket: Failed to create socket on interface %s\n", config->interface.c_str()); - } - - int retry = 0; - bool bind_addr = false; - bool bind_ll_addr = false; - do { - if (getifaddrs(&ifa) == -1) { - syslog(LOG_WARNING, "getifaddrs: Unable to get network interfaces with %s\n", strerror(errno)); - } - else { - ifa_tmp = ifa; - while (ifa_tmp) { - if (ifa_tmp->ifa_addr && (ifa_tmp->ifa_addr->sa_family == AF_INET6) && (strcmp(ifa_tmp->ifa_name, config->interface.c_str()) == 0)) { - struct sockaddr_in6 *in6 = (struct sockaddr_in6*) ifa_tmp->ifa_addr; - if(!IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - addr = *in6; - } - if(IN6_IS_ADDR_LINKLOCAL(&in6->sin6_addr)) { - bind_ll_addr = true; - in6->sin6_family = AF_INET6; - in6->sin6_port = htons(RELAY_PORT); - ll_addr = *in6; - } - } - ifa_tmp = ifa_tmp->ifa_next; - } - freeifaddrs(ifa); - } - - if (bind_addr && bind_ll_addr) { - break; - } - - syslog(LOG_WARNING, "Retry #%d to bind to sockets on interface %s\n", ++retry, config->interface.c_str()); - sleep(5); - } while (retry < 6); - - if ((!bind_addr) || (bind(*local_sock, (sockaddr *)&addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to global ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } - - if ((!bind_ll_addr) || (bind(*server_sock, (sockaddr *)&ll_addr, sizeof(addr)) == -1)) { - syslog(LOG_ERR, "bind: Failed to bind socket to link local ipv6 address on interface %s after %d retries with %s\n", config->interface.c_str(), retry, strerror(errno)); - } -} - - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config) { - static uint8_t buffer[4096]; - auto current_buffer_position = buffer; - dhcpv6_relay_msg new_message; - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = 0; - - memcpy(&new_message.link_address, &config->link_address.sin6_addr, sizeof(in6_addr)); - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - if(config->is_option_79) { - linklayer_addr_option option79; - option79.link_layer_type = htons(1); - option79.option_code = htons(OPTION_CLIENT_LINKLAYER_ADDR); - option79.option_length = htons(2 + 6); // link_layer_type field + address - - memcpy(current_buffer_position, &option79, sizeof(linklayer_addr_option)); - current_buffer_position += sizeof(linklayer_addr_option); - - memcpy(current_buffer_position, ðer_hdr->ether_shost, sizeof(ether_hdr->ether_shost)); - current_buffer_position += sizeof(ether_hdr->ether_shost); - } - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) { - static uint8_t buffer[4096]; - dhcpv6_relay_msg new_message; - auto current_buffer_position = buffer; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - - if (dhcp_relay_header->hop_count >= HOP_LIMIT) - return; - - new_message.msg_type = DHCPv6_MESSAGE_TYPE_RELAY_FORW; - memcpy(&new_message.peer_address, &ip_hdr->ip6_src, sizeof(in6_addr)); - new_message.hop_count = dhcp_relay_header->hop_count + 1; - - memset(&new_message.link_address, 0, sizeof(in6_addr)); - - memcpy(current_buffer_position, &new_message, sizeof(dhcpv6_relay_msg)); - current_buffer_position += sizeof(dhcpv6_relay_msg); - - auto dhcp_message_length = len; - relay_forward(current_buffer_position, parse_dhcpv6_hdr(msg), dhcp_message_length); - current_buffer_position += dhcp_message_length + sizeof(dhcpv6_option); - - for(auto server: config->servers_sock) { - send_udp(sock, buffer, server, current_buffer_position - buffer, config, new_message.msg_type); - } -} - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ - void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *config) { - static uint8_t buffer[4096]; - uint8_t type = 0; - struct sockaddr_in6 target_addr; - auto current_buffer_position = buffer; - auto current_position = msg; - const uint8_t *tmp = NULL; - auto dhcp_relay_header = parse_dhcpv6_relay(msg); - current_position += sizeof(struct dhcpv6_relay_msg); - - auto position = current_position + sizeof(struct dhcpv6_option); - auto dhcpv6msg = parse_dhcpv6_hdr(position); - - while ((current_position - msg) < len) { - auto option = parse_dhcpv6_opt(current_position, &tmp); - current_position = tmp; - if (current_position - msg > len || ntohs(option->option_length) > sizeof(buffer) - (current_buffer_position - buffer)) { - break; - } - switch (ntohs(option->option_code)) { - case OPTION_RELAY_MSG: - memcpy(current_buffer_position, ((uint8_t *)option) + sizeof(struct dhcpv6_option), ntohs(option->option_length)); - current_buffer_position += ntohs(option->option_length); - type = dhcpv6msg->msg_type; - break; - default: - break; - } - } - - memcpy(&target_addr.sin6_addr, &dhcp_relay_header->peer_address, sizeof(struct in6_addr)); - target_addr.sin6_family = AF_INET6; - target_addr.sin6_flowinfo = 0; - target_addr.sin6_port = htons(CLIENT_PORT); - target_addr.sin6_scope_id = if_nametoindex(config->interface.c_str()); - - send_udp(sock, buffer, target_addr, current_buffer_position - buffer, config, type); -} - - -/** - * @code callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the filter socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - static uint8_t message_buffer[4096]; - std::string counterVlan = counter_table; - int32_t len = recv(config->filter, message_buffer, 4096, 0); - if (len <= 0) { - syslog(LOG_WARNING, "recv: Failed to receive data at filter socket: %s\n", strerror(errno)); - return; - } - - char* ptr = (char *)message_buffer; - const uint8_t *current_position = (uint8_t *)ptr; - const uint8_t *tmp = NULL; - const uint8_t *prev = NULL; - - auto ether_header = parse_ether_frame(current_position, &tmp); - current_position = tmp; - - auto ip_header = parse_ip6_hdr(current_position, &tmp); - current_position = tmp; - - prev = current_position; - if (ip_header->ip6_ctlun.ip6_un1.ip6_un1_nxt != IPPROTO_UDP) { - const struct ip6_ext *ext_header; - do { - ext_header = (const struct ip6_ext *)current_position; - current_position += ext_header->ip6e_len; - if((current_position == prev) || (current_position >= (uint8_t *)ptr + sizeof(message_buffer))) { - return; - } - prev = current_position; - } - while (ext_header->ip6e_nxt != IPPROTO_UDP); - } - - auto udp_header = parse_udp(current_position, &tmp); - current_position = tmp; - - auto msg = parse_dhcpv6_hdr(current_position); - auto option_position = current_position + sizeof(struct dhcpv6_msg); - - switch (msg->msg_type) { - case DHCPv6_MESSAGE_TYPE_RELAY_FORW: - { - relay_relay_forw(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, config); - break; - } - case DHCPv6_MESSAGE_TYPE_SOLICIT: - case DHCPv6_MESSAGE_TYPE_REQUEST: - case DHCPv6_MESSAGE_TYPE_CONFIRM: - case DHCPv6_MESSAGE_TYPE_RENEW: - case DHCPv6_MESSAGE_TYPE_REBIND: - case DHCPv6_MESSAGE_TYPE_RELEASE: - case DHCPv6_MESSAGE_TYPE_DECLINE: - case DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST: - { - while (option_position - message_buffer < len) { - auto option = parse_dhcpv6_opt(option_position, &tmp); - option_position = tmp; - if (ntohs(option->option_code) > DHCPv6_OPTION_LIMIT) { - counters[DHCPv6_MESSAGE_TYPE_MALFORMED]++; - update_counter(config->db, counterVlan.append(config->interface), DHCPv6_MESSAGE_TYPE_MALFORMED); - syslog(LOG_WARNING, "DHCPv6 option is invalid or contains malformed payload\n"); - return; - } - } - counters[msg->msg_type]++; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - relay_client(config->local_sock, current_position, ntohs(udp_header->len) - sizeof(udphdr), ip_header, ether_header, config); - break; - } - default: - { - syslog(LOG_WARNING, "DHCPv6 client message received was not relayed\n"); - break; - } - } -} - -/** - * @code void server_callback(evutil_socket_t fd, short event, void *arg); - * - * @brief callback for libevent that is called everytime data is received at the server socket - * - * @param fd filter socket - * @param event libevent triggered event - * @param arg callback argument provided by user - * - * @return none - */ -void server_callback(evutil_socket_t fd, short event, void *arg) { - struct relay_config *config = (struct relay_config *)arg; - sockaddr_in6 from; - socklen_t len = sizeof(from); - int32_t data = 0; - static uint8_t message_buffer[4096]; - - if ((data = recvfrom(config->local_sock, message_buffer, 4096, 0, (sockaddr *)&from, &len)) == -1) { - syslog(LOG_WARNING, "recv: Failed to receive data from server\n"); - } - - auto msg = parse_dhcpv6_hdr(message_buffer); - counters[msg->msg_type]++; - std::string counterVlan = counter_table; - update_counter(config->db, counterVlan.append(config->interface), msg->msg_type); - if (msg->msg_type == DHCPv6_MESSAGE_TYPE_RELAY_REPL) { - relay_relay_reply(config->server_sock, message_buffer, data, config); - } -} - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init() { - int rv = -1; - do { - ev_sigint = evsignal_new(base, SIGINT, signal_callback, base); - if (ev_sigint == NULL) { - syslog(LOG_ERR, "Could not create SIGINT libevent signal\n"); - break; - } - - ev_sigterm = evsignal_new(base, SIGTERM, signal_callback, base); - if (ev_sigterm == NULL) { - syslog(LOG_ERR, "Could not create SIGTERM libevent signal\n"); - break; - } - rv = 0; - } while(0); - return rv; -} - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start() -{ - int rv = -1; - do - { - if (evsignal_add(ev_sigint, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGINT libevent signal\n"); - break; - } - - if (evsignal_add(ev_sigterm, NULL) != 0) { - syslog(LOG_ERR, "Could not add SIGTERM libevent signal\n"); - break; - } - - if (event_base_dispatch(base) != 0) { - syslog(LOG_ERR, "Could not start libevent dispatching loop\n"); - } - - rv = 0; - } while (0); - - return rv; -} - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg) -{ - syslog(LOG_ALERT, "Received signal: '%s'\n", strsignal(fd)); - if ((fd == SIGTERM) || (fd == SIGINT)) { - dhcp6relay_stop(); - } -} - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop() -{ - event_base_loopexit(base, NULL); -} - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db) { - std::vector sockets; - base = event_base_new(); - if(base == NULL) { - syslog(LOG_ERR, "libevent: Failed to create base\n"); - } - - for(relay_config &vlan : *vlans) { - relay_config *config = &vlan; - int filter = 0; - int local_sock = 0; - int server_sock = 0; - int index = if_nametoindex(config->interface.c_str()); - config->db = db; - - std::string counterVlan = counter_table; - initialize_counter(config->db, counterVlan.append(config->interface)); - - filter = sock_open(index, ðer_relay_fprog); - prepare_socket(&local_sock, &server_sock, config, index); - - config->local_sock = local_sock; - config->server_sock = server_sock; - - sockets.push_back(filter); - sockets.push_back(local_sock); - sockets.push_back(server_sock); - - prepare_relay_config(config, &local_sock, filter); - - evutil_make_listen_socket_reuseable(filter); - evutil_make_socket_nonblocking(filter); - - evutil_make_listen_socket_reuseable(local_sock); - evutil_make_socket_nonblocking(local_sock); - - listen_event = event_new(base, filter, EV_READ|EV_PERSIST, callback, config); - server_listen_event = event_new(base, local_sock, EV_READ|EV_PERSIST, server_callback, config); - if (listen_event == NULL || server_listen_event == NULL) { - syslog(LOG_ERR, "libevent: Failed to create libevent\n"); - } - - event_add(listen_event, NULL); - event_add(server_listen_event, NULL); - } - - if((signal_init() == 0) && signal_start() == 0) { - shutdown(); - for(std::size_t i = 0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#define PACKED __attribute__ ((packed)) - -#define RELAY_PORT 547 -#define CLIENT_PORT 546 -#define HOP_LIMIT 8 //HOP_LIMIT reduced from 32 to 8 as stated in RFC8415 -#define DHCPv6_OPTION_LIMIT 56 // DHCPv6 option code greater than 56 are currently unassigned - -#define lengthof(A) (sizeof (A) / sizeof (A)[0]) - -#define OPTION_RELAY_MSG 9 -#define OPTION_CLIENT_LINKLAYER_ADDR 79 - -/* DHCPv6 message types */ -typedef enum -{ - DHCPv6_MESSAGE_TYPE_UNKNOWN = 0, - DHCPv6_MESSAGE_TYPE_SOLICIT = 1, - DHCPv6_MESSAGE_TYPE_ADVERTISE = 2, - DHCPv6_MESSAGE_TYPE_REQUEST = 3, - DHCPv6_MESSAGE_TYPE_CONFIRM = 4, - DHCPv6_MESSAGE_TYPE_RENEW = 5, - DHCPv6_MESSAGE_TYPE_REBIND = 6, - DHCPv6_MESSAGE_TYPE_REPLY = 7, - DHCPv6_MESSAGE_TYPE_RELEASE = 8, - DHCPv6_MESSAGE_TYPE_DECLINE = 9, - DHCPv6_MESSAGE_TYPE_RECONFIGURE = 10, - DHCPv6_MESSAGE_TYPE_INFORMATION_REQUEST = 11, - DHCPv6_MESSAGE_TYPE_RELAY_FORW = 12, - DHCPv6_MESSAGE_TYPE_RELAY_REPL = 13, - DHCPv6_MESSAGE_TYPE_MALFORMED = 14, - - DHCPv6_MESSAGE_TYPE_COUNT -} dhcp_message_type_t; - -struct relay_config { - int local_sock; - int server_sock; - int filter; - sockaddr_in6 link_address; - swss::DBConnector *db; - std::string interface; - std::vector servers; - std::vector servers_sock; - bool is_option_79; -}; - - -/* DHCPv6 messages and options */ - -struct dhcpv6_msg { - uint8_t msg_type; - uint8_t xid[3]; -}; - -struct PACKED dhcpv6_relay_msg { - uint8_t msg_type; - uint8_t hop_count; - struct in6_addr link_address; - struct in6_addr peer_address; -}; - - -struct dhcpv6_option { - uint16_t option_code; - uint16_t option_length; -}; - -struct linklayer_addr_option { - uint16_t option_code; - uint16_t option_length; - uint16_t link_layer_type; -}; - -/** - * @code sock_open(int ifindex, const struct sock_fprog *fprog); - * - * @brief prepare L2 socket to attach to "udp and port 547" filter - * - * @param ifindex interface index - * @param fprog bpf filter "udp and port 547" - * - * @return socket descriptor - */ -int sock_open(int ifindex, const struct sock_fprog *fprog); - -/** - * @code prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - * - * @brief prepare L3 socket for sending - * - * @param local_sock pointer to socket binded to global address for relaying client message to server and listening for server message - * @param server_sock pointer to socket binded to link_local address for relaying server message to client - * @param index scope id of interface - * - * @return none - */ -void prepare_socket(int *local_sock, int *server_sock, relay_config *config, int index); - -/** - * @code prepare_relay_config(relay_config *interface_config, int local_sock, int filter); - * - * @brief prepare for specified relay interface config: server and link address - * - * @param interface_config pointer to relay config to be prepared - * @param local_sock L3 socket used for relaying messages - * @param filter socket attached with filter - * - * @return none - */ -void prepare_relay_config(relay_config *interface_config, int *local_sock, int filter); - -/** - * @code relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - * - * @brief embed the DHCPv6 message received into DHCPv6 relay forward message - * - * @param buffer pointer to buffer - * @param msg pointer to parsed DHCPv6 message - * @param msg_length length of DHCPv6 message - * - * @return none - */ -void relay_forward(uint8_t *buffer, const struct dhcpv6_msg *msg, uint16_t msg_length); - -/** - * @code relay_client(int sock, const uint8_t *msg, int32_t len, ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - * - * @brief construct relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param ether_hdr pointer to Ethernet header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_client(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, const ether_header *ether_hdr, relay_config *config); - -/** - * @code relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config) - * - * @brief construct a relay-forward message encapsulated relay-forward message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param ip_hdr pointer to IPv6 header - * @param config pointer to the relay interface config - * - * @return none - */ -void relay_relay_forw(int sock, const uint8_t *msg, int32_t len, const ip6_hdr *ip_hdr, relay_config *config); - -/** - * @code relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - * - * @brief relay and unwrap a relay-reply message - * - * @param sock L3 socket for sending data to servers - * @param msg pointer to dhcpv6 message header position - * @param len size of data received - * @param config relay interface config - * - * @return none - */ -void relay_relay_reply(int sock, const uint8_t *msg, int32_t len, relay_config *configs); - -/** - * @code loop_relay(std::vector *vlans, swss::DBConnector *db); - * - * @brief main loop: configure sockets, create libevent base, start server listener thread - * - * @param vlans list of vlans retrieved from config_db - * @param db state_db connector - */ -void loop_relay(std::vector *vlans, swss::DBConnector *db); - -/** - * @code signal_init(); - * - * @brief initialize DHCPv6 Relay libevent signals - */ -int signal_init(); - -/** - * @code signal_start(); - * - * @brief start DHCPv6 Relay libevent base and add signals - */ -int signal_start(); - -/** - * @code dhcp6relay_stop(); - * - * @brief stop DHCPv6 Relay libevent loop upon signal - */ -void dhcp6relay_stop(); - -/** - * @code signal_callback(fd, event, arg); - * - * @brief signal handler for dhcp6relay. Initiate shutdown when signal is caught - * - * @param fd libevent socket - * @param event event triggered - * @param arg pointer to libevent base - * - * @return none - */ -void signal_callback(evutil_socket_t fd, short event, void *arg); - -/** - * @code shutdown(); - * - * @brief free signals and terminate threads - */ -void shutdown(); - -/** - * @code void initialize_counter(swss::DBConnector *db, std::string counterVlan); - * - * @brief initialize the counter by each Vlan - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * - * @return none - */ -void initialize_counter(swss::DBConnector *db, std::string counterVlan); - -/** - * @code void update_counter(swss::DBConnector *db, std::string CounterVlan, uint8_t msg_type); - * - * @brief update the counter in state_db with count of each DHCPv6 message type - * - * @param swss::DBConnector *db state_db connector - * @param counterVlan counter table with interface name - * @param msg_type dhcpv6 message type to be updated in counter - * - * @return none - */ -void update_counter(swss::DBConnector *db, std::string counterVlan, uint8_t msg_type); - -/* Helper functions */ - -/** - * @code std::string toString(uint16_t count); - * - * @brief convert uint16_t to string - * - * @param count count of messages in counter - * - * @return count in string - */ -std::string toString(uint16_t count); - -/** - * @code const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ethernet frame - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ether_header end of ethernet header position - */ -const struct ether_header *parse_ether_frame(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through ipv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return ip6_hdr end of ipv6 header position - */ -const struct ip6_hdr *parse_ip6_hdr(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through udp header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return udphdr end of udp header position - */ -const struct udphdr *parse_udp(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - * - * @brief parse through dhcpv6 header - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_msg end of dhcpv6 header position - */ -const struct dhcpv6_msg *parse_dhcpv6_hdr(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - * - * @brief parse through dhcpv6 relay message - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_relay_msg start of dhcpv6 relay message or end of dhcpv6 message type position - */ -const struct dhcpv6_relay_msg *parse_dhcpv6_relay(const uint8_t *buffer); - -/** - * @code const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - * - * @brief parse through dhcpv6 option - * - * @param *buffer message buffer - * @param **out_end pointer - * - * @return dhcpv6_option end of dhcpv6 message option - */ -const struct dhcpv6_option *parse_dhcpv6_opt(const uint8_t *buffer, const uint8_t **out_end); - -/** - * @code void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - * - * @brief send udp packet - * - * @param *buffer message buffer - * @param sockaddr_in6 target target socket - * @param n length of message - * @param relay_config *config pointer to relay_config - * @param uint8_t msg_type message type of dhcpv6 option of relayed message - * - * @return dhcpv6_option end of dhcpv6 message option - */ -void send_udp(int sock, uint8_t *buffer, struct sockaddr_in6 target, uint32_t n, relay_config *config, uint8_t msg_type); - diff --git a/src/dhcp6relay/src/subdir.mk b/src/dhcp6relay/src/subdir.mk deleted file mode 100644 index 1c93d490ec63..000000000000 --- a/src/dhcp6relay/src/subdir.mk +++ /dev/null @@ -1,23 +0,0 @@ -CC := g++ - -C_SRCS += \ -../src/relay.c \ -../src/configInterface.c \ -../src/main.c - -OBJS += \ -./src/relay.o \ -./src/configInterface.o \ -./src/main.o - -C_DEPS += \ -./src/relay.d \ -./src/configInterface.d \ -./src/main.d - -src/%.o: src/%.cpp - @echo 'Building file: $<' - @echo 'Invoking: GCC C++ Compiler' - $(CC) -D__FILENAME__="$(subst src/,,$<)" $(CFLAGS) -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' diff --git a/src/dhcprelay b/src/dhcprelay new file mode 160000 index 000000000000..40ad1676e4d0 --- /dev/null +++ b/src/dhcprelay @@ -0,0 +1 @@ +Subproject commit 40ad1676e4d07c3eec2153017997bb04b33a94c8 From e98f56c84230669ccad166614b22b5d5f60536a8 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Wed, 14 Sep 2022 07:42:58 -0700 Subject: [PATCH 080/106] [202012][submodule] Update sonic-utilities submodule (#12061) Update sonic-utilities submodule pointer to include the following: * [202012][VxLAN]VxLAN Tunnel Counters and Rates implementation ([#2353](https://github.com/Azure/sonic-utilities/pull/2353)) --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 839625df982d..26043909f405 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 839625df982d164815a8c5fe77cbb6251c8a1442 +Subproject commit 26043909f405d7137763479a06d9fe24763fc3b6 From df9b676360f2a657b50a1412731201673c246344 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Wed, 14 Sep 2022 07:53:30 -0700 Subject: [PATCH 081/106] [202012][submodule] Update sonic-swss submodule (#12060) Update sonic-swss submodule pointer to include the following: * VxLAN Tunnel Counters and Rates implementation (#1859) ([#2442] * Fix for "orchagent crashed when trying to delete fdb static entry with swssconfig #11046" ([#2374] --- src/sonic-swss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-swss b/src/sonic-swss index eedf59dd935d..499b7a7b37cb 160000 --- a/src/sonic-swss +++ b/src/sonic-swss @@ -1 +1 @@ -Subproject commit eedf59dd935d1e4f2176fe1178aa167e262cd001 +Subproject commit 499b7a7b37cbfbf0f20878b334a1cbea83b76aa7 From a195f8343f4e6bb95970d6d2bbac0fa811e46a1a Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 14 Sep 2022 23:05:43 +0800 Subject: [PATCH 082/106] [ci/build]: Upgrade SONiC package versions (#12068) --- files/build/versions/default/versions-docker | 12 ++++++------ files/build/versions/default/versions-git | 2 +- .../versions-deb-buster-arm64 | 3 ++- .../versions-deb-buster-armhf | 3 ++- .../dockers/docker-config-engine-buster/versions-py3 | 2 +- .../dockers/docker-sonic-mgmt-framework/versions-py3 | 8 ++++---- .../versions/dockers/docker-sonic-vs/versions-py3 | 4 ++-- .../dockers/docker-syncd-brcm/versions-deb-buster | 3 ++- .../dockers/sonic-slave-buster/versions-deb-buster | 3 ++- .../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 | 3 ++- files/build/versions/host-image/versions-py3 | 6 +++--- 14 files changed, 30 insertions(+), 25 deletions(-) diff --git a/files/build/versions/default/versions-docker b/files/build/versions/default/versions-docker index 06eb9bdc2c4d..7793b4dd0353 100644 --- a/files/build/versions/default/versions-docker +++ b/files/build/versions/default/versions-docker @@ -1,10 +1,10 @@ -amd64:amd64/debian:buster==sha256:faa416b9eeda2cbdb796544422eedd698e716dbd99841138521a94db51bf6123 +amd64:amd64/debian:buster==sha256:12da36082ea17cd91307adaf2e91bb631a3fbbf2c92f7ca9545caa91036c1043 amd64:amd64/debian:stretch==sha256:16ee3e11da473f6565ef94a715f1a38b3079e0664913be78869c336a71cb6085 -amd64:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 +amd64:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb amd64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -arm64:arm64v8/debian:buster==sha256:46f5b3c07b5e5aa83547cf697dcfe097052ff88018481fe615206c5651d75ba0 -arm64:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 +arm64:arm64v8/debian:buster==sha256:cb4597c2e5b3f7d54be4927f4f27d8d84d7b1cd5ef6743d4ecd752727a7e0a07 +arm64:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb arm64:debian:stretch==sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be -armhf:arm32v7/debian:buster==sha256:49b349ff803f83f12723092ee7a1052f06156c20fa788f24b795988a614279d6 -armhf:debian:buster==sha256:fa8155031d12cd165c237e0b38688cade32912e990ffe21f9e31968d9a04da38 +armhf:arm32v7/debian:buster==sha256:94d59fccce5b8617ff43a12549c046133e0310497d742d3ad9add1755297ba69 +armhf:debian:buster==sha256:2f35b84014a5389e2a940113c51586bc067a05040ba181dee92c5a9fa9b15dcb 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 686c4ce896aa..b6765f7e2bc7 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==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d 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-config-engine-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 index e41cb53abe80..7094e3bc75d7 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 @@ -8,4 +8,5 @@ libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u2 libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf index 04588e0ccb8b..c948d1fad1ab 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf @@ -8,4 +8,5 @@ libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u2 libxslt1.1==1.1.32-2.2~deb10u2 pkg-config==0.29-6 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file 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 80a4396adaf4..bf7c5b08e1e0 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.8.17 +regex==2022.9.13 six==1.16.0 \ 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 e8290b7742dd..689fff137344 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -7,19 +7,19 @@ connexion==2.7.0 flask==2.2.2 grpcio==1.48.1 grpcio-tools==1.20.0 -idna==3.3 +idna==3.4 importlib-metadata==4.12.0 importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 jsonschema==4.16.0 -jsonschema-spec==0.1.1 +jsonschema-spec==0.1.2 lazy-object-proxy==1.7.1 -openapi-schema-validator==0.3.3 +openapi-schema-validator==0.3.4 openapi-spec-validator==0.5.1 pathable==0.4.3 pkgutil_resolve_name==1.3.10 -protobuf==4.21.5 +protobuf==4.21.6 pyrsistent==0.18.1 python-dateutil==2.6.0 requests==2.28.1 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index a33bfa1e168e..2b249f49e307 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,7 +1,7 @@ -certifi==2022.6.15.1 +certifi==2022.6.15.2 charset-normalizer==2.1.1 click==7.0 -idna==3.3 +idna==3.4 ijson==2.6.1 jsondiff==2.0.0 m2crypto==0.38.0 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index 27515b58c333..bd0382758630 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -33,4 +33,5 @@ syncd==1.0.0 syncd-dbg==1.0.0 vim==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ 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 20d822b69226..2d38a80ff936 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -1730,4 +1730,5 @@ xtrans-dev==1.3.5-1 xxd==2:8.1.0875-5+deb10u2 xz-utils==5.2.4-1+deb10u1 zip==3.0-11+b1 -zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ No newline at end of file +zlib1g==1:1.2.11.dfsg-1+deb10u2 +zlib1g-dev==1:1.2.11.dfsg-1+deb10u2 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 5a794f76868e..47d4f0c37f4b 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==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d 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 691707dc8da8..b9140ea457be 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.8.17 +regex==2022.9.13 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 5a794f76868e..47d4f0c37f4b 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==2d25dbd149b460cc1fa96acbcb1797a12b3c0771 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d 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 be7292013fdd..c2a9a5d70e16 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -326,4 +326,5 @@ vim==2:8.1.0875-5+deb10u2 vim-common==2:8.1.0875-5+deb10u2 vim-runtime==2:8.1.0875-5+deb10u2 xxd==2:8.1.0875-5+deb10u2 -xz-utils==5.2.4-1+deb10u1 \ No newline at end of file +xz-utils==5.2.4-1+deb10u1 +zlib1g==1:1.2.11.dfsg-1+deb10u2 \ 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 2ceee4ead1cf..0f2d95bd38b0 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -2,13 +2,13 @@ azure-common==1.1.28 azure-nspkg==3.0.2 azure-storage==0.36.0 bitarray==1.5.3 -certifi==2022.6.15.1 +certifi==2022.6.15.2 cffi==1.15.1 charset-normalizer==2.1.1 click==7.0 cryptography==38.0.1 docker==4.3.1 -idna==3.3 +idna==3.4 ijson==2.6.1 ipaddress==1.0.23 j2cli==0.3.10 @@ -32,7 +32,7 @@ pyroute2==0.5.14 python-dateutil==2.8.2 pyyaml==5.4.1 redis==3.5.3 -regex==2022.8.17 +regex==2022.9.13 requests==2.28.1 scapy==2.4.4 six==1.16.0 From 237b40bc314f6d4a006cfcad9404d91fd646f7d6 Mon Sep 17 00:00:00 2001 From: Sudharsan Dhamal Gopalarathnam Date: Wed, 14 Sep 2022 19:23:49 -0700 Subject: [PATCH 083/106] [202012][submodule] Update sonic-sairedis submodule (#12072) Update sonic-sairedis submodule pointer to include the following: * 1d3720e Added Flex Counters support for tunnel counters (#886) ([#1120](https://github.com/Azure/sonic-sairedis/pull/1120)) * 6469456 [lgtm] Add uuid library (#1119) ([#1126](https://github.com/Azure/sonic-sairedis/pull/1126)) --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 21f3d7c3d67f..1d3720eb5aa4 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 21f3d7c3d67ffe072ddfb335d08bb08f50b879ac +Subproject commit 1d3720eb5aa4b13d8eff2ae6e833dc5fd48d3ba7 From 00810f8dd9a7e767f4ff72a2395ef4b6d87f25ce Mon Sep 17 00:00:00 2001 From: lixiaoyuner <35456895+lixiaoyuner@users.noreply.github.com> Date: Fri, 16 Sep 2022 13:16:00 +0800 Subject: [PATCH 084/106] Upgrade k8s package version (#12057) Signed-off-by: Yun Li --- rules/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/config b/rules/config index 70ff038e6e63..cc67914a807e 100644 --- a/rules/config +++ b/rules/config @@ -157,9 +157,9 @@ KUBE_DOCKER_PROXY = http://172.16.1.1:3128/ # These are Used *only* when INCLUDE_KUBERNETES=y # NOTE: As a worker node it has to run version compatible to kubernetes master. # -KUBERNETES_VERSION = 1.21.1 +KUBERNETES_VERSION = 1.22.2 KUBERNETES_CNI_VERSION = 0.8.7 -K8s_GCR_IO_PAUSE_VERSION = 3.4.1 +K8s_GCR_IO_PAUSE_VERSION = 3.5 # SONIC_ENABLE_IMAGE_SIGNATURE - enable image signature # To not use the auto-generated self-signed certificate, the required files to sign the image as below: From ee7d9d1c4508fca5ee76a6c2541b8c9583355df0 Mon Sep 17 00:00:00 2001 From: bingwang-ms <66248323+bingwang-ms@users.noreply.github.com> Date: Fri, 9 Sep 2022 00:18:26 +0800 Subject: [PATCH 085/106] Map TC6 to Queue 1 for regular traffic (#11904) Why I did it This PR is to update TC_TO_QUEUE_MAP|AZURE for SKU Arista-7050CX3-32S-D48C8 and Arista-7260CX3 T0. The change is only to align the TC_TO_QUEUE_MAP for regular traffic and bounced traffic. It has no impact on business because we have no traffic being mapped to TC2 or TC6. How I did it Update TC_TO_QUEUE_MAP|AZURE , and test cases as well. How to verify it Verified by running test case test_j2files.py /sonic/src/sonic-config-engine$ python3 setup.py test -s tests/test_j2files.py running test ...... ---------------------------------------------------------------------- Ran 29 tests in 25.390s OK --- .../Arista-7050CX3-32S-D48C8/qos.json.j2 | 2 +- device/common/profiles/th2/7260/BALANCED/qos.json.j2 | 2 +- device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 | 2 +- .../tests/sample_output/py3/qos-arista7050cx3-dualtor.json | 2 +- .../tests/sample_output/py3/qos-arista7260-dualtor.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 index 6719911b29e5..040da33dd79f 100644 --- a/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 +++ b/device/arista/x86_64-arista_7050cx3_32s/Arista-7050CX3-32S-D48C8/qos.json.j2 @@ -170,7 +170,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 index 68daa8ee92f0..750d0fb0ea77 100644 --- a/device/common/profiles/th2/7260/BALANCED/qos.json.j2 +++ b/device/common/profiles/th2/7260/BALANCED/qos.json.j2 @@ -322,7 +322,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 index faf682d3c176..771b8305f8f0 100644 --- a/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 +++ b/device/common/profiles/th2/7260/RDMA-CENTRIC/qos.json.j2 @@ -321,7 +321,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json index 4e524e2bf7d1..05c15034ca70 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7050cx3-dualtor.json @@ -43,7 +43,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, diff --git a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json index b7ddd361965c..6edfa8b0e9c4 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json +++ b/src/sonic-config-engine/tests/sample_output/py3/qos-arista7260-dualtor.json @@ -43,7 +43,7 @@ "3": "3", "4": "4", "5": "5", - "6": "6", + "6": "1", "7": "7", "8": "1" }, From 0abf8d0419096c6e3fce36d3dc352c631fe03ac3 Mon Sep 17 00:00:00 2001 From: lixiaoyuner <35456895+lixiaoyuner@users.noreply.github.com> Date: Fri, 16 Sep 2022 13:13:39 +0800 Subject: [PATCH 086/106] Make client indentity by AME cert (#11946) * Make client indentity by AME cert * Join k8s cluster by ipv6 * Change join test cases * Test case bug fix * Improve read node label func * Configure kubelet and change test cases * For kubernetes version 1.22.2 * Fix undefine issue Signed-off-by: Yun Li --- .../build_templates/sonic_debian_extension.j2 | 2 +- src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py | 2 + src/sonic-ctrmgrd/ctrmgr/kube_commands.py | 82 +++++++++++++++++-- src/sonic-ctrmgrd/tests/common_test.py | 23 +++++- src/sonic-ctrmgrd/tests/kube_commands_test.py | 66 ++++++++++----- 5 files changed, 148 insertions(+), 27 deletions(-) diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index c106f7944a36..d234757898d4 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -416,7 +416,7 @@ sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install watchd {% if include_kubernetes == "y" %} # Point to kubelet to /etc/resolv.conf # -echo 'KUBELET_EXTRA_ARGS="--resolv-conf=/etc/resolv.conf"' | sudo tee -a $FILESYSTEM_ROOT/etc/default/kubelet +echo 'KUBELET_EXTRA_ARGS="--resolv-conf=/etc/resolv.conf --cgroup-driver=cgroupfs --node-ip=::"' | sudo tee -a $FILESYSTEM_ROOT/etc/default/kubelet # Copy Flannel conf file into sonic-templates # diff --git a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py index 3941a05a738a..2defb6e45387 100755 --- a/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py +++ b/src/sonic-ctrmgrd/ctrmgr/ctrmgrd.py @@ -104,10 +104,12 @@ def log_debug(m): def log_error(m): + msg = "{}: {}".format(inspect.stack()[1][3], m) syslog.syslog(syslog.LOG_ERR, msg) def log_info(m): + msg = "{}: {}".format(inspect.stack()[1][3], m) syslog.syslog(syslog.LOG_INFO, msg) diff --git a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py index 9a6ea9ed8dff..3adea36ef12c 100755 --- a/src/sonic-ctrmgrd/ctrmgr/kube_commands.py +++ b/src/sonic-ctrmgrd/ctrmgr/kube_commands.py @@ -13,10 +13,14 @@ import syslog import tempfile import urllib.request +import base64 from urllib.parse import urlparse import yaml +import requests from sonic_py_common import device_info +from jinja2 import Template +from swsscommon import swsscommon KUBE_ADMIN_CONF = "/etc/sonic/kube_admin.conf" KUBELET_YAML = "/var/lib/kubelet/config.yaml" @@ -24,6 +28,9 @@ LOCK_FILE = "/var/lock/kube_join.lock" FLANNEL_CONF_FILE = "/usr/share/sonic/templates/kube_cni.10-flannel.conflist" CNI_DIR = "/etc/cni/net.d" +K8S_CA_URL = "https://{}:{}/api/v1/namespaces/default/configmaps/kube-root-ca.crt" +AME_CRT = "/etc/sonic/credentials/restapiserver.crt" +AME_KEY = "/etc/sonic/credentials/restapiserver.key" def log_debug(m): msg = "{}: {}".format(inspect.stack()[1][3], m) @@ -77,8 +84,7 @@ def _run_command(cmd, timeout=5): def kube_read_labels(): """ Read current labels on node and return as dict. """ - KUBECTL_GET_CMD = "kubectl --kubeconfig {} get nodes --show-labels |\ - grep {} | tr -s ' ' | cut -f6 -d' '" + KUBECTL_GET_CMD = "kubectl --kubeconfig {} get nodes {} --show-labels |tr -s ' ' | cut -f6 -d' '" labels = {} ret, out, _ = _run_command(KUBECTL_GET_CMD.format( @@ -211,6 +217,68 @@ def _download_file(server, port, insecure): log_debug("{} downloaded".format(KUBE_ADMIN_CONF)) +def _gen_cli_kubeconf(server, port, insecure): + """generate identity which can help authenticate and + authorization to k8s cluster + """ + client_kubeconfig_template = """ +apiVersion: v1 +clusters: +- cluster: + certificate-authority-data: {{ k8s_ca }} + server: https://{{ vip }}:{{ port }} + name: kubernetes +contexts: +- context: + cluster: kubernetes + user: user + name: user@kubernetes +current-context: user@kubernetes +kind: Config +preferences: {} +users: +- name: user + user: + client-certificate-data: {{ ame_crt }} + client-key-data: {{ ame_key }} + """ + if insecure: + r = requests.get(K8S_CA_URL.format(server, port), cert=(AME_CRT, AME_KEY), verify=False) + else: + r = requests.get(K8S_CA_URL.format(server, port), cert=(AME_CRT, AME_KEY)) + if not r.ok: + raise requests.RequestException("Something wrong with AME cert or something wrong about sonic role in k8s cluster") + k8s_ca = r.json()["data"]["ca.crt"] + k8s_ca_b64 = base64.b64encode(k8s_ca.encode("utf-8")).decode("utf-8") + ame_crt_raw = open(AME_CRT, "rb") + ame_crt_b64 = base64.b64encode(ame_crt_raw.read()).decode("utf-8") + ame_key_raw = open(AME_KEY, "rb") + ame_key_b64 = base64.b64encode(ame_key_raw.read()).decode("utf-8") + client_kubeconfig_template_j2 = Template(client_kubeconfig_template) + client_kubeconfig = client_kubeconfig_template_j2.render( + k8s_ca=k8s_ca_b64, vip=server, port=port, ame_crt=ame_crt_b64, ame_key=ame_key_b64) + (h, fname) = tempfile.mkstemp(suffix="_kube_join") + os.write(h, client_kubeconfig.encode("utf-8")) + os.close(h) + log_debug("Downloaded = {}".format(fname)) + + shutil.copyfile(fname, KUBE_ADMIN_CONF) + + log_debug("{} downloaded".format(KUBE_ADMIN_CONF)) + + +def _get_local_ipv6(): + try: + config_db = swsscommon.DBConnector("CONFIG_DB", 0) + mgmt_ip_data = swsscommon.Table(config_db, 'MGMT_INTERFACE') + for key in mgmt_ip_data.getKeys(): + if key.find(":") >= 0: + return key.split("|")[1].split("/")[0] + raise IOError("IPV6 not find from MGMT_INTERFACE table") + except Exception as e: + raise IOError(str(e)) + + def _troubleshoot_tips(): """ log troubleshoot tips which could be handy, when in trouble with join @@ -264,12 +332,14 @@ def _do_reset(pending_join = False): def _do_join(server, port, insecure): - KUBEADM_JOIN_CMD = "kubeadm join --discovery-file {} --node-name {}" + KUBEADM_JOIN_CMD = "kubeadm join --discovery-file {} --node-name {} --apiserver-advertise-address {}" err = "" out = "" ret = 0 try: - _download_file(server, port, insecure) + local_ipv6 = _get_local_ipv6() + #_download_file(server, port, insecure) + _gen_cli_kubeconf(server, port, insecure) _do_reset(True) _run_command("modprobe br_netfilter") # Copy flannel.conf @@ -279,11 +349,11 @@ def _do_join(server, port, insecure): if ret == 0: (ret, out, err) = _run_command(KUBEADM_JOIN_CMD.format( - KUBE_ADMIN_CONF, get_device_name()), timeout=60) + KUBE_ADMIN_CONF, get_device_name(), local_ipv6), timeout=60) log_debug("ret = {}".format(ret)) except IOError as e: - err = "Download failed: {}".format(str(e)) + err = "Join failed: {}".format(str(e)) ret = -1 out = "" diff --git a/src/sonic-ctrmgrd/tests/common_test.py b/src/sonic-ctrmgrd/tests/common_test.py index 6e9763962bde..9283e3ad258e 100755 --- a/src/sonic-ctrmgrd/tests/common_test.py +++ b/src/sonic-ctrmgrd/tests/common_test.py @@ -9,6 +9,7 @@ CONFIG_DB_NO = 4 STATE_DB_NO = 6 FEATURE_TABLE = "FEATURE" +MGMT_INTERFACE_TABLE = "MGMT_INTERFACE" KUBE_LABEL_TABLE = "KUBE_LABELS" KUBE_LABEL_SET_KEY = "SET" @@ -41,6 +42,7 @@ IMAGE_TAG = "image_tag" FAIL_LOCK = "fail_lock" DO_JOIN = "do_join" +REQ = "req" # subproc key words @@ -643,8 +645,27 @@ def mock_subproc_side_effect(cmd, shell=False, stdout=None, stderr=None): return mock_proc(cmd, index) -def set_kube_mock(mock_subproc): +class mock_reqget: + def __init__(self): + self.ok = True + + def json(self): + return current_test_data.get(REQ, "") + + +def mock_reqget_side_effect(url, cert, verify=True): + return mock_reqget() + + +def set_kube_mock(mock_subproc, mock_table=None, mock_conn=None, mock_reqget=None): mock_subproc.side_effect = mock_subproc_side_effect + if mock_table != None: + mock_table.side_effect = table_side_effect + if mock_conn != None: + mock_conn.side_effect = conn_side_effect + if mock_reqget != None: + mock_reqget.side_effect = mock_reqget_side_effect + def create_remote_ctr_config_json(): str_conf = '\ diff --git a/src/sonic-ctrmgrd/tests/kube_commands_test.py b/src/sonic-ctrmgrd/tests/kube_commands_test.py index 637802ab1d9f..d8e0939efb85 100755 --- a/src/sonic-ctrmgrd/tests/kube_commands_test.py +++ b/src/sonic-ctrmgrd/tests/kube_commands_test.py @@ -15,6 +15,8 @@ KUBE_ADMIN_CONF = "/tmp/kube_admin.conf" FLANNEL_CONF_FILE = "/tmp/flannel.conf" CNI_DIR = "/tmp/cni/net.d" +AME_CRT = "/tmp/restapiserver.crt" +AME_KEY = "/tmp/restapiserver.key" # kube_commands test cases # NOTE: Ensure state-db entry is complete in PRE as we need to @@ -25,8 +27,7 @@ common_test.DESCR: "read labels", common_test.RETVAL: 0, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.PROC_OUT: ["foo=bar,hello=world"], common_test.POST: { "foo": "bar", @@ -39,8 +40,7 @@ common_test.TRIGGER_THROW: True, common_test.RETVAL: -1, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.POST: { }, common_test.PROC_KILLED: 1 @@ -49,8 +49,7 @@ common_test.DESCR: "read labels fail", common_test.RETVAL: -1, common_test.PROC_CMD: ["\ -kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], +kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF)], common_test.PROC_OUT: [""], common_test.PROC_ERR: ["command failed"], common_test.POST: { @@ -65,8 +64,7 @@ common_test.RETVAL: 0, common_test.ARGS: { "foo": "bar", "hello": "World!", "test": "ok" }, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF), +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF), "kubectl --kubeconfig {} label --overwrite nodes none hello-".format( KUBE_ADMIN_CONF), "kubectl --kubeconfig {} label --overwrite nodes none hello=World! test=ok".format( @@ -79,8 +77,7 @@ common_test.RETVAL: 0, common_test.ARGS: { "foo": "bar", "hello": "world" }, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) ], common_test.PROC_OUT: ["foo=bar,hello=world"] }, @@ -90,8 +87,7 @@ common_test.ARGS: { "any": "thing" }, common_test.RETVAL: -1, common_test.PROC_CMD: [ -"kubectl --kubeconfig {} get nodes --show-labels |\ - grep none | tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) +"kubectl --kubeconfig {} get nodes none --show-labels |tr -s ' ' | cut -f6 -d' '".format(KUBE_ADMIN_CONF) ], common_test.PROC_ERR: ["read failed"] } @@ -114,10 +110,22 @@ "mkdir -p {}".format(CNI_DIR), "cp {} {}".format(FLANNEL_CONF_FILE, CNI_DIR), "systemctl start kubelet", - "kubeadm join --discovery-file {} --node-name none".format( + "kubeadm join --discovery-file {} --node-name none --apiserver-advertise-address FC00:2::32".format( KUBE_ADMIN_CONF) ], - common_test.PROC_RUN: [True, True] + common_test.PROC_RUN: [True, True], + common_test.PRE: { + common_test.CONFIG_DB_NO: { + common_test.MGMT_INTERFACE_TABLE: { + "eth0|FC00:2::32/64": { + "gwaddr": "fc00:2::1" + } + } + } + }, + common_test.REQ: { + "data": {"ca.crt": "test"} + } }, 1: { common_test.DESCR: "Regular secure join", @@ -135,10 +143,22 @@ "mkdir -p {}".format(CNI_DIR), "cp {} {}".format(FLANNEL_CONF_FILE, CNI_DIR), "systemctl start kubelet", - "kubeadm join --discovery-file {} --node-name none".format( + "kubeadm join --discovery-file {} --node-name none --apiserver-advertise-address FC00:2::32".format( KUBE_ADMIN_CONF) ], - common_test.PROC_RUN: [True, True] + common_test.PROC_RUN: [True, True], + common_test.PRE: { + common_test.CONFIG_DB_NO: { + common_test.MGMT_INTERFACE_TABLE: { + "eth0|FC00:2::32/64": { + "gwaddr": "fc00:2::1" + } + } + } + }, + common_test.REQ: { + "data": {"ca.crt": "test"} + } }, 2: { common_test.DESCR: "Skip join as already connected", @@ -228,11 +248,17 @@ def init(self): s.close() with open(FLANNEL_CONF_FILE, "w") as s: s.close() + with open(AME_CRT, "w") as s: + s.close() + with open(AME_KEY, "w") as s: + s.close() kube_commands.KUBELET_YAML = kubelet_yaml kube_commands.CNI_DIR = CNI_DIR kube_commands.FLANNEL_CONF_FILE = FLANNEL_CONF_FILE kube_commands.SERVER_ADMIN_URL = "file://{}".format(self.admin_conf_file) kube_commands.KUBE_ADMIN_CONF = KUBE_ADMIN_CONF + kube_commands.AME_CRT = AME_CRT + kube_commands.AME_KEY = AME_KEY @patch("kube_commands.subprocess.Popen") @@ -295,11 +321,13 @@ def test_write_labels(self, mock_subproc): json.dumps(labels, indent=4))) assert False - + @patch("kube_commands.requests.get") + @patch("kube_commands.swsscommon.DBConnector") + @patch("kube_commands.swsscommon.Table") @patch("kube_commands.subprocess.Popen") - def test_join(self, mock_subproc): + def test_join(self, mock_subproc, mock_table, mock_conn, mock_reqget): self.init() - common_test.set_kube_mock(mock_subproc) + common_test.set_kube_mock(mock_subproc, mock_table, mock_conn, mock_reqget) for (i, ct_data) in join_test_data.items(): lock_file = "" From 64d189388eff52fbf3ef2274f244cd679d393072 Mon Sep 17 00:00:00 2001 From: ganglv <88995770+ganglyu@users.noreply.github.com> Date: Sat, 17 Sep 2022 06:08:10 +0800 Subject: [PATCH 087/106] Fix dhcp option buffer issue (#12033) Why I did it Current isc-dhcp uses below code to remove DHCP option: memmove(sp, op, op[1] + 2); sp += op[1] + 2; sp points to the option to be stripped, we can call it as option S. op points to the option after options S, we can call it as option O. DHCP option is a typical type-length-value structure, the first byte is type, the second byte is length, and remain parts are value. In this case, option O length is bigger than option S, and more than 2 bytes, after the memmove, we will get this result: Now Option S and Option O are overwritten, op[1] was the length of Option O, and it's modified after memmove. But current implementation is still using op[1] as length to update sp (sp+=op[1]+2), so we get the wrong sp. How I did it Create patch from https://github.com/isc-projects/dhcp The new impelementation use mlen to store the length of Option O before memmove, that's how it fixed the bug. size_t mlen = op[1] + 2; memmove(sp, op, mlen); sp += mlen; How to verify it I have a PR for sonic-mgmt to cover this issue: sonic-net/sonic-mgmt#6330 Signed-off-by: Gang Lv ganglv@microsoft.com --- ...ay-agent-option-buffer-pointer-logic.patch | 53 +++++++++++++++++++ src/isc-dhcp/patch/series | 1 + 2 files changed, 54 insertions(+) create mode 100644 src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch diff --git a/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch b/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch new file mode 100644 index 000000000000..051b58966cae --- /dev/null +++ b/src/isc-dhcp/patch/0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch @@ -0,0 +1,53 @@ +From 0a2f9a62bceb90b0d30461add2e25c4ce7a24547 Mon Sep 17 00:00:00 2001 +From: Thomas Markwalder +Date: Fri, 20 Dec 2019 10:11:54 -0500 +Subject: [PATCH] [#71] Fix dhcrelay agent option buffer pointer logic + +relay/dhcrelay.c + strip_relay_agent_options() + strip_relay_agent_options() + - corrected buffer pointer logic + +--- + relay/dhcrelay.c | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c +index 896e1e2e..980dacae 100644 +--- a/relay/dhcrelay.c ++++ b/relay/dhcrelay.c +@@ -1238,8 +1238,13 @@ strip_relay_agent_options(struct interface_info *in, + return (0); + + if (sp != op) { +- memmove(sp, op, op[1] + 2); +- sp += op[1] + 2; ++ size_t mlen = op[1] + 2; ++ memmove(sp, op, mlen); ++ sp += mlen; ++ if (sp > max) { ++ return (0); ++ } ++ + op = nextop; + } else + op = sp = nextop; +@@ -1620,8 +1620,13 @@ add_relay_agent_options(struct interface_info *ip, struct dhcp_packet *packet, + end_pad = NULL; + + if (sp != op) { +- memmove(sp, op, op[1] + 2); +- sp += op[1] + 2; ++ size_t mlen = op[1] + 2; ++ memmove(sp, op, mlen); ++ sp += mlen; ++ if (sp > max) { ++ return (0); ++ } ++ + op = nextop; + } else + op = sp = nextop; +-- +2.17.1 + diff --git a/src/isc-dhcp/patch/series b/src/isc-dhcp/patch/series index 5397aa0c6e06..b9efee0192f5 100644 --- a/src/isc-dhcp/patch/series +++ b/src/isc-dhcp/patch/series @@ -11,3 +11,4 @@ 0010-Bugfix-correctly-set-interface-netmask.patch 0011-dhcp-relay-Prevent-Buffer-Overrun.patch 0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch +0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch From 6678e3356e5e06374946b2a85fcd63b63464b5a4 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 18 Sep 2022 19:48:13 +0800 Subject: [PATCH 088/106] [ci/build]: Upgrade SONiC package versions (#12101) --- files/build/versions/default/versions-git | 2 +- files/build/versions/default/versions-web | 2 +- .../docker-base-buster/versions-deb-buster | 2 +- .../versions-deb-buster | 3 ++- .../versions-deb-buster-arm64 | 2 +- .../versions-deb-buster-armhf | 2 +- .../docker-database/versions-deb-buster | 2 +- .../docker-dhcp-relay/versions-deb-buster | 2 +- .../docker-fpm-frr/versions-deb-buster | 6 ++--- .../docker-gbsyncd-vs/versions-deb-buster | 2 +- .../dockers/docker-lldp/versions-deb-buster | 6 ++--- .../dockers/docker-mux/versions-deb-buster | 2 +- .../dockers/docker-nat/versions-deb-buster | 2 +- .../docker-orchagent/versions-deb-buster | 2 +- .../versions-deb-buster | 2 +- .../versions-deb-buster | 2 +- .../dockers/docker-sflow/versions-deb-buster | 2 +- .../dockers/docker-snmp/versions-deb-buster | 6 ++--- .../versions-deb-buster | 2 +- .../docker-sonic-mgmt-framework/versions-py3 | 2 +- .../versions-deb-buster | 2 +- .../docker-sonic-vs/versions-deb-buster | 2 +- .../dockers/docker-sonic-vs/versions-py3 | 2 +- .../docker-syncd-bfn-rpc/versions-deb-buster | 2 +- .../docker-syncd-brcm-rpc/versions-deb-buster | 2 +- .../docker-syncd-brcm/versions-deb-buster | 2 +- .../versions-deb-buster | 2 +- .../docker-syncd-centec/versions-deb-buster | 2 +- .../docker-syncd-invm/versions-deb-buster | 2 +- .../docker-syncd-mlnx-rpc/versions-deb-buster | 2 +- .../docker-syncd-mlnx/versions-deb-buster | 2 +- .../docker-syncd-vs/versions-deb-buster | 2 +- .../dockers/docker-teamd/versions-deb-buster | 2 +- .../sonic-slave-buster/versions-deb-buster | 27 ++++++++++--------- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- .../versions/host-image/versions-deb-buster | 9 ++++--- .../host-image/versions-deb-buster-arm64 | 3 +++ .../host-image/versions-deb-buster-armhf | 3 +++ files/build/versions/host-image/versions-py3 | 2 +- 40 files changed, 68 insertions(+), 59 deletions(-) diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index b6765f7e2bc7..23cee8818596 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==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d +https://chromium.googlesource.com/chromium/tools/depot_tools.git==18bdadc98ab6f94912ad97e9b9fda170777c5b7f 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/default/versions-web b/files/build/versions/default/versions-web index 83bda16e5d92..bab2f2d4cc1d 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==b692a224c718ad6e1cbd17eda8aaa673 +https://deb.nodesource.com/setup_14.x==02e66fef39d18cc683f760a67ccd5d68 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-base-buster/versions-deb-buster b/files/build/versions/dockers/docker-base-buster/versions-deb-buster index c6c2a79c8b20..60cc2997ff66 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -40,7 +40,7 @@ librtmp1==2.4+20151223.gitfa8646d.1-2 libsasl2-2==2.1.27+dfsg-1+deb10u2 libsasl2-modules-db==2.1.27+dfsg-1+deb10u2 libsodium23==1.0.17-1 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libssh2-1==1.8.0-2.1 libssl1.1==1.1.1n-0+deb10u3 libwrap0==7.6.q-28 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster index bc85330e0243..df0b1aa6e5f4 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster @@ -3,7 +3,7 @@ binutils==2.31.1-16 binutils-common==2.31.1-16 binutils-x86-64-linux-gnu==2.31.1-16 build-essential==12.6 -bzip2==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 cpp==4:8.3.0-1 cpp-8==8.3.0-6 dh-python==3.20190308 @@ -15,6 +15,7 @@ gcc-8==8.3.0-6 libapt-inst2.0==1.8.2.3 libasan5==8.3.0-6 libbinutils==2.31.1-16 +libbz2-1.0==1.0.6-9.2~deb10u2 libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 index 7094e3bc75d7..832fd7a2e36d 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-arm64 @@ -1,6 +1,6 @@ binutils-aarch64-linux-gnu==2.31.1-16 icu-devtools==63.1-6+deb10u3 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf index c948d1fad1ab..869dd6106476 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster-armhf @@ -1,6 +1,6 @@ binutils-arm-linux-gnueabihf==2.31.1-16 icu-devtools==63.1-6+deb10u3 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 libxml2==2.9.4+dfsg1-7+deb10u4 diff --git a/files/build/versions/dockers/docker-database/versions-deb-buster b/files/build/versions/dockers/docker-database/versions-deb-buster index 1979ecc0b69f..3a15169bef7c 100644 --- a/files/build/versions/dockers/docker-database/versions-deb-buster +++ b/files/build/versions/dockers/docker-database/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster index ae6ede20c056..bf6b5c979c2a 100644 --- a/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster +++ b/files/build/versions/dockers/docker-dhcp-relay/versions-deb-buster @@ -12,7 +12,7 @@ libdw1==0.176-1.1 libedit2==3.1-20181209-1 libevent-2.1-6==2.1.8-stable-4 libexplain51==1.4.D001-8 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libirs-export161==1:9.11.5.P4+dfsg-5.1+deb10u7 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 2a7a468a4783..8a12039c1772 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster +++ b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster @@ -10,11 +10,11 @@ libbsd0==0.9.1-2+deb10u1 libc-ares2==1.14.0-1+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libjson-c3==0.12.1+ds-2+deb10u1 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u1 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 @@ -26,7 +26,7 @@ libunwind8==1.2.1-10~deb10u1 libyang1==1.0.184-2 libyang1-dbgsym==1.0.184-2 logrotate==3.14.0-4 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u1 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sensible-utils==0.0.12 diff --git a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster index 9b8877c2e9c1..e194f52f4366 100644 --- a/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-gbsyncd-vs/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-lldp/versions-deb-buster b/files/build/versions/dockers/docker-lldp/versions-deb-buster index 00b50d4acadf..1d6b810faffb 100644 --- a/files/build/versions/dockers/docker-lldp/versions-deb-buster +++ b/files/build/versions/dockers/docker-lldp/versions-deb-buster @@ -5,11 +5,11 @@ libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 libevent-2.1-6==2.1.8-stable-4 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 libipt2==2.0-2 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u1 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 @@ -21,7 +21,7 @@ libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 lldpd==1.0.4-1 lldpd-dbgsym==1.0.4-1 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u1 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sshpass==1.06-1 diff --git a/files/build/versions/dockers/docker-mux/versions-deb-buster b/files/build/versions/dockers/docker-mux/versions-deb-buster index 1e89df10454d..d5d8b3763136 100644 --- a/files/build/versions/dockers/docker-mux/versions-deb-buster +++ b/files/build/versions/dockers/docker-mux/versions-deb-buster @@ -12,7 +12,7 @@ libboost-thread1.71.0==1.71.0-6~bpo10+1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libhiredis0.14-dbgsym==0.14.0-3~bpo9+1 libicu63==63.1-6+deb10u3 diff --git a/files/build/versions/dockers/docker-nat/versions-deb-buster b/files/build/versions/dockers/docker-nat/versions-deb-buster index 9d09f1f1044d..995fea293abf 100644 --- a/files/build/versions/dockers/docker-nat/versions-deb-buster +++ b/files/build/versions/dockers/docker-nat/versions-deb-buster @@ -7,7 +7,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libip4tc0==1.8.2-4 libip6tc0==1.8.2-4 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-buster b/files/build/versions/dockers/docker-orchagent/versions-deb-buster index 06926e89260f..2242795a0c03 100644 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-buster +++ b/files/build/versions/dockers/docker-orchagent/versions-deb-buster @@ -27,7 +27,7 @@ libdw1==0.176-1.1 libedit2==3.1-20181209-1 libexpat1-dev==2.2.6-2+deb10u4 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libipt2==2.0-2 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index d2ea89bc3b57..33a9b534ea5d 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -41,7 +41,7 @@ libfreeipmi17==1.6.3-1.1 libfreetype6==2.9.1-3+deb10u3 libfribidi0==1.0.5-3.1+deb10u2 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libgraphite2-3==1.3.13-7 diff --git a/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster b/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster index 919f91188e80..10f1ebf4bb91 100644 --- a/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster +++ b/files/build/versions/dockers/docker-router-advertiser/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-sflow/versions-deb-buster b/files/build/versions/dockers/docker-sflow/versions-deb-buster index c1675ee9e1a0..b484eb828ba2 100644 --- a/files/build/versions/dockers/docker-sflow/versions-deb-buster +++ b/files/build/versions/dockers/docker-sflow/versions-deb-buster @@ -6,7 +6,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-buster b/files/build/versions/dockers/docker-snmp/versions-deb-buster index cd8222097c2b..e7152e027b00 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-buster +++ b/files/build/versions/dockers/docker-snmp/versions-deb-buster @@ -23,14 +23,14 @@ libedit2==3.1-20181209-1 libexpat1-dev==2.2.6-2+deb10u4 libfreeipmi17==1.6.3-1.1 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libipt2==2.0-2 libisl19==0.20-2 libitm1==8.3.0-6 liblsan0==8.3.0-6 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u1 libmpc3==1.1.0-1 libmpfr6==4.0.2-1 libmpx2==8.3.0-6 @@ -50,7 +50,7 @@ libunwind8==1.2.1-10~deb10u1 linux-libc-dev==4.19.249-2 locales==2.28-10+deb10u1 make==4.2.1-1.2 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u1 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 python3-dev==3.7.3-1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster index 037e43e3429f..09152d36b302 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster @@ -21,7 +21,7 @@ libdw1==0.176-1.1 libedit2==3.1-20181209-1 libexpat1-dev==2.2.6-2+deb10u4 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 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 689fff137344..b2153f5b283c 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -5,7 +5,7 @@ click==8.1.3 clickclick==20.10.2 connexion==2.7.0 flask==2.2.2 -grpcio==1.48.1 +grpcio==1.49.0 grpcio-tools==1.20.0 idna==3.4 importlib-metadata==4.12.0 diff --git a/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster b/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster index 6fe8ddb0de94..db799f904509 100644 --- a/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-telemetry/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index 1fef1edfbbfb..46f935d09b3b 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -54,7 +54,7 @@ libexpat1-dev==2.2.6-2+deb10u4 libfreetype6==2.9.1-3+deb10u3 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libip4tc0==1.8.2-4 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index 2b249f49e307..7393abb1e2c2 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,4 +1,4 @@ -certifi==2022.6.15.2 +certifi==2022.9.14 charset-normalizer==2.1.1 click==7.0 idna==3.4 diff --git a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster index 83dcc958c5a2..6e1c69933a29 100644 --- a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster @@ -20,7 +20,7 @@ libdpkg-perl==1.19.8 libexpat1-dev==2.2.6-2+deb10u4 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libisl19==0.20-2 libitm1==8.3.0-6 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster index 662bcb8745f8..e2a53fedb5da 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster @@ -20,7 +20,7 @@ libdpkg-perl==1.19.8 libexpat1-dev==2.2.6-2+deb10u4 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libisl19==0.20-2 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index bd0382758630..0b10cb15dd8f 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -8,7 +8,7 @@ libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libkmod2==26-1 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster index cb40c38d3f70..b1f9412396ea 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster @@ -22,7 +22,7 @@ libdpkg-perl==1.19.8 libexpat1-dev==2.2.6-2+deb10u4 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libicu63==63.1-6+deb10u3 libisl19==0.20-2 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster index 898e95442221..d85883d1728c 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster @@ -5,7 +5,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libkmod2==26-1 diff --git a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster index 55f09c760631..52b4bf3f9725 100644 --- a/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-invm/versions-deb-buster @@ -6,7 +6,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster index d7e2c268d7be..2364dce02ea4 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx-rpc/versions-deb-buster @@ -19,7 +19,7 @@ libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 libisl19==0.20-2 libitm1==8.3.0-6 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index b79cef8243c7..908dffa79522 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -11,7 +11,7 @@ libdw1==0.176-1.1 libedit2==3.1-20181209-1 libelf1==0.176-1.1 libexpat1-dev==2.2.6-2+deb10u4 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 libipt2==2.0-2 diff --git a/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster b/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster index 9b8877c2e9c1..e194f52f4366 100644 --- a/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-vs/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 diff --git a/files/build/versions/dockers/docker-teamd/versions-deb-buster b/files/build/versions/dockers/docker-teamd/versions-deb-buster index 992786e8eb13..e5c88ab32b5d 100644 --- a/files/build/versions/dockers/docker-teamd/versions-deb-buster +++ b/files/build/versions/dockers/docker-teamd/versions-deb-buster @@ -4,7 +4,7 @@ libbabeltrace1==1.5.6-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libpopt0==1.16-12 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 2d38a80ff936..69dd5320aa5b 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -35,8 +35,8 @@ bsd-mailx==8.1.2-0.20180807cvs-1 bsdmainutils==11.1.2+b1 build-essential==12.6 byacc==20140715-1+b1 -bzip2==1.0.6-9.2~deb10u1 -bzip2-doc==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 +bzip2-doc==1.0.6-9.2~deb10u2 ca-certificates==20200601~deb10u2 ca-certificates-java==20190405 cdbs==0.4.159 @@ -324,7 +324,8 @@ libbs2b0==3.1.0+dfsg-2.2 libbsd-dev==0.9.1-2+deb10u1 libbsd0==0.9.1-2+deb10u1 libbsh-java==2.0b4-19 -libbz2-dev==1.0.6-9.2~deb10u1 +libbz2-1.0==1.0.6-9.2~deb10u2 +libbz2-dev==1.0.6-9.2~deb10u2 libc-ares-dev==1.14.0-1+deb10u1 libc-ares2==1.14.0-1+deb10u1 libc-dev-bin==2.28-10+deb10u1 @@ -538,11 +539,11 @@ libgl1-mesa-dri==18.3.6-2+deb10u1 libglapi-mesa==18.3.6-2+deb10u1 libgles1==1.1.0-1 libgles2==1.1.0-1 -libglib2.0-0==2.58.3-2+deb10u3 -libglib2.0-bin==2.58.3-2+deb10u3 -libglib2.0-data==2.58.3-2+deb10u3 -libglib2.0-dev==2.58.3-2+deb10u3 -libglib2.0-dev-bin==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 +libglib2.0-bin==2.58.3-2+deb10u4 +libglib2.0-data==2.58.3-2+deb10u4 +libglib2.0-dev==2.58.3-2+deb10u4 +libglib2.0-dev-bin==2.58.3-2+deb10u4 libglu1-mesa==9.0.0-2.1+b3 libglu1-mesa-dev==9.0.0-2.1+b3 libglvnd-core-dev==1.1.0-1 @@ -738,9 +739,9 @@ libmagickcore-6.q16-6-extra==8:6.9.10.23+dfsg-2.1+deb10u1 libmagickwand-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u1 libmail-sendmail-perl==0.80-1 libmailtools-perl==2.18-1 -libmariadb-dev==1:10.3.34-0+deb10u1 -libmariadb-dev-compat==1:10.3.34-0+deb10u1 -libmariadb3==1:10.3.34-0+deb10u1 +libmariadb-dev==1:10.3.36-0+deb10u1 +libmariadb-dev-compat==1:10.3.36-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u1 libmaven-archiver-java==3.2.0-2 libmaven-clean-plugin-java==3.1.0-1 libmaven-common-artifact-filters-java==3.0.1-3 @@ -1051,7 +1052,7 @@ libsoup2.4-1==2.64.2-2 libsoxr0==0.1.2-3 libspeex1==1.2~rc1.2-1+b2 libspice-server1==0.14.0-1.3+deb10u1 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libsratom-0-0==0.6.0~dfsg0-1 libssh-gcrypt-4==0.8.7-1+deb10u1 libssh2-1==1.8.0-2.1 @@ -1342,7 +1343,7 @@ make==4.2.1-1.2 man-db==2.8.5-2 manpages==4.16-2 manpages-dev==4.16-2 -mariadb-common==1:10.3.34-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u1 maven==3.6.0-1 maven-debian-helper==2.3.2 maven-repo-helper==1.9.3 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 47d4f0c37f4b..3cb1daca3812 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==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d +https://chromium.googlesource.com/chromium/tools/depot_tools.git==18bdadc98ab6f94912ad97e9b9fda170777c5b7f 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 47d4f0c37f4b..3cb1daca3812 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==9ebcfa6be17c2d1e7bd72135ceab5e767ed89b7d +https://chromium.googlesource.com/chromium/tools/depot_tools.git==18bdadc98ab6f94912ad97e9b9fda170777c5b7f 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 c2a9a5d70e16..53b1422fa2c5 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -10,7 +10,7 @@ bridge-utils==1.6-2 bsdmainutils==11.1.2+b1 build-essential==12.6 busybox==1:1.30.1-4 -bzip2==1.0.6-9.2~deb10u1 +bzip2==1.0.6-9.2~deb10u2 ca-certificates==20200601~deb10u2 cgroup-tools==0.41-8.1 conntrack==1:1.4.5-2 @@ -90,6 +90,7 @@ libassuan0==2.5.2-1 libatomic1==8.3.0-6 libbinutils==2.31.1-16 libbsd0==0.9.1-2+deb10u1 +libbz2-1.0==1.0.6-9.2~deb10u2 libc-dev-bin==2.28-10+deb10u1 libc-l10n==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 @@ -124,7 +125,7 @@ libgcc-8-dev==8.3.0-6 libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 libgirepository-1.0-1==1.58.3-2 -libglib2.0-0==2.58.3-2+deb10u3 +libglib2.0-0==2.58.3-2+deb10u4 libgnutls30==3.6.7-4+deb10u9 libgomp1==8.3.0-6 libgpm2==1.20.7-5 @@ -203,7 +204,7 @@ libreadline7==7.0-5 librtmp1==2.4+20151223.gitfa8646d.1-2 libsasl2-2==2.1.27+dfsg-1+deb10u2 libsasl2-modules-db==2.1.27+dfsg-1+deb10u2 -libsqlite3-0==3.27.2-3+deb10u1 +libsqlite3-0==3.27.2-3+deb10u2 libssh2-1==1.8.0-2.1 libssl-dev==1.1.1n-0+deb10u3 libssl1.1==1.1.1n-0+deb10u3 @@ -302,7 +303,7 @@ software-properties-common==0.96.20.2-2 sonic-device-data==1.0-1 sonic-host-services-data==1.0-1 sonic-utilities-data==1.0-1 -sqlite3==3.27.2-3+deb10u1 +sqlite3==3.27.2-3+deb10u2 squashfs-tools==1:4.3-12+deb10u2 sudo==1.8.27-1+deb10u3 swig==3.0.12-2 diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index 86853a6d9ac9..a2991cc83fe5 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -1,11 +1,14 @@ binutils-aarch64-linux-gnu==2.31.1-16 +bzip2==1.0.6-9.2~deb10u1 curl==7.64.0-4+deb10u2 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 +libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 +libsqlite3-0==3.27.2-3+deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 diff --git a/files/build/versions/host-image/versions-deb-buster-armhf b/files/build/versions/host-image/versions-deb-buster-armhf index b119c920e8c4..26bcacfa7f87 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -1,11 +1,14 @@ binutils-arm-linux-gnueabihf==2.31.1-16 +bzip2==1.0.6-9.2~deb10u1 curl==7.64.0-4+deb10u2 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 +libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 +libsqlite3-0==3.27.2-3+deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 diff --git a/files/build/versions/host-image/versions-py3 b/files/build/versions/host-image/versions-py3 index 0f2d95bd38b0..244e9ca0c186 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -2,7 +2,7 @@ azure-common==1.1.28 azure-nspkg==3.0.2 azure-storage==0.36.0 bitarray==1.5.3 -certifi==2022.6.15.2 +certifi==2022.9.14 cffi==1.15.1 charset-normalizer==2.1.1 click==7.0 From 429ef389ad572e311cea15a43f824ca31eac4e4d Mon Sep 17 00:00:00 2001 From: Dror Prital <76714716+dprital@users.noreply.github.com> Date: Mon, 19 Sep 2022 09:21:53 +0300 Subject: [PATCH 089/106] [202012][submodule] Advance sonic-snmpagent pointer (#11964) Update sonic-snmpagent submodule pointer to include the following: * Fix: if routestr does not exist, skip ([#257](https://github.com/sonic-net/sonic-snmpagent/pull/257)) Signed-off-by: dprital --- src/sonic-snmpagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-snmpagent b/src/sonic-snmpagent index c75440bb93ec..13ddb0e933b2 160000 --- a/src/sonic-snmpagent +++ b/src/sonic-snmpagent @@ -1 +1 @@ -Subproject commit c75440bb93ecea3d1a8d5299257e6acdf86adc52 +Subproject commit 13ddb0e933b2f71db7f9cbada3472fee7ca2a869 From 3f3d472a158c706502ca8185996621a2b52073c7 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Mon, 19 Sep 2022 15:42:32 -0700 Subject: [PATCH 090/106] [sonic-platform-common][sonic-platform-daemons] submodule update (#12105) sonic-platform-common c87fd2d (HEAD -> 202012, origin/202012) [Credo][Ycable] enhancement and error exception for some APIs (#303) 5e990c2 [ycable] add definitions of some new API's for Y-Cable infrastructure (#301) sonic-platform-daemons 5f3d0a7 (HEAD -> 202012, origin/202012) [ycabled] fix insert events from xcvrd;cleanup some mux toggle logic (#287 Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com --- src/sonic-platform-common | 2 +- src/sonic-platform-daemons | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-platform-common b/src/sonic-platform-common index fd8cf3a9dad9..c87fd2db72d2 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit fd8cf3a9dad971b36cdd49db6ee34b918aa450cb +Subproject commit c87fd2db72d2a82a6f0434b86f208f7c406fa74e diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 978667c03b43..5f3d0a7b930c 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 978667c03b438b592fa3073398c92c595a337dc3 +Subproject commit 5f3d0a7b930c074c84762eda105341a50cde8d7d From 4396d67d64b77362c01757c086cf8d72e78fa27d Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 20 Sep 2022 19:51:45 +0800 Subject: [PATCH 091/106] [ci/build]: Upgrade SONiC package versions (#12120) --- .../build/versions/build/build-sonic-slave-buster/versions-git | 2 +- files/build/versions/default/versions-git | 2 +- .../versions/dockers/docker-sonic-mgmt-framework/versions-py3 | 2 +- 3 files changed, 3 insertions(+), 3 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 d85ae1de4391..f31683122293 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -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==ab4bf75bb7d02ffa1f5c407d56980f157ef56fe2 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==cac473afc339d472f01bd50674ddcf3adb5fc82e \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 23cee8818596..d802cf15fcfd 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -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==ab4bf75bb7d02ffa1f5c407d56980f157ef56fe2 \ No newline at end of file +https://salsa.debian.org/ssh-team/openssh.git==cac473afc339d472f01bd50674ddcf3adb5fc82e \ 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 b2153f5b283c..689fff137344 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -5,7 +5,7 @@ click==8.1.3 clickclick==20.10.2 connexion==2.7.0 flask==2.2.2 -grpcio==1.49.0 +grpcio==1.48.1 grpcio-tools==1.20.0 idna==3.4 importlib-metadata==4.12.0 From 3a0d0303acc5752fe92193696e575c0f17afb41e Mon Sep 17 00:00:00 2001 From: Xichen96 Date: Wed, 21 Sep 2022 16:10:09 +0800 Subject: [PATCH 092/106] [202012][submodule] update sonic-utilities (#12124) 47dc7ea Added support for tunnel route status in show vnet routes all. (#2341) 7b8a62f Vnet_route_check Vxlan tunnel route update. (#2281) (#2376) b21e2ce [202012][sonic_installer] consider existing swap when setting up swap Signed-off-by: Xichen Lin --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 26043909f405..b21e2ceb08ac 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 26043909f405d7137763479a06d9fe24763fc3b6 +Subproject commit b21e2ceb08ac89d08167e1e4cde4f2401091473c From 2b5eb45d8308f0f13331c6ecd52276ef6729b160 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 21 Sep 2022 20:37:27 +0800 Subject: [PATCH 093/106] [ci/build]: Upgrade SONiC package versions (#12141) --- files/build/versions/default/versions-git | 2 +- files/build/versions/dockers/sonic-slave-buster/versions-git | 2 +- files/build/versions/dockers/sonic-slave-stretch/versions-git | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index d802cf15fcfd..68ca0e561117 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==18bdadc98ab6f94912ad97e9b9fda170777c5b7f +https://chromium.googlesource.com/chromium/tools/depot_tools.git==0d126c974c11b09f41ec3dc4653a583c8929fa8a 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/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 3cb1daca3812..a5de62c75b11 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==18bdadc98ab6f94912ad97e9b9fda170777c5b7f +https://chromium.googlesource.com/chromium/tools/depot_tools.git==0d126c974c11b09f41ec3dc4653a583c8929fa8a 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 3cb1daca3812..a5de62c75b11 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==18bdadc98ab6f94912ad97e9b9fda170777c5b7f +https://chromium.googlesource.com/chromium/tools/depot_tools.git==0d126c974c11b09f41ec3dc4653a583c8929fa8a https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file From daff6dbaaac75f7f0e65ab71ff855168618e9a36 Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Wed, 21 Sep 2022 22:38:13 -0700 Subject: [PATCH 094/106] Update cisco-8000 submodule to v0.116 (#12135) --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index 2e81a9d5ad89..ee13ff9c960b 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.112 +ref=202012-v0.116 From 95b19bbb462055840d81b8a9930722ffcdd78a90 Mon Sep 17 00:00:00 2001 From: zitingguo-ms Date: Fri, 23 Sep 2022 13:59:51 +0800 Subject: [PATCH 095/106] Pick up fixes and make up BRCM SAI version to 4.3.7.1 (#12069) Signed-off-by: zitingguo-ms Signed-off-by: zitingguo-ms --- files/build/versions/default/versions-web | 2 ++ platform/broadcom/sai.mk | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/files/build/versions/default/versions-web b/files/build/versions/default/versions-web index bab2f2d4cc1d..ab99281f096e 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -50,6 +50,8 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912 https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a diff --git a/platform/broadcom/sai.mk b/platform/broadcom/sai.mk index dc4d9aa0d839..80c1698d30e5 100644 --- a/platform/broadcom/sai.mk +++ b/platform/broadcom/sai.mk @@ -1,8 +1,8 @@ -BRCM_SAI = libsaibcm_4.3.7.0_amd64.deb -$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D" -BRCM_SAI_DEV = libsaibcm-dev_4.3.7.0_amd64.deb +BRCM_SAI = libsaibcm_4.3.7.1_amd64.deb +$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D" +BRCM_SAI_DEV = libsaibcm-dev_4.3.7.1_amd64.deb $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) -$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D" +$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D" SONIC_ONLINE_DEBS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) From 26470dd23163fec519ae766b53ff91e332fef9b4 Mon Sep 17 00:00:00 2001 From: vdahiya12 <67608553+vdahiya12@users.noreply.github.com> Date: Sat, 24 Sep 2022 15:16:54 -0700 Subject: [PATCH 096/106] [202012][sonic-platform-common][sonic-platform-daemons] (#12178) [sonic-platform-common] commit -> git log --oneline c87fd2d..202012 5c90100 (HEAD -> 202012, origin/202012) [credo][ycable] remove mux-toggle inprogress flags for some API's (#311) [sonic-platform-daemons] commit -> git log --oneline 5f3d0a7..202012 99d2528 (HEAD -> 202012, origin/202012) add support to execute new ycable API's, add datetime field to mux_info (#297) (#299) Signed-off-by: vaibhav-dahiya --- src/sonic-platform-common | 2 +- src/sonic-platform-daemons | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-platform-common b/src/sonic-platform-common index c87fd2db72d2..5c9010074dc8 160000 --- a/src/sonic-platform-common +++ b/src/sonic-platform-common @@ -1 +1 @@ -Subproject commit c87fd2db72d2a82a6f0434b86f208f7c406fa74e +Subproject commit 5c9010074dc8d9284242b1fe31146926b06f5c89 diff --git a/src/sonic-platform-daemons b/src/sonic-platform-daemons index 5f3d0a7b930c..99d252849da2 160000 --- a/src/sonic-platform-daemons +++ b/src/sonic-platform-daemons @@ -1 +1 @@ -Subproject commit 5f3d0a7b930c074c84762eda105341a50cde8d7d +Subproject commit 99d252849da23d8188567bc32d5a31c28310c0d8 From dc67ec28692f743ddf9d748f1ded459dba6bf27c Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 25 Sep 2022 20:10:04 +0800 Subject: [PATCH 097/106] [ci/build]: Upgrade SONiC package versions (#12181) --- .../build/build-sonic-slave-buster/versions-deb-buster | 2 +- .../versions/build/build-sonic-slave-buster/versions-web | 4 ++-- .../versions/build/build-sonic-slave-stretch/versions-web | 4 ++-- files/build/versions/default/versions-git | 2 +- files/build/versions/default/versions-web | 4 +--- .../dockers/docker-base-buster/versions-deb-buster | 2 +- .../docker-config-engine-buster/versions-deb-buster | 2 +- .../versions/dockers/docker-orchagent/versions-deb-buster | 2 +- .../dockers/docker-platform-monitor/versions-deb-buster | 2 +- .../versions/dockers/docker-snmp/versions-deb-buster | 2 +- .../docker-sonic-mgmt-framework/versions-deb-buster | 2 +- .../dockers/docker-sonic-mgmt-framework/versions-py3 | 2 +- .../versions/dockers/docker-sonic-vs/versions-deb-buster | 2 +- files/build/versions/dockers/docker-sonic-vs/versions-py3 | 2 +- .../dockers/docker-syncd-bfn-rpc/versions-deb-buster | 2 +- .../dockers/docker-syncd-brcm-rpc/versions-deb-buster | 2 +- .../dockers/docker-syncd-brcm/versions-deb-buster | 2 +- .../dockers/docker-syncd-centec-rpc/versions-deb-buster | 2 +- .../dockers/docker-syncd-centec/versions-deb-buster-arm64 | 2 +- .../dockers/docker-syncd-mlnx/versions-deb-buster | 2 +- .../dockers/docker-syncd-mrvl/versions-deb-buster-armhf | 2 +- .../dockers/sonic-slave-buster/versions-deb-buster | 8 ++++---- .../dockers/sonic-slave-buster/versions-deb-buster-arm64 | 2 +- .../dockers/sonic-slave-buster/versions-deb-buster-armhf | 2 +- .../versions/dockers/sonic-slave-buster/versions-git | 2 +- .../versions/dockers/sonic-slave-stretch/versions-git | 2 +- files/build/versions/host-image/versions-deb-buster | 6 +++--- files/build/versions/host-image/versions-deb-buster-arm64 | 3 +++ files/build/versions/host-image/versions-deb-buster-armhf | 3 +++ files/build/versions/host-image/versions-py3 | 2 +- 30 files changed, 41 insertions(+), 37 deletions(-) diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster index 79d904a93254..11723f435d7f 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/build/build-sonic-slave-buster/versions-deb-buster @@ -18,7 +18,7 @@ libnl-nf-3-200==3.5.0-1 libnl-nf-3-dev==3.5.0-1 libnl-route-3-200==3.5.0-1 libnl-route-3-dev==3.5.0-1 -libsaibcm==4.3.7.0 +libsaibcm==4.3.7.1 libsaimetadata==1.0.0 libsaimetadata-dev==1.0.0 libsairedis==1.0.0 diff --git a/files/build/versions/build/build-sonic-slave-buster/versions-web b/files/build/versions/build/build-sonic-slave-buster/versions-web index 3de472035f53..58cf7826ddb6 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-web +++ b/files/build/versions/build/build-sonic-slave-buster/versions-web @@ -28,8 +28,8 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/bcmcmd?sv=2015-04-05&sr=b&sig=sUdbU7oVbh5exbXXHVL5TDFBTWDDBASHeJ8Cp0B0TIc%3D&se=2038-05-06T22%3A34%3A19Z&sp=r==b8aefc751bdf93218716bca6797460ff https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.debian.tar.xz?sv=2015-04-05&sr=b&sig=H0RFeC41MCvhTQCln85DuPLn5v2goozwz%2FB9sA9p5eQ%3D&se=2046-08-20T23%3A46%3A02Z&sp=r==47a284f4762f86ba24753ea75d85e6cb https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6-1.dsc?sv=2015-04-05&sr=b&sig=IS7FKUN%2Bvq0T55f4X2hGAViB70Y%2FgzjGgvzpUJLyUfA%3D&se=2046-08-20T23%3A46%3A57Z&sp=r==151f97b46df2dafbd5bb954bb419642c https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_6.6.orig.tar.gz?sv=2015-04-05&sr=b&sig=JZx4qiLuO36T0rsGqk4V2RDuWjRw6NztsLK7vlBYAkg%3D&se=2046-08-20T23%3A47%3A13Z&sp=r==9ae2c6e7131cd2813edcc65cbe5f223f diff --git a/files/build/versions/build/build-sonic-slave-stretch/versions-web b/files/build/versions/build/build-sonic-slave-stretch/versions-web index ac8007914719..71c012993d06 100644 --- a/files/build/versions/build/build-sonic-slave-stretch/versions-web +++ b/files/build/versions/build/build-sonic-slave-stretch/versions-web @@ -1,2 +1,2 @@ -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A59Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=0gWqYSKVRW1h8If5CS63QjwlMt%2F1sCQcFbmFd6WTxeU%3D==55daa0f34fe4e284270f2db2d974cb91 -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.0_amd64.deb?sv=2020-08-04&st=2022-08-10T09%3A20%3A43Z&se=2037-08-11T09%3A20%3A00Z&sr=b&sp=r&sig=T%2FHU25LsKmG5jzXLN%2BXlVXAJFg%2Bv0bfvL%2FNITpRNDyA%3D==00a95db04e7736dbe0983da675c81985 \ No newline at end of file +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c +https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 \ No newline at end of file diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 68ca0e561117..38069efd21b4 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==0d126c974c11b09f41ec3dc4653a583c8929fa8a +https://chromium.googlesource.com/chromium/tools/depot_tools.git==08bb5c487f80147a236360ea50f4544890530779 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/default/versions-web b/files/build/versions/default/versions-web index ab99281f096e..f424130a0d09 100644 --- a/files/build/versions/default/versions-web +++ b/files/build/versions/default/versions-web @@ -18,7 +18,7 @@ http://www.mellanox.com/downloads/MFT/mft-4.18.0-106-x86_64-deb.tgz==83d169e43bc https://bootstrap.pypa.io/pip/2.7/get-pip.py==60e8267eb1b7bc71dc4843eb7bd294d3 https://deb.nodesource.com/gpgkey/nodesource.gpg.key==003b51a89a133b5db4cca98b2dea3117 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/node_14.x/dists/buster/Release==f603a03a9c19dfcff06549da4d65e6ea https://deb.nodesource.com/setup_10.x==6742c0148159980e8f6e886df1f8bbe1 https://deb.nodesource.com/setup_14.x==02e66fef39d18cc683f760a67ccd5d68 https://download.docker.com/linux/debian/gpg==1afae06b34a13c1b3d9cb61a26285a15 @@ -50,8 +50,6 @@ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_ https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg-5.dsc==2443e4dffbdb020e7ab4f947a7904912 https://sonicstorage.blob.core.windows.net/debian/pool/main/n/net-snmp/net-snmp_5.7.3+dfsg.orig.tar.xz==6391ae27eb1ae34ff5530712bb1c4209 https://sonicstorage.blob.core.windows.net/packages/20190307/dsserve?sv=2015-04-05&sr=b&sig=lk7BH3DtW%2F5ehc0Rkqfga%2BUCABI0UzQmDamBsZH9K6w%3D&se=2038-05-06T22%3A34%3A45Z&sp=r==f9d4b815ebb9be9f755dedca8a51170d -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm-dev_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A38%3A00Z&se=2037-09-15T09%3A38%3A00Z&sr=b&sp=r&sig=woY1S03ENzUKUG0htzuIaPl%2ByV0dSOm2QsimPDBhGpw%3D==62e0023f93767abcbe661da66b4bdc7c -https://sonicstorage.blob.core.windows.net/packages/bcmsai/4.3/202012/libsaibcm_4.3.7.1_amd64.deb?sv=2020-08-04&st=2022-09-14T09%3A37%3A35Z&se=2037-09-15T09%3A37%3A00Z&sr=b&sp=r&sig=Yb9q50mb5E0A9mAj8DEc7xfc1WHdW1tyqi5OdAjUSec%3D==38415617b3bf93b2c64a6334e201a044 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake-data_3.13.2-1_bpo9%2B1_all.deb?st=2020-03-27T02%3A22%3A24Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=Xby%2Bm3OZOjPB%2FSlDbHD65yDcPzAgoys%2FA3vK8RB4BzA%3D==147cf42f3a68f6d6f1e53d95a599a1af https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_amd64.deb?st=2020-03-27T02%3A27%3A21Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=4MvmmDBQuicFEJYakLm7xCNU19yJ8GIP4ankFSnITKY%3D==e75c741e8b6918b8f03625e456fa0275 https://sonicstorage.blob.core.windows.net/packages/cmake/cmake_3.13.2-1_bpo9%2B1_arm64.deb?st=2020-03-27T02%3A28%3A38Z&se=2100-03-26T19%3A00%3A00Z&sp=rl&sv=2018-03-28&sr=b&sig=rrHMkLi29aI8yH6s52ILCY8VcEbNFrzYT2DmC5RwOgs%3D==9bcc989e6ed168717f67c07e79177d4a 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 60cc2997ff66..5de2692548cb 100644 --- a/files/build/versions/dockers/docker-base-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-base-buster/versions-deb-buster @@ -7,7 +7,7 @@ libcurl4==7.64.0-4+deb10u3 libdaemon0==0.14-7 libdbus-1-3==1.12.20-0+deb10u1 libestr0==0.1.10-2.1 -libexpat1==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 libfastjson4==0.99.8-2 libgdbm-compat4==1.18.1-4 libgdbm6==1.18.1-4 diff --git a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster index df0b1aa6e5f4..e0a50ff3d52d 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster @@ -20,7 +20,7 @@ libc-dev-bin==2.28-10+deb10u1 libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 libgomp1==8.3.0-6 libhiredis0.14==0.14.0-3~bpo9+1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-buster b/files/build/versions/dockers/docker-orchagent/versions-deb-buster index 2242795a0c03..45d321f9bf85 100644 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-buster +++ b/files/build/versions/dockers/docker-orchagent/versions-deb-buster @@ -25,7 +25,7 @@ libcc1-0==8.3.0-6 libdpkg-perl==1.19.8 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index 33a9b534ea5d..fed30485b7c8 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -35,7 +35,7 @@ libdbi1==0.9.0-5 libdpkg-perl==1.19.8 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libfontconfig1==2.13.1-2 libfreeipmi17==1.6.3-1.1 libfreetype6==2.9.1-3+deb10u3 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-buster b/files/build/versions/dockers/docker-snmp/versions-deb-buster index e7152e027b00..1a213af4add3 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-buster +++ b/files/build/versions/dockers/docker-snmp/versions-deb-buster @@ -20,7 +20,7 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libfreeipmi17==1.6.3-1.1 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster index 09152d36b302..ec3a89f5b4a1 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster @@ -19,7 +19,7 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdw1==0.176-1.1 libedit2==3.1-20181209-1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 libgomp1==8.3.0-6 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 689fff137344..bdb608f43d03 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -5,7 +5,7 @@ click==8.1.3 clickclick==20.10.2 connexion==2.7.0 flask==2.2.2 -grpcio==1.48.1 +grpcio==1.49.1 grpcio-tools==1.20.0 idna==3.4 importlib-metadata==4.12.0 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index 46f935d09b3b..db7363dc1553 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -50,7 +50,7 @@ libdpkg-perl==1.19.8 libedit2==3.1-20181209-1 libefiboot1==37-2+deb10u1 libefivar1==37-2+deb10u1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libfreetype6==2.9.1-3+deb10u3 libfuse2==2.9.9-1+deb10u1 libgcc-8-dev==8.3.0-6 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-py3 b/files/build/versions/dockers/docker-sonic-vs/versions-py3 index 7393abb1e2c2..4cbe3268a0ec 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-vs/versions-py3 @@ -1,4 +1,4 @@ -certifi==2022.9.14 +certifi==2022.9.24 charset-normalizer==2.1.1 click==7.0 idna==3.4 diff --git a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster index 6e1c69933a29..c0efeea00e29 100644 --- a/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn-rpc/versions-deb-buster @@ -17,7 +17,7 @@ libboost-atomic1.71.0==1.71.0-6~bpo10+1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 diff --git a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster index e2a53fedb5da..39690e90598b 100644 --- a/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm-rpc/versions-deb-buster @@ -17,7 +17,7 @@ libboost-atomic1.71.0==1.71.0-6~bpo10+1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index 0b10cb15dd8f..05c510ee8a38 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -16,7 +16,7 @@ libpopt0==1.16-12 libprotobuf-dev==3.6.1.3-2 libprotobuf-lite17==3.6.1.3-2 libprotobuf17==3.6.1.3-2 -libsaibcm==4.3.7.0 +libsaibcm==4.3.7.1 libsaimetadata==1.0.0 libsaimetadata-dbg==1.0.0 libsairedis==1.0.0 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster index b1f9412396ea..ec147202d16c 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster @@ -19,7 +19,7 @@ libc6-dev==2.28-10+deb10u1 libcc1-0==8.3.0-6 libdouble-conversion1==3.1.0-3 libdpkg-perl==1.19.8 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libffi-dev==3.2.1-9 libgcc-8-dev==8.3.0-6 libglib2.0-0==2.58.3-2+deb10u4 diff --git a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 index ad85b9e20885..53745a721fa8 100644 --- a/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/docker-syncd-centec/versions-deb-buster-arm64 @@ -2,7 +2,7 @@ dmsetup==2:1.02.155-3 keyutils==1.6-6 libdevmapper1.02.1==2:1.02.155-3 libevent-2.1-6==2.1.8-stable-4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libnfsidmap2==0.25-5.1 libpcap-dev==1.8.1-6+deb10u1 libpcap0.8==1.8.1-6+deb10u1 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index 908dffa79522..caa574c7c326 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -10,7 +10,7 @@ libc6-dev==2.28-10+deb10u1 libdw1==0.176-1.1 libedit2==3.1-20181209-1 libelf1==0.176-1.1 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 diff --git a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf index 46f091f15b72..df1905503e3f 100644 --- a/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf +++ b/files/build/versions/dockers/docker-syncd-mrvl/versions-deb-buster-armhf @@ -2,7 +2,7 @@ dmsetup==2:1.02.155-3 keyutils==1.6-6 libdevmapper1.02.1==2:1.02.155-3 libevent-2.1-6==2.1.8-stable-4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u5 libnfsidmap2==0.25-5.1 libpcap-dev==1.8.1-6+deb10u1 libpcap0.8==1.8.1-6+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 69dd5320aa5b..861bb250dbc1 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -105,7 +105,7 @@ equivs==2.2.0 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 +expat==2.2.6-2+deb10u5 exuberant-ctags==1:5.9~svn20110310-12 fakeroot==1.23-1 file==1:5.35-4+deb10u2 @@ -473,8 +473,8 @@ libevent-dev==2.1.8-stable-4 libevent-extra-2.1-6==2.1.8-stable-4 libevent-openssl-2.1-6==2.1.8-stable-4 libevent-pthreads-2.1-6==2.1.8-stable-4 -libexpat1==2.2.6-2+deb10u4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 +libexpat1-dev==2.2.6-2+deb10u5 libexplain-dev==1.4.D001-8 libexplain51==1.4.D001-8 libexporter-tiny-perl==1.002001-1 @@ -1689,7 +1689,7 @@ tk8.6==8.6.9-2 tk8.6-blt2.5==2.5.3+dfsg-4 ucf==3.0038+nmu1 unattended-upgrades==1.11.2 -unzip==6.0-23+deb10u2 +unzip==6.0-23+deb10u3 uuid-dev==2.33.1-0.1 va-driver-all==2.4.0-1 vdpau-driver-all==1.1.1-10 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 index 28d7f9a6edb3..879016873318 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-arm64 @@ -4,4 +4,4 @@ libdrm-freedreno1==2.4.97-1 libdrm-tegra0==2.4.97-1 libtext-iconv-perl==1.7-5+b6 libxslt1-dev==1.1.32-2.2~deb10u2 -nodejs==14.20.0-deb-1nodesource1 \ No newline at end of file +nodejs==14.20.1-deb-1nodesource1 \ No newline at end of file diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf index ea310c2fd01f..dde2c414f15d 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf @@ -103,7 +103,7 @@ linux-compiler-gcc-8-arm==4.19.249-2 llvm-6.0==1:6.0.1-10 llvm-6.0-dev==1:6.0.1-10 llvm-6.0-runtime==1:6.0.1-10 -nodejs==14.20.0-deb-1nodesource1 +nodejs==14.20.1-deb-1nodesource1 ps2eps==1.68+binaryfree-2 rdfind==1.4.1-1 sassc==3.5.0-1 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index a5de62c75b11..f7f9c0c0b66b 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==0d126c974c11b09f41ec3dc4653a583c8929fa8a +https://chromium.googlesource.com/chromium/tools/depot_tools.git==08bb5c487f80147a236360ea50f4544890530779 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 a5de62c75b11..f7f9c0c0b66b 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==0d126c974c11b09f41ec3dc4653a583c8929fa8a +https://chromium.googlesource.com/chromium/tools/depot_tools.git==08bb5c487f80147a236360ea50f4544890530779 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 53b1422fa2c5..4b457d709155 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -113,8 +113,8 @@ libefiboot1==37-2+deb10u1 libefivar1==37-2+deb10u1 libelf1==0.176-1.1 libestr0==0.1.10-2.1 -libexpat1==2.2.6-2+deb10u4 -libexpat1-dev==2.2.6-2+deb10u4 +libexpat1==2.2.6-2+deb10u5 +libexpat1-dev==2.2.6-2+deb10u5 libfastjson4==0.99.8-2 libffi-dev==3.2.1-9 libfreeipmi17==1.6.3-1.1 @@ -320,7 +320,7 @@ traceroute==1:2.1.0-2 u-boot-tools==2019.01+dfsg-7 ucf==3.0038+nmu1 udev==247.3-6~bpo10+1 -unzip==6.0-23+deb10u2 +unzip==6.0-23+deb10u3 usb.ids==2019.07.27-0+deb10u1 usbutils==1:010-3 vim==2:8.1.0875-5+deb10u2 diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index a2991cc83fe5..ec9fa97dbe24 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -5,6 +5,8 @@ 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 +libexpat1==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u4 libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 @@ -16,4 +18,5 @@ libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-arm64-unsigned==4.19.152-1 pkg-config==0.29-6 tsingma-bsp==1.0 +unzip==6.0-23+deb10u2 zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ 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 26bcacfa7f87..19273d4fdb77 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -5,6 +5,8 @@ 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 +libexpat1==2.2.6-2+deb10u4 +libexpat1-dev==2.2.6-2+deb10u4 libglib2.0-0==2.58.3-2+deb10u3 libicu-dev==63.1-6+deb10u3 libicu63==63.1-6+deb10u3 @@ -16,4 +18,5 @@ libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-armmp==4.19.152-1 mrvlprestera==1.0 pkg-config==0.29-6 +unzip==6.0-23+deb10u2 zlib1g-dev==1:1.2.11.dfsg-1+deb10u1 \ 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 244e9ca0c186..e04877350542 100644 --- a/files/build/versions/host-image/versions-py3 +++ b/files/build/versions/host-image/versions-py3 @@ -2,7 +2,7 @@ azure-common==1.1.28 azure-nspkg==3.0.2 azure-storage==0.36.0 bitarray==1.5.3 -certifi==2022.9.14 +certifi==2022.9.24 cffi==1.15.1 charset-normalizer==2.1.1 click==7.0 From 8ef7fa2e366c12f0d79a72ab836ad91404868957 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Mon, 26 Sep 2022 11:01:12 -0700 Subject: [PATCH 098/106] [202012][sonic-linkmgrd] submodule udpate (#12131) [202012][sonic-linkmgrd] submodule udpate ddbd792 Jing Zhang Tue Sep 13 10:34:32 2022 -0700 [active-standby] update warmboot reconciliation logic (#129) sign-off: Jing Zhang zhangjing@microsoft.com --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index fc5d4240bf85..ddbd7926c20a 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit fc5d4240bf85699bc1f689a08b3d5670a8a7ead2 +Subproject commit ddbd7926c20a007f5c3fb3d8b6758c6664afb0f0 From 89942987884296811165dc350ca0be5b136c5da2 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:32:50 +0800 Subject: [PATCH 099/106] [ci/build]: Upgrade SONiC package versions (#12199) --- .../versions/build/build-sonic-slave-buster/versions-git | 2 +- files/build/versions/default/versions-git | 4 ++-- files/build/versions/dockers/sonic-slave-buster/versions-git | 2 +- files/build/versions/dockers/sonic-slave-stretch/versions-git | 2 +- 4 files changed, 5 insertions(+), 5 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 f31683122293..6b0686b8d84d 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -1,7 +1,7 @@ https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 +https://github.com/jpirko/libteam.git==42a235b5e8e4befe5c35ec60bb34ffffbedddbf3 https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 38069efd21b4..f4f0c2e18e50 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,10 +1,10 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==08bb5c487f80147a236360ea50f4544890530779 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==69a7494bb77dc10bb27076add07b380dbd778592 +https://github.com/jpirko/libteam.git==42a235b5e8e4befe5c35ec60bb34ffffbedddbf3 https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499 https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index f7f9c0c0b66b..42dbdea9d2c9 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==08bb5c487f80147a236360ea50f4544890530779 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 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 f7f9c0c0b66b..42dbdea9d2c9 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==08bb5c487f80147a236360ea50f4544890530779 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file From 109d0e9d3a82448082d61fda4e7bb485fa3ea8ac Mon Sep 17 00:00:00 2001 From: jhli-cisco <93410383+jhli-cisco@users.noreply.github.com> Date: Wed, 28 Sep 2022 14:56:22 -0700 Subject: [PATCH 100/106] Update cisco-8000 submodule to v0.117 (#12211) --- platform/checkout/cisco-8000.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/checkout/cisco-8000.ini b/platform/checkout/cisco-8000.ini index ee13ff9c960b..919f75d112da 100644 --- a/platform/checkout/cisco-8000.ini +++ b/platform/checkout/cisco-8000.ini @@ -1,3 +1,3 @@ [module] repo=git@github.com:Cisco-8000-sonic/platform-cisco-8000.git -ref=202012-v0.116 +ref=202012-v0.117 From 811f8d65be230e22ed824c81e74e827da9736d2c Mon Sep 17 00:00:00 2001 From: Keith Lu <54458415+yenlu-keith@users.noreply.github.com> Date: Thu, 29 Sep 2022 14:54:19 -0700 Subject: [PATCH 101/106] 202012_update_submodule_sonic-sairedis (#12174) Update sonic-sairedis submodule pointer to include the following: 2f92b4493e [syncd] bulk OID remove requires RID (#1130) --- src/sonic-sairedis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-sairedis b/src/sonic-sairedis index 1d3720eb5aa4..2f92b4493ebf 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit 1d3720eb5aa4b13d8eff2ae6e833dc5fd48d3ba7 +Subproject commit 2f92b4493ebf8929dbec3a58d6b400a20cd1b554 From f61c84b09e04a001d60d28c638239052df380b96 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 30 Sep 2022 21:36:39 +0800 Subject: [PATCH 102/106] [ci/build]: Upgrade SONiC package versions (#12243) --- .../versions/build/build-sonic-slave-buster/versions-git | 2 +- files/build/versions/default/versions-git | 4 ++-- .../versions/dockers/docker-sonic-mgmt-framework/versions-py3 | 2 +- .../versions/dockers/sonic-slave-buster/versions-deb-buster | 2 +- files/build/versions/dockers/sonic-slave-buster/versions-git | 2 +- files/build/versions/dockers/sonic-slave-stretch/versions-git | 2 +- 6 files changed, 7 insertions(+), 7 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 6b0686b8d84d..46cf33203b54 100644 --- a/files/build/versions/build/build-sonic-slave-buster/versions-git +++ b/files/build/versions/build/build-sonic-slave-buster/versions-git @@ -1,7 +1,7 @@ https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==42a235b5e8e4befe5c35ec60bb34ffffbedddbf3 +https://github.com/jpirko/libteam.git==c32369829b2b1881e25fab85d74aa0b3ad017dcb https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 https://github.com/sflow/host-sflow==f1ddde6580ae049e53cb9e25822d4c7d98a672cf https://github.com/sflow/sflowtool==5307b19399ffb0a1a873c9d09e78cb5011deaf6f diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index f4f0c2e18e50..54a9577edf0a 100644 --- a/files/build/versions/default/versions-git +++ b/files/build/versions/default/versions-git @@ -1,10 +1,10 @@ -https://chromium.googlesource.com/chromium/tools/depot_tools.git==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f https://github.com/CESNET/libyang.git==0c609c35080f523c9696db48976de8257d174102 https://github.com/daveolson53/libnss-tacplus.git==19008ab68d9d504aa58eb34d5f564755a1613b8b https://github.com/dyninc/OpenBFDD.git==e35f43ad8d2b3f084e96a84c392528a90d05a287 https://github.com/jeroennijhof/pam_tacplus.git==453c7b6fc78eceeaaf39a59b6b87c124628f2fe8 -https://github.com/jpirko/libteam.git==42a235b5e8e4befe5c35ec60bb34ffffbedddbf3 +https://github.com/jpirko/libteam.git==c32369829b2b1881e25fab85d74aa0b3ad017dcb https://github.com/lguohan/gnxi.git==f2b11e45b16ab13485ae14933f30c18ee6336499 https://github.com/Marvell-switching/mrvl-prestera.git==21a100e01b2ab00229da35dd178d9b294c66303f https://github.com/Mellanox/libpsample.git==62bb27d9a49424e45191eee81df7ce0d8c74e774 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 bdb608f43d03..569645923d2c 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -19,7 +19,7 @@ openapi-schema-validator==0.3.4 openapi-spec-validator==0.5.1 pathable==0.4.3 pkgutil_resolve_name==1.3.10 -protobuf==4.21.6 +protobuf==4.21.7 pyrsistent==0.18.1 python-dateutil==2.6.0 requests==2.28.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 861bb250dbc1..b64a1f5910b2 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -1037,7 +1037,7 @@ libsm6==2:1.2.3-1 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 +libsndfile1==1.0.28-6+deb10u2 libsnmp-base==5.7.3+dfsg-5+deb10u3 libsnmp-dev==5.7.3+dfsg-5+deb10u3 libsnmp30==5.7.3+dfsg-5+deb10u3 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 42dbdea9d2c9..81104b4e98fb 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==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 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 42dbdea9d2c9..81104b4e98fb 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==fcf9fc4c36d6a3b244fd95fbceaa7b9030e67362 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 https://github.com/aristanetworks/swi-tools.git==b5f087e4774168bf536360d43c9c509c8f14ad9f \ No newline at end of file From a05d86a0477374f53ed89652cce9b6dcf2d09dce Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Sun, 2 Oct 2022 18:38:46 +0800 Subject: [PATCH 103/106] [ci/build]: Upgrade SONiC package versions (#12252) --- files/build/versions/default/versions-git | 2 +- .../versions-deb-buster | 2 +- .../docker-fpm-frr/versions-deb-buster | 4 ++-- .../dockers/docker-lldp/versions-deb-buster | 4 ++-- .../docker-orchagent/versions-deb-buster | 2 +- .../versions-deb-buster | 2 +- .../dockers/docker-snmp/versions-deb-buster | 6 ++--- .../versions-deb-buster | 2 +- .../docker-sonic-mgmt-framework/versions-py3 | 2 +- .../docker-sonic-vs/versions-deb-buster | 2 +- .../docker-syncd-bfn/versions-deb-buster | 2 +- .../docker-syncd-brcm/versions-deb-buster | 2 +- .../versions-deb-buster | 2 +- .../docker-syncd-mlnx/versions-deb-buster | 2 +- .../sonic-slave-buster/versions-deb-buster | 22 +++++++++---------- .../versions-deb-buster-armhf | 2 +- .../dockers/sonic-slave-buster/versions-git | 2 +- .../dockers/sonic-slave-stretch/versions-git | 2 +- .../versions/host-image/versions-deb-buster | 2 +- .../host-image/versions-deb-buster-arm64 | 1 + .../host-image/versions-deb-buster-armhf | 1 + 21 files changed, 35 insertions(+), 33 deletions(-) diff --git a/files/build/versions/default/versions-git b/files/build/versions/default/versions-git index 54a9577edf0a..b62554876c65 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==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 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-config-engine-buster/versions-deb-buster b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster index e0a50ff3d52d..0520eec0c0a7 100644 --- a/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster +++ b/files/build/versions/dockers/docker-config-engine-buster/versions-deb-buster @@ -43,7 +43,7 @@ libstdc++-8-dev==8.3.0-6 libswsscommon==1.0.0 libtsan0==8.3.0-6 libubsan1==8.3.0-6 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 patch==2.7.6-3+deb10u1 python3-dev==3.7.3-1 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 8a12039c1772..c52cfd242a2f 100644 --- a/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster +++ b/files/build/versions/dockers/docker-fpm-frr/versions-deb-buster @@ -14,7 +14,7 @@ libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libipt2==2.0-2 libjson-c3==0.12.1+ds-2+deb10u1 -libmariadb3==1:10.3.36-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 @@ -26,7 +26,7 @@ libunwind8==1.2.1-10~deb10u1 libyang1==1.0.184-2 libyang1-dbgsym==1.0.184-2 logrotate==3.14.0-4 -mariadb-common==1:10.3.36-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sensible-utils==0.0.12 diff --git a/files/build/versions/dockers/docker-lldp/versions-deb-buster b/files/build/versions/dockers/docker-lldp/versions-deb-buster index 1d6b810faffb..e3144dc4e7b0 100644 --- a/files/build/versions/dockers/docker-lldp/versions-deb-buster +++ b/files/build/versions/dockers/docker-lldp/versions-deb-buster @@ -9,7 +9,7 @@ libglib2.0-0==2.58.3-2+deb10u4 libgpm2==1.20.7-5 libicu63==63.1-6+deb10u3 libipt2==2.0-2 -libmariadb3==1:10.3.36-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libpci3==1:3.5.2-1 libpopt0==1.16-12 libsensors-config==1:3.5.0-3 @@ -21,7 +21,7 @@ libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 lldpd==1.0.4-1 lldpd-dbgsym==1.0.4-1 -mariadb-common==1:10.3.36-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 sshpass==1.06-1 diff --git a/files/build/versions/dockers/docker-orchagent/versions-deb-buster b/files/build/versions/dockers/docker-orchagent/versions-deb-buster index 45d321f9bf85..6c65ba31fe0d 100644 --- a/files/build/versions/dockers/docker-orchagent/versions-deb-buster +++ b/files/build/versions/dockers/docker-orchagent/versions-deb-buster @@ -51,7 +51,7 @@ libswsscommon-dbg==1.0.0 libtsan0==8.3.0-6 libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 ndisc6==1.0.4-1 ndppd==0.2.5-4+deb10u1 diff --git a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster index fed30485b7c8..9484107a3412 100644 --- a/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster +++ b/files/build/versions/dockers/docker-platform-monitor/versions-deb-buster @@ -96,7 +96,7 @@ libxdmcp6==1:1.1.2-3 libxext6==2:1.3.3-1+b2 libxml2==2.9.4+dfsg1-7+deb10u4 libxrender1==1:0.9.10-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 lm-sensors==1:3.5.0-3 lm-sensors-dbgsym==1:3.5.0-3 make==4.2.1-1.2 diff --git a/files/build/versions/dockers/docker-snmp/versions-deb-buster b/files/build/versions/dockers/docker-snmp/versions-deb-buster index 1a213af4add3..98c08afb5d8e 100644 --- a/files/build/versions/dockers/docker-snmp/versions-deb-buster +++ b/files/build/versions/dockers/docker-snmp/versions-deb-buster @@ -30,7 +30,7 @@ libipt2==2.0-2 libisl19==0.20-2 libitm1==8.3.0-6 liblsan0==8.3.0-6 -libmariadb3==1:10.3.36-0+deb10u1 +libmariadb3==1:10.3.36-0+deb10u2 libmpc3==1.1.0-1 libmpfr6==4.0.2-1 libmpx2==8.3.0-6 @@ -47,10 +47,10 @@ libsnmp30-dbg==5.7.3+dfsg-5 libtsan0==8.3.0-6 libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 locales==2.28-10+deb10u1 make==4.2.1-1.2 -mariadb-common==1:10.3.36-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 mysql-common==5.8+1.0.5 openssh-client==1:7.9p1-10+deb10u2 python3-dev==3.7.3-1 diff --git a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster index ec3a89f5b4a1..9c994335f84e 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-deb-buster @@ -50,7 +50,7 @@ libubsan1==8.3.0-6 libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 libyang==1.0.73 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 openssh-client==1:7.9p1-10+deb10u2 python==2.7.16-1 python-dev==2.7.16-1 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 569645923d2c..9e8bf17299ea 100644 --- a/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 +++ b/files/build/versions/dockers/docker-sonic-mgmt-framework/versions-py3 @@ -8,7 +8,7 @@ flask==2.2.2 grpcio==1.49.1 grpcio-tools==1.20.0 idna==3.4 -importlib-metadata==4.12.0 +importlib-metadata==5.0.0 importlib-resources==5.9.0 inflection==0.5.1 itsdangerous==2.1.2 diff --git a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster index db7363dc1553..cacf7d27d4a2 100644 --- a/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster +++ b/files/build/versions/dockers/docker-sonic-vs/versions-deb-buster @@ -106,7 +106,7 @@ libunwind8==1.2.1-10~deb10u1 libyang==1.0.73 libyang-cpp==1.0.73 libyang1==1.0.184-2 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 logrotate==3.14.0-4 make==4.2.1-1.2 ndisc6==1.0.4-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 77895b42f41c..dd6d71a0dca0 100644 --- a/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-bfn/versions-deb-buster @@ -19,5 +19,5 @@ libunwind8==1.2.1-10~deb10u1 libusb-1.0-0==2:1.0.22-2 libusb-1.0-0-dev==2:1.0.22-2 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 syncd==1.0.0 \ No newline at end of file diff --git a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster index 05c510ee8a38..514672d16566 100644 --- a/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-brcm/versions-deb-buster @@ -25,7 +25,7 @@ libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libyaml-0-2==0.2.1-1 libyaml-dev==0.2.1-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 openssh-client==1:7.9p1-10+deb10u2 sshpass==1.06-1 strace==4.26-0.2 diff --git a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster index ec147202d16c..b7b067a23dbf 100644 --- a/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-centec-rpc/versions-deb-buster @@ -54,7 +54,7 @@ libtsan0==8.3.0-6 libubsan1==8.3.0-6 libuv1==1.24.1-1+deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 make==4.2.1-1.2 patch==2.7.6-3+deb10u1 python==2.7.16-1 diff --git a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster index caa574c7c326..ad0cb74fea4d 100644 --- a/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster +++ b/files/build/versions/dockers/docker-syncd-mlnx/versions-deb-buster @@ -31,7 +31,7 @@ libsairedis-dbg==1.0.0 libswsscommon-dbg==1.0.0 libunwind8==1.2.1-10~deb10u1 libxml2==2.9.4+dfsg1-7+deb10u4 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 mft==4.18.0-106 mlnx-sai==1.mlnx.SAIRel1.22.0.0 openssh-client==1:7.9p1-10+deb10u2 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 b64a1f5910b2..678ee6c0bfdf 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster @@ -598,7 +598,7 @@ libhtml-parser-perl==3.72-3+b3 libhtml-tagset-perl==3.20-3 libhtml-tree-perl==5.07-2 libhttp-cookies-perl==6.04-1 -libhttp-daemon-perl==6.01-3 +libhttp-daemon-perl==6.01-3+deb10u1 libhttp-date-perl==6.02-1 libhttp-message-perl==6.18-1 libhttp-negotiate-perl==6.01-1 @@ -739,9 +739,9 @@ libmagickcore-6.q16-6-extra==8:6.9.10.23+dfsg-2.1+deb10u1 libmagickwand-6.q16-6==8:6.9.10.23+dfsg-2.1+deb10u1 libmail-sendmail-perl==0.80-1 libmailtools-perl==2.18-1 -libmariadb-dev==1:10.3.36-0+deb10u1 -libmariadb-dev-compat==1:10.3.36-0+deb10u1 -libmariadb3==1:10.3.36-0+deb10u1 +libmariadb-dev==1:10.3.36-0+deb10u2 +libmariadb-dev-compat==1:10.3.36-0+deb10u2 +libmariadb3==1:10.3.36-0+deb10u2 libmaven-archiver-java==3.2.0-2 libmaven-clean-plugin-java==3.1.0-1 libmaven-common-artifact-filters-java==3.0.1-3 @@ -1316,12 +1316,12 @@ libzvbi0==0.2.35-16 libzzip-0-13==0.13.62-3.2+deb10u1 licensecheck==3.0.31-3 lintian==2.15.0 -linux-compiler-gcc-8-x86==4.19.249-2 -linux-headers-4.19.0-21-amd64==4.19.249-2 -linux-headers-4.19.0-21-common==4.19.249-2 -linux-headers-amd64==4.19+105+deb10u16 -linux-kbuild-4.19==4.19.249-2 -linux-libc-dev==4.19.249-2 +linux-compiler-gcc-8-x86==4.19.260-1 +linux-headers-4.19.0-22-amd64==4.19.260-1 +linux-headers-4.19.0-22-common==4.19.260-1 +linux-headers-amd64==4.19+105+deb10u17 +linux-kbuild-4.19==4.19.260-1 +linux-libc-dev==4.19.260-1 linuxdoc-tools==0.9.73-2 llvm-7==1:7.0.1-8+deb10u2 llvm-7-dev==1:7.0.1-8+deb10u2 @@ -1343,7 +1343,7 @@ make==4.2.1-1.2 man-db==2.8.5-2 manpages==4.16-2 manpages-dev==4.16-2 -mariadb-common==1:10.3.36-0+deb10u1 +mariadb-common==1:10.3.36-0+deb10u2 maven==3.6.0-1 maven-debian-helper==2.3.2 maven-repo-helper==1.9.3 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf index dde2c414f15d..1922ccd3534b 100644 --- a/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf +++ b/files/build/versions/dockers/sonic-slave-buster/versions-deb-buster-armhf @@ -99,7 +99,7 @@ libunicode-linebreak-perl==0.0.20190101-1 libxapian-dev==1.4.11-1 libxslt1-dev==1.1.32-2.2~deb10u2 libyaml-tiny-perl==1.73-1 -linux-compiler-gcc-8-arm==4.19.249-2 +linux-compiler-gcc-8-arm==4.19.260-1 llvm-6.0==1:6.0.1-10 llvm-6.0-dev==1:6.0.1-10 llvm-6.0-runtime==1:6.0.1-10 diff --git a/files/build/versions/dockers/sonic-slave-buster/versions-git b/files/build/versions/dockers/sonic-slave-buster/versions-git index 81104b4e98fb..9b6ab98c48b2 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==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 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 81104b4e98fb..9b6ab98c48b2 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==e3ed6a8e015bada7f2708d990b5e8c4d01bcf047 +https://chromium.googlesource.com/chromium/tools/depot_tools.git==a724859f7a9b3531c0373d86886a42314e772532 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 4b457d709155..54001683418d 100644 --- a/files/build/versions/host-image/versions-deb-buster +++ b/files/build/versions/host-image/versions-deb-buster @@ -227,7 +227,7 @@ libyang-cpp==1.0.73 libzstd1==1.4.4+dfsg-3~bpo10+1 linux-base==4.6 linux-image-4.19.0-12-2-amd64-unsigned==4.19.152-1 -linux-libc-dev==4.19.249-2 +linux-libc-dev==4.19.260-1 locales==2.28-10+deb10u1 logrotate==3.14.0-4 lsb-base==10.2019051400 diff --git a/files/build/versions/host-image/versions-deb-buster-arm64 b/files/build/versions/host-image/versions-deb-buster-arm64 index ec9fa97dbe24..597a612fb166 100644 --- a/files/build/versions/host-image/versions-deb-buster-arm64 +++ b/files/build/versions/host-image/versions-deb-buster-arm64 @@ -16,6 +16,7 @@ libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-arm64-unsigned==4.19.152-1 +linux-libc-dev==4.19.249-2 pkg-config==0.29-6 tsingma-bsp==1.0 unzip==6.0-23+deb10u2 diff --git a/files/build/versions/host-image/versions-deb-buster-armhf b/files/build/versions/host-image/versions-deb-buster-armhf index 19273d4fdb77..4ffac782fd19 100644 --- a/files/build/versions/host-image/versions-deb-buster-armhf +++ b/files/build/versions/host-image/versions-deb-buster-armhf @@ -16,6 +16,7 @@ libxml2-dev==2.9.4+dfsg1-7+deb10u4 libxslt1-dev==1.1.32-2.2~deb10u1 libxslt1.1==1.1.32-2.2~deb10u1 linux-image-4.19.0-12-2-armmp==4.19.152-1 +linux-libc-dev==4.19.249-2 mrvlprestera==1.0 pkg-config==0.29-6 unzip==6.0-23+deb10u2 From 893391f76e14c436e034560cfab22f5df37e86bb Mon Sep 17 00:00:00 2001 From: Longxiang Lyu <35479537+lolyu@users.noreply.github.com> Date: Thu, 1 Sep 2022 04:10:22 +0800 Subject: [PATCH 104/106] [mux] Exit to write `standby` state to `active-active` ports (#11821) [mux] Exit to write standby state to `active-active` ports Signed-off-by: Longxiang Lyu --- files/build_templates/mux.service.j2 | 2 +- files/scripts/write_standby.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/files/build_templates/mux.service.j2 b/files/build_templates/mux.service.j2 index abc04ab30d18..ee1f8ce75389 100644 --- a/files/build_templates/mux.service.j2 +++ b/files/build_templates/mux.service.j2 @@ -14,7 +14,7 @@ ExecStartPre=/usr/local/bin/mark_dhcp_packet.py ExecStartPre=/usr/bin/{{docker_container_name}}.sh start ExecStart=/usr/bin/{{docker_container_name}}.sh wait ExecStop=/usr/bin/{{docker_container_name}}.sh stop -ExecStopPost=/usr/local/bin/write_standby.py +ExecStopPost=/usr/local/bin/write_standby.py --shutdown mux Restart=always RestartSec=30 diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py index 86d50737b1c5..85b6ee8b04e8 100755 --- a/files/scripts/write_standby.py +++ b/files/scripts/write_standby.py @@ -178,6 +178,12 @@ def apply_mux_config(self): 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') + parser.add_argument('--shutdown', help='write mux state after shutdown other services, supported: mux', + type=str, required=False, choices=['mux']) args = parser.parse_args() - mux_writer = MuxStateWriter(activeactive=args.active_active, activestandby=args.active_standby) + active_active_state = args.active_active + active_standby_state = args.active_standby + if args.shutdown == 'mux': + active_active_state = "standby" + mux_writer = MuxStateWriter(activeactive=active_active_state, activestandby=active_standby_state) mux_writer.apply_mux_config() From 64ce6696bb39fac16c64ec48ebb471b86daaa5e6 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Fri, 2 Sep 2022 13:50:42 -0700 Subject: [PATCH 105/106] [mux] skip mux operations during warm shutdown (#11937) * [mux] skip mux operations during warm shutdown - Enhance write_standby.py script to skip actions during warm shutdown. - Expand the support to BGP service. - MuX support was added by a previous PR. - don't skip action during warm recovery Signed-off-by: Ying Xie --- .../per_namespace/bgp.service.j2 | 2 +- files/scripts/write_standby.py | 24 +++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/files/build_templates/per_namespace/bgp.service.j2 b/files/build_templates/per_namespace/bgp.service.j2 index 03fb6285fb43..e9909f037103 100644 --- a/files/build_templates/per_namespace/bgp.service.j2 +++ b/files/build_templates/per_namespace/bgp.service.j2 @@ -15,7 +15,7 @@ User={{ sonicadmin_user }} ExecStartPre=/usr/local/bin/{{docker_container_name}}.sh start{% if multi_instance == 'true' %} %i{% endif %} ExecStart=/usr/local/bin/{{docker_container_name}}.sh wait{% if multi_instance == 'true' %} %i{% endif %} ExecStop=/usr/local/bin/{{docker_container_name}}.sh stop{% if multi_instance == 'true' %} %i{% endif %} -ExecStopPost=/usr/local/bin/write_standby.py +ExecStopPost=/usr/local/bin/write_standby.py --shutdown bgp Restart=always RestartSec=30 diff --git a/files/scripts/write_standby.py b/files/scripts/write_standby.py index 85b6ee8b04e8..13c5b17ea64e 100755 --- a/files/scripts/write_standby.py +++ b/files/scripts/write_standby.py @@ -20,13 +20,15 @@ class MuxStateWriter(object): Class used to write standby mux state to APP DB """ - def __init__(self, activeactive, activestandby): + def __init__(self, activeactive, activestandby, shutdown_module): 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 + self.shutdown_module = shutdown_module + self.is_shutdwon = (self.shutdown_module != None) @property def config_db(self): @@ -97,7 +99,15 @@ def is_warmrestart(self): tbl = Table(self.state_db, 'WARM_RESTART_ENABLE_TABLE') (status, value) = tbl.hget('system', 'enable') - return status and value == 'true' + if status and value == 'true': + return True + + if self.shutdown_module: + (status, value) = tbl.hget(self.shutdown_module, 'enable') + if status and value == 'true': + return True + + return False def get_all_mux_intfs_modes(self): """ @@ -153,7 +163,7 @@ def apply_mux_config(self): # If not running on a dual ToR system, take no action return - if self.is_warmrestart: + if self.is_warmrestart and self.is_shutdwon: # If in warmrestart context, take no action logger.log_warning("Skip setting mux state due to ongoing warmrestart.") return @@ -178,12 +188,12 @@ def apply_mux_config(self): 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') - parser.add_argument('--shutdown', help='write mux state after shutdown other services, supported: mux', - type=str, required=False, choices=['mux']) + parser.add_argument('--shutdown', help='write mux state after shutdown other services, supported: mux, bgp', + type=str, required=False, choices=['mux', 'bgp'], default=None) args = parser.parse_args() active_active_state = args.active_active active_standby_state = args.active_standby - if args.shutdown == 'mux': + if args.shutdown in ['mux', 'bgp']: active_active_state = "standby" - mux_writer = MuxStateWriter(activeactive=active_active_state, activestandby=active_standby_state) + mux_writer = MuxStateWriter(activeactive=active_active_state, activestandby=active_standby_state, shutdown_module=args.shutdown) mux_writer.apply_mux_config() From a16843a67c1eda579ca9d6a299fe33bdc8a0dff8 Mon Sep 17 00:00:00 2001 From: Xichen96 Date: Thu, 22 Sep 2022 13:57:52 +0800 Subject: [PATCH 106/106] Enable swap for haliburton device. (#11746) Signed-off-by: Xichen Lin Signed-off-by: Xichen Lin --- .../debian/platform-modules-haliburton.init | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init index 07a6542109b5..3f6358bf4ab4 100644 --- a/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init +++ b/platform/broadcom/sonic-platform-modules-cel/debian/platform-modules-haliburton.init @@ -11,6 +11,26 @@ # Short-Description: Setup Haliburton board. ### END INIT INFO +setup_swap () { + SWAPFILE=/host/myswapfile + + if [ ! -f $SWAPFILE ]; then + availspace=`df -h --output=avail /host | sed '1d;s/\s//g;s/[^0-9].*//g'` + diff=$(( availspace - 2*$1 )) + if [ $diff -gt 0 ]; then + fallocate -l ${1}G $SWAPFILE + chmod 600 $SWAPFILE + echo "swap file created successfully" + else + echo "not enough disk space to turn on swap." + return + fi + fi + mkswap $SWAPFILE + swapon $SWAPFILE + echo "swap on successfully" +} + case "$1" in start) echo -n "Setting up board... " @@ -74,6 +94,8 @@ start) /bin/sh /usr/local/bin/platform_api_mgnt.sh init + setup_swap 2 + echo "done." ;;