From 526cd92f5314ae1ec6fa41e6582319478df61b96 Mon Sep 17 00:00:00 2001 From: Ye Jianquan Date: Thu, 28 Jul 2022 23:46:24 -0700 Subject: [PATCH 01/16] Install celery in sonic-mgmt image (#11554) Install celery in sonic-mgmt image --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index 06267ccaf6a3..42aaa3525a64 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -76,6 +76,8 @@ RUN pip install cffi==1.10.0 \ retry \ thrift==0.11.0 \ allure-pytest==2.8.22 \ + celery[redis]==4.4.7 \ + msrest==0.6.21 \ && git clone https://github.com/p4lang/scapy-vxlan.git \ && cd scapy-vxlan \ && python setup.py install \ @@ -246,7 +248,9 @@ RUN python3 -m pip install setuptools-rust \ retry \ thrift==0.11.0 \ ptf \ - scapy==2.4.5 + scapy==2.4.5 \ + celery[redis]==4.4.7 \ + msrest==0.6.21 # Deactivating a virtualenv. ENV PATH="$BACKUP_OF_PATH" From 8d37dd7f5ee7f10cc380f39da38fc279dca07b44 Mon Sep 17 00:00:00 2001 From: StormLiangMS <89824293+StormLiangMS@users.noreply.github.com> Date: Fri, 29 Jul 2022 23:33:09 +0800 Subject: [PATCH 02/16] [bgpcfgd] improve the log when delete a loopback interface (#11152) Why I did it The bgpcfgd doesn't support deletion of 'zebra set src', if an interface is deleted, the bgpcfgd will drop a warning message. In current implementation, we only care about the loopback0 interface but not others. To improve the log print to have the key info, which will give the name of the deleted interface. We can ignore it if it is not the loopback0 interface. The application layer should be aware of that update and deletion is not supported, delete or update with a new address of loopback0 could cause issue, this log can give enough info to root cause the issue. How I did it How to verify it --- src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py | 2 +- src/sonic-bgpcfgd/tests/test_setsrc.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py b/src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py index d1de585b0520..903760c9375c 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_setsrc.py @@ -64,4 +64,4 @@ def set_handler(self, key, data): def del_handler(self, key): """ Implementation of 'DEL' command for this class """ self.directory.remove(self.db_name, self.table_name, key) - log_warn("Delete command is not supported for 'zebra set src' templates") \ No newline at end of file + log_warn("Delete key '%s' is not supported for 'zebra set src' templates" % str(key)) \ No newline at end of file diff --git a/src/sonic-bgpcfgd/tests/test_setsrc.py b/src/sonic-bgpcfgd/tests/test_setsrc.py index 5d1a81908837..4de72102b613 100644 --- a/src/sonic-bgpcfgd/tests/test_setsrc.py +++ b/src/sonic-bgpcfgd/tests/test_setsrc.py @@ -58,5 +58,6 @@ def test_set_handler_invalid_ip(mocked_log_err): @patch('bgpcfgd.managers_setsrc.log_warn') def test_del_handler(mocked_log_warn): m = constructor() - m.del_handler("Loopback0|10.1.0.32/32") - mocked_log_warn.assert_called_with("Delete command is not supported for 'zebra set src' templates") + del_key = "Loopback0|10.1.0.32/32" + m.del_handler(del_key) + mocked_log_warn.assert_called_with("Delete key '%s' is not supported for 'zebra set src' templates" % del_key) From 8f6b568acf414b16438ffbb9da5d7eb34c528597 Mon Sep 17 00:00:00 2001 From: Nikola Dancejic <26731235+Ndancejic@users.noreply.github.com> Date: Fri, 29 Jul 2022 16:22:20 -0700 Subject: [PATCH 03/16] [swss] Adding bgp container as dependent of swss (#11000) 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. How I did it: Added bgp to DEPENDENT 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 c7912fefefdb..93a3c3dcf7d8 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -9,7 +9,7 @@ LOCKFILE="/tmp/swss-syncd-lock$DEV" NAMESPACE_PREFIX="asic" ETC_SONIC_PATH="/etc/sonic/" -DEPENDENT="radv" +DEPENDENT="radv bgp" MULTI_INST_DEPENDENT="teamd" . /usr/local/bin/asic_status.sh From d509587d139dcc628fe965b03982b445bfb6cb83 Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Sat, 30 Jul 2022 10:11:02 +0800 Subject: [PATCH 04/16] [submodule]: Update sonic-wpa-supplicant (#11539) ``` 88d1eaea9 [mka]: Fix rekey of PN based cannot triggered in XPN cipher (#57) ``` Signed-off-by: Ze Gan --- src/wpasupplicant/sonic-wpa-supplicant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wpasupplicant/sonic-wpa-supplicant b/src/wpasupplicant/sonic-wpa-supplicant index 3f43852b8ccd..88d1eaea944c 160000 --- a/src/wpasupplicant/sonic-wpa-supplicant +++ b/src/wpasupplicant/sonic-wpa-supplicant @@ -1 +1 @@ -Subproject commit 3f43852b8ccd5d2a0877c86b82d227893e4566d4 +Subproject commit 88d1eaea944c5ea90d9d7796dc10abc80823ed93 From cdd27861177e398bd9ea1139a2bc85656364fef4 Mon Sep 17 00:00:00 2001 From: tjchadaga <85581939+tjchadaga@users.noreply.github.com> Date: Sat, 30 Jul 2022 22:16:58 -0700 Subject: [PATCH 05/16] Fix for TSA error logging on multi-asic (#11519) --- dockers/docker-fpm-frr/base_image_files/TS | 34 ++++++++++++++----- dockers/docker-fpm-frr/base_image_files/TSA | 25 +++++--------- dockers/docker-fpm-frr/base_image_files/TSB | 20 ++++------- src/sonic-bgpcfgd/tests/test_device_global.py | 8 ++++- 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/dockers/docker-fpm-frr/base_image_files/TS b/dockers/docker-fpm-frr/base_image_files/TS index 799bf9ded700..e0e7ce0ebabf 100755 --- a/dockers/docker-fpm-frr/base_image_files/TS +++ b/dockers/docker-fpm-frr/base_image_files/TS @@ -5,12 +5,16 @@ PLATFORM=${PLATFORM:-`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`} -if [[ $1 == "TSA" ]]; then +if [[ $1 == "TSA" ]]; then TSA_STATE_UPDATE='{"BGP_DEVICE_GLOBAL":{"STATE":{"tsa_enabled": "true"}}}' log_msg='System Mode: Normal -> Maintenance' + err_msg='System is already in Maintenance' + desired_tsa_state=true elif [[ $1 == "TSB" ]]; then TSA_STATE_UPDATE='{"BGP_DEVICE_GLOBAL":{"STATE":{"tsa_enabled": "false"}}}' log_msg='System Mode: Maintenance -> Normal' + err_msg='System is already in Normal mode' + desired_tsa_state=false fi # Parse the device specific asic conf file, if it exists @@ -28,10 +32,16 @@ if [[ ($NUM_ASIC -gt 1) ]]; then if [ $sub_role == 'FrontEnd' ] then echo -e "BGP"$asic" : \c" - if [[ -n "$TSA_STATE_UPDATE" ]]; then - sonic-cfggen -a "$TSA_STATE_UPDATE" -w -n $NAMESPACE_PREFIX$asic - logger -t $1 -p user.info "BGP$asic: $log_msg" - echo "$log_msg" + if [[ -n "$TSA_STATE_UPDATE" ]]; then + current_tsa_state="$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled -n $NAMESPACE_PREFIX$asic)" + if [[ $current_tsa_state == $desired_tsa_state ]]; then + echo "$err_msg" + logger -t $1 -p user.info "$err_msg" + else + sonic-cfggen -a "$TSA_STATE_UPDATE" -w -n $NAMESPACE_PREFIX$asic + logger -t $1 -p user.info "$log_msg" + echo "$log_msg" + fi else # If TSC is executed, invoke FRR script to check installed route-maps docker exec -i bgp$asic /usr/bin/$1 @@ -40,10 +50,16 @@ if [[ ($NUM_ASIC -gt 1) ]]; then asic=$[$asic+1] done else - if [[ -n "$TSA_STATE_UPDATE" ]]; then - sonic-cfggen -a "$TSA_STATE_UPDATE" -w - logger -t $1 -p user.info "$log_msg" - echo "$log_msg" + if [[ -n "$TSA_STATE_UPDATE" ]]; then + current_tsa_state="$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" + if [[ $current_tsa_state == $desired_tsa_state ]]; then + echo "$err_msg" + logger -t $1 -p user.info "$err_msg" + else + sonic-cfggen -a "$TSA_STATE_UPDATE" -w + logger -t $1 -p user.info "$log_msg" + echo "$log_msg" + fi else # If TSC is executed, invoke FRR script to check installed route-maps docker exec -i bgp /usr/bin/$1 diff --git a/dockers/docker-fpm-frr/base_image_files/TSA b/dockers/docker-fpm-frr/base_image_files/TSA index 8c37525ef0a9..eba79c6ae87b 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSA +++ b/dockers/docker-fpm-frr/base_image_files/TSA @@ -1,20 +1,13 @@ #!/bin/bash - -if [[ "$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" == "true" ]]; then - echo "System is already in Maintenance" - logger -t TSA -p user.info "System is already in Maintenance" -else - # toggle the mux to standby if dualtor and any mux active - if - [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] && - [[ $(show mux status | grep active | wc -l) > 0 ]]; - then - logger -t TSA -p user.info "Toggle all mux mode to standby" - sudo config mux mode standby all - fi - - /usr/bin/TS TSA - echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload" +# toggle the mux to standby if dualtor and any mux active +if +[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] && +[[ $(show mux status | grep active | wc -l) > 0 ]]; +then + logger -t TSA -p user.info "Toggle all mux mode to standby" + sudo config mux mode standby all fi +/usr/bin/TS TSA +echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload" diff --git a/dockers/docker-fpm-frr/base_image_files/TSB b/dockers/docker-fpm-frr/base_image_files/TSB index 5f8d90160fcb..1343a6349f9d 100755 --- a/dockers/docker-fpm-frr/base_image_files/TSB +++ b/dockers/docker-fpm-frr/base_image_files/TSB @@ -1,17 +1,11 @@ #!/bin/bash -if [[ "$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" == "false" ]]; then - echo "System is already in Normal mode" - logger -t TSB -p user.info "System is already in Normal mode" -else - # toggle the mux to auto if dualtor - if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]]; - then - logger -t TSB -p user.info "Toggle all mux mode to auto" - sudo config mux mode auto all - fi - - /usr/bin/TS TSB - echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload" +# toggle the mux to auto if dualtor +if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]]; +then + logger -t TSB -p user.info "Toggle all mux mode to auto" + sudo config mux mode auto all fi +/usr/bin/TS TSB +echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload" diff --git a/src/sonic-bgpcfgd/tests/test_device_global.py b/src/sonic-bgpcfgd/tests/test_device_global.py index eae1ff424e1f..ad79158aaa06 100644 --- a/src/sonic-bgpcfgd/tests/test_device_global.py +++ b/src/sonic-bgpcfgd/tests/test_device_global.py @@ -7,9 +7,15 @@ from .util import load_constants import bgpcfgd.managers_device_global from swsscommon import swsscommon +from copy import deepcopy TEMPLATE_PATH = os.path.abspath('../../dockers/docker-fpm-frr/frr') BASE_PATH = os.path.abspath('../sonic-bgpcfgd/tests/data/general/peer-group.conf/') +global_constants = { + "bgp": { + "traffic_shift_community" :"12345:12345" + } +} def constructor(): cfg_mgr = MagicMock() @@ -32,7 +38,7 @@ def get_config(): cfg_mgr.push = push cfg_mgr.get_config = get_config - constants = load_constants()['constants'] + constants = deepcopy(global_constants) common_objs = { 'directory': Directory(), 'cfg_mgr': cfg_mgr, From de4755be9aa39153878299832fc0a147e5559c5b Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Mon, 1 Aug 2022 09:27:36 +0800 Subject: [PATCH 06/16] Support queue 7 in dual ToR scenario (#11571) 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 e960447574c5..f0b0e3993bd4 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" : "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" : "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" : "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 57be84be1fb1..d036b2d723bb 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 @@ -996,28 +996,28 @@ "Ethernet84|0-2": { "profile" : "q_lossy_profile" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "q_lossy_profile" }, "Ethernet136|0-1": { @@ -1537,112 +1537,112 @@ "Ethernet236|0-2": { "profile" : "q_lossy_profile" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "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 a545415612d5..43ec8bd4c6e8 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 @@ -772,28 +772,28 @@ "Ethernet84|0-2": { "profile" : "q_lossy_profile" }, - "Ethernet0|5-6": { + "Ethernet0|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet4|5-6": { + "Ethernet4|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet16|5-6": { + "Ethernet16|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet20|5-6": { + "Ethernet20|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet64|5-6": { + "Ethernet64|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet68|5-6": { + "Ethernet68|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet80|5-6": { + "Ethernet80|5-7": { "profile" : "q_lossy_profile" }, - "Ethernet84|5-6": { + "Ethernet84|5-7": { "profile" : "q_lossy_profile" }, "Ethernet136|0-1": { @@ -1313,112 +1313,112 @@ "Ethernet236|0-2": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet8|5-6": { + "Ethernet8|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet12|5-6": { + "Ethernet12|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet24|5-6": { + "Ethernet24|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet28|5-6": { + "Ethernet28|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet32|5-6": { + "Ethernet32|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet36|5-6": { + "Ethernet36|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet40|5-6": { + "Ethernet40|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet44|5-6": { + "Ethernet44|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet48|5-6": { + "Ethernet48|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet52|5-6": { + "Ethernet52|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet56|5-6": { + "Ethernet56|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet60|5-6": { + "Ethernet60|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet72|5-6": { + "Ethernet72|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet76|5-6": { + "Ethernet76|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet88|5-6": { + "Ethernet88|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet92|5-6": { + "Ethernet92|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet96|5-6": { + "Ethernet96|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet100|5-6": { + "Ethernet100|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet104|5-6": { + "Ethernet104|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet108|5-6": { + "Ethernet108|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet112|5-6": { + "Ethernet112|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet116|5-6": { + "Ethernet116|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet120|5-6": { + "Ethernet120|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet124|5-6": { + "Ethernet124|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet128|5-6": { + "Ethernet128|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet132|5-6": { + "Ethernet132|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet140|5-6": { + "Ethernet140|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet160|5-6": { + "Ethernet160|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet164|5-6": { + "Ethernet164|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet172|5-6": { + "Ethernet172|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet192|5-6": { + "Ethernet192|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet196|5-6": { + "Ethernet196|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet204|5-6": { + "Ethernet204|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet224|5-6": { + "Ethernet224|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet228|5-6": { + "Ethernet228|5-7": { "profile" : "egress_lossy_zero_profile" }, - "Ethernet236|5-6": { + "Ethernet236|5-7": { "profile" : "egress_lossy_zero_profile" } } From dc799356aad7a1856219705e93698030fea8bd0a Mon Sep 17 00:00:00 2001 From: bingwang-ms <66248323+bingwang-ms@users.noreply.github.com> Date: Mon, 1 Aug 2022 09:35:34 +0800 Subject: [PATCH 07/16] Support different `DSCP_TO_TC_MAP` for T1 in dualtor deployment (#11569) * Support different DSCP_TO_TC_MAP for T1 in dualtor deployment --- .../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 73c1c1a9b30e..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" : "ingress_lossy_profile" - }, - "{{ port }}|6": { - "profile" : "ingress_lossy_profile" - }, -{% endif %} - "{{ port }}|0": { - "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 118dba43177a..08b1395d245e 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 118dba43177a..b2766366b0d7 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 0a72e325824a..21d730c74b2a 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -172,10 +172,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 1ce8a99e4fb7..702076249ac6 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" : "ingress_lossy_profile" }, - "Ethernet0|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet0|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet4|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet4|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet4|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet144|0": { "profile" : "ingress_lossy_profile" }, @@ -136,21 +124,9 @@ "Ethernet16|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet16|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet16|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet20|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet20|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet20|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet152|0": { "profile" : "ingress_lossy_profile" }, @@ -160,21 +136,9 @@ "Ethernet64|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet64|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet64|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet68|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet68|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet68|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet168|0": { "profile" : "ingress_lossy_profile" }, @@ -184,21 +148,9 @@ "Ethernet80|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet80|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet80|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet84|0": { "profile" : "ingress_lossy_profile" }, - "Ethernet84|2": { - "profile" : "ingress_lossy_profile" - }, - "Ethernet84|6": { - "profile" : "ingress_lossy_profile" - }, "Ethernet180|0": { "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 a479523fc1f1..a0e9ad63147e 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" : "AZURE" }, "Ethernet0": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -126,7 +192,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet4": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -134,7 +200,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet16": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -142,7 +208,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet20": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -150,7 +216,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet64": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -158,7 +224,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet68": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -166,7 +232,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet80": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", @@ -174,7 +240,7 @@ "pfcwd_sw_enable" : "3,4" }, "Ethernet84": { - "dscp_to_tc_map" : "AZURE", + "dscp_to_tc_map" : "AZURE_UPLINK", "tc_to_queue_map" : "AZURE", "tc_to_pg_map" : "AZURE", "pfc_to_queue_map": "AZURE", From 9c64c1ea47b35c547f41233fe6db2a700c1bc3c8 Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Mon, 1 Aug 2022 10:03:08 +0800 Subject: [PATCH 08/16] Update submodule sonic-dbsyncd (#11555) #### Why I did it Submodule update for sonic-dbsyncd with following change: ``` 0d67faf 2022-07-28 | Replace pyswsssdk with sonic-py-common (#45) [Hua Liu] 265c833 2022-01-11 | Updated the Azure pipeline for Code Coverage (#44) [abdosi] 6548116 2021-04-04 | [ci]: add proper azp [Guohan Lu] 43b9dab 2021-04-04 | [pytest]: add pytest.ini [Guohan Lu] ``` #### How I did it #### How to verify it #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 #### Description for the changelog Submodule update for sonic-dbsyncd with following change: ``` 0d67faf 2022-07-28 | Replace pyswsssdk with sonic-py-common (#45) [Hua Liu] 265c833 2022-01-11 | Updated the Azure pipeline for Code Coverage (#44) [abdosi] 6548116 2021-04-04 | [ci]: add proper azp [Guohan Lu] 43b9dab 2021-04-04 | [pytest]: add pytest.ini [Guohan Lu] ``` #### A picture of a cute animal (not mandatory but encouraged) Co-authored-by: liuh-80 --- src/sonic-dbsyncd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-dbsyncd b/src/sonic-dbsyncd index df46ed418e66..0d67faf36b36 160000 --- a/src/sonic-dbsyncd +++ b/src/sonic-dbsyncd @@ -1 +1 @@ -Subproject commit df46ed418e661a9bccdb2639d8873def356f8ba0 +Subproject commit 0d67faf36b362be4fb38fdd449b98d67ff867c63 From 6f323b3e83207a22124b9de609b5d10243c7bf0e Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 1 Aug 2022 11:31:02 +0800 Subject: [PATCH 09/16] [ci] Support the cross build for armhf/arm64 (#11587) Why I did it [ci] Support the cross build for armhf/arm64 --- .azure-pipelines/azure-pipelines-build.yml | 12 ++++++++++-- .azure-pipelines/official-build.yml | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index 73cf108df668..1b7d6225ac56 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -16,6 +16,9 @@ parameters: - name: 'jobGroups' type: object default: '' +- name: 'qemuOrCrossBuild' + type: boolean + default: false jobs: - template: azure-pipelines-image-template.yml @@ -36,6 +39,9 @@ jobs: docker_syncd_rpc_image: no syncd_rpc_image: no platform_rpc: no + ${{ if parameters.qemuOrCrossBuild }}: + SONIC_SLAVE_DOCKER_DRIVER: 'vfs' + CACHE_MODE: 'none' ${{ if ne(parameters.jobGroups, '') }}: jobGroups: ${{ parameters.jobGroups }} ${{ if eq(parameters.jobGroups, '') }}: @@ -67,7 +73,8 @@ jobs: platform_rpc: centec - name: centec-arm64 - pool: sonicbld-arm64 + ${{ if not(parameters.qemuOrCrossBuild) }}: + pool: sonicbld-arm64 timeoutInMinutes: 2880 variables: PLATFORM_ARCH: arm64 @@ -81,7 +88,8 @@ jobs: dbg_image: yes - name: marvell-armhf - pool: sonicbld-armhf + ${{ if not(parameters.qemuOrCrossBuild) }}: + pool: sonicbld-armhf timeoutInMinutes: 2880 variables: PLATFORM_ARCH: armhf diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index fb986cf67039..21140fecf8b6 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -44,3 +44,5 @@ stages: parameters: buildOptions: 'USERNAME=admin SONIC_BUILD_JOBS=$(nproc) ${{ variables.VERSION_CONTROL_OPTIONS }}' jobFilters: none + ${{ if contains(variables['Build.DefinitionName'], 'cross') }}: + qemuOrCrossBuild: true From d8f30c7bdeb286af2af4049587aa77d8b06669ac Mon Sep 17 00:00:00 2001 From: Kumaresh Perumal Date: Sun, 31 Jul 2022 22:09:44 -0700 Subject: [PATCH 10/16] Yang model support for SRV6 CRM (#9487) #### Why I did it To support Yang models for SRV6 CM #### How I did it Added yang models for SRV6 MY_SID_ENTRY and Nexthop #### How to verify it Added SRV6 CRM yang tests. #### Which release branch to backport (provide reason below if selected) 202111 --- .../tests/yang_model_tests/tests/crm.json | 38 ++++++ .../yang_model_tests/tests_config/crm.json | 110 ++++++++++++++++++ .../yang-models/sonic-crm.yang | 52 +++++++++ 3 files changed, 200 insertions(+) diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/crm.json b/src/sonic-yang-models/tests/yang_model_tests/tests/crm.json index cdfc531f212d..b799868194b6 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/crm.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/crm.json @@ -115,5 +115,43 @@ }, "MPLS_NH_WITH_CORRECT_USED_VALUE": { "desc": "MPLS_NH_WITH_CORRECT_USED_VALUE no failure." + }, + "SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE": { + "desc": "SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE pattern failure.", + "eStrKey": "Pattern", + "eStr": ["wrong" ] + }, + "SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE": { + "desc": "SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE must condition failure.", + "eStrKey": "Must" + }, + "SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR": { + "desc": "SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.", + "eStr": ["high_threshold should be more than low_threshold"] + }, + "SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE": { + "desc": "SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE no failure." + }, + "SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE": { + "desc": "SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE no failure." + }, + "SRV6_NH_WITH_WRONG_THRESHOLD_TYPE": { + "desc": "SRV6_NH_WITH_WRONG_THRESHOLD_TYPE pattern failure.", + "eStrKey": "Pattern", + "eStr": ["wrong" ] + }, + "SRV6_NH_WITH_WRONG_PERCENTAGE": { + "desc": "SRV6_NH_WITH_WRONG_PERCENTAGE must condition failure.", + "eStrKey": "Must" + }, + "SRV6_NH_WITH_HIGH_THRESHOLD_ERR": { + "desc": "SRV6_NH_WITH_HIGH_THRESHOLD_ERR must condition failure about high threshold being lower than low threshold.", + "eStr": ["high_threshold should be more than low_threshold"] + }, + "SRV6_NH_WITH_CORRECT_USED_VALUE": { + "desc": "SRV6_NH_WITH_CORRECT_USED_VALUE no failure." + }, + "SRV6_NH_WITH_CORRECT_USED_VALUE": { + "desc": "SRV6_NH_WITH_CORRECT_USED_VALUE no failure." } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/crm.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/crm.json index f2878bd7b2a8..5f910b0b6be2 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/crm.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/crm.json @@ -328,5 +328,115 @@ } } } + }, + "SRV6_MY_SID_ENTRY_WITH_CORRECT_FREE_VALUE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_my_sid_entry_high_threshold": 90, + "srv6_my_sid_entry_low_threshold": 70, + "srv6_my_sid_entry_threshold_type": "free" + } + } + } + }, + "SRV6_MY_SID_ENTRY_WITH_CORRECT_USED_VALUE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_my_sid_entry_high_threshold": 85, + "srv6_my_sid_entry_low_threshold": 25, + "srv6_my_sid_entry_threshold_type": "used" + } + } + } + }, + "SRV6_MY_SID_ENTRY_WITH_HIGH_THRESHOLD_ERR": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_my_sid_entry_high_threshold": 80, + "srv6_my_sid_entry_low_threshold": 81, + "srv6_my_sid_entry_threshold_type": "PERCENTAGE" + } + } + } + }, + "SRV6_MY_SID_ENTRY_WITH_WRONG_PERCENTAGE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_my_sid_entry_high_threshold": 110, + "srv6_my_sid_entry_low_threshold": 85, + "srv6_my_sid_entry_threshold_type": "PERCENTAGE" + } + } + } + }, + "SRV6_MY_SID_ENTRY_WITH_WRONG_THRESHOLD_TYPE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_my_sid_entry_high_threshold": 90, + "srv6_my_sid_entry_low_threshold": 70, + "srv6_my_sid_entry_threshold_type": "wrong" + } + } + } + }, + "SRV6_NH_WITH_CORRECT_FREE_VALUE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_nexthop_high_threshold": 90, + "srv6_nexthop_low_threshold": 70, + "srv6_nexthop_threshold_type": "free" + } + } + } + }, + "SRV6_NH_WITH_CORRECT_USED_VALUE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_nexthop_high_threshold": 85, + "srv6_nexthop_low_threshold": 25, + "srv6_nexthop_threshold_type": "used" + } + } + } + }, + "SRV6_NH_WITH_HIGH_THRESHOLD_ERR": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_nexthop_high_threshold": 80, + "srv6_nexthop_low_threshold": 81, + "srv6_nexthop_threshold_type": "PERCENTAGE" + } + } + } + }, + "SRV6_NH_WITH_WRONG_PERCENTAGE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_nexthop_high_threshold": 110, + "srv6_nexthop_low_threshold": 85, + "srv6_nexthop_threshold_type": "PERCENTAGE" + } + } + } + }, + "SRV6_NH_WITH_WRONG_THRESHOLD_TYPE": { + "sonic-crm:sonic-crm": { + "sonic-crm:CRM": { + "Config": { + "srv6_nexthop_high_threshold": 90, + "srv6_nexthop_low_threshold": 70, + "srv6_nexthop_threshold_type": "wrong" + } + } + } } } diff --git a/src/sonic-yang-models/yang-models/sonic-crm.yang b/src/sonic-yang-models/yang-models/sonic-crm.yang index d1ac84eec391..f554358645f6 100644 --- a/src/sonic-yang-models/yang-models/sonic-crm.yang +++ b/src/sonic-yang-models/yang-models/sonic-crm.yang @@ -404,6 +404,58 @@ module sonic-crm { type threshold; } + leaf srv6_my_sid_entry_threshold_type { + description "CRM threshold support for SRV6 my_sid entries"; + + must "(((current()='PERCENTAGE' or current()='percentage') and + ../srv6_my_sid_entry_high_threshold<100 and + ../srv6_my_sid_entry_low_threshold<100) or + (current()!='PERCENTAGE' and current()!='percentage'))"; + type stypes:crm_threshold_type; + } + + leaf srv6_my_sid_entry_high_threshold { + description "CRM threshold support for SRV6 my_sid entries"; + + must "(current() > ../srv6_my_sid_entry_low_threshold)" + { + error-message "high_threshold should be more than low_threshold"; + } + type threshold; + } + + leaf srv6_my_sid_entry_low_threshold { + description "CRM threshold support for SRV6 my_sid entries"; + + type threshold; + } + + leaf srv6_nexthop_threshold_type { + description "CRM threshold support for SRV6 next-hops"; + + must "(((current()='PERCENTAGE' or current()='percentage') and + ../srv6_nexthop_high_threshold<100 and + ../srv6_nexthop_low_threshold<100) or + (current()!='PERCENTAGE' and current()!='percentage'))"; + type stypes:crm_threshold_type; + } + + leaf srv6_nexthop_high_threshold { + description "CRM threshold support for SRV6 next-hops"; + + must "(current() > ../srv6_nexthop_low_threshold)" + { + error-message "high_threshold should be more than low_threshold"; + } + type threshold; + } + + leaf srv6_nexthop_low_threshold { + description "CRM threshold support for SRV6 next-hops"; + + type threshold; + } + } /* end of Config */ } From b29dda2beae366b4632ee5759a4b8dc5c7771f64 Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Mon, 1 Aug 2022 23:25:18 +0800 Subject: [PATCH 11/16] Extend t1-lag timeout to 360 (#11478) Signed-off-by: Stephen Sun --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90113e8f793f..fff6e854c4c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -185,7 +185,7 @@ stages: - job: pool: sonictest-t1-lag displayName: "kvmtest-t1-lag" - timeoutInMinutes: 300 + timeoutInMinutes: 360 steps: - template: .azure-pipelines/run-test-template.yml From e3892c6b151137169d0f7f22101c639163a118b9 Mon Sep 17 00:00:00 2001 From: Jing Zhang Date: Mon, 1 Aug 2022 17:38:50 -0700 Subject: [PATCH 12/16] submodule update (#11596) --- src/linkmgrd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkmgrd b/src/linkmgrd index 945b10735db7..60b370dee69e 160000 --- a/src/linkmgrd +++ b/src/linkmgrd @@ -1 +1 @@ -Subproject commit 945b10735db7ab432c915b69edee89f73d9eac75 +Subproject commit 60b370dee69e937cf15de24985875e089974c89d From 7f7800622423c01daf4cfc7c6b472cb9b00a3823 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:52:23 +0800 Subject: [PATCH 13/16] [Bug][Build] Fix the variable patterns not replaced issue (#11572) #### Why I did it The %%EXTRA_CMDLINE_LINUX%% is not replaced to the real value, it has impact on the kernel parameter settings. See the log sonic-vs.img.gz.log in the latest master build. In the grub.cfg, the %%EXTRA_CMDLINE_LINUX%% is set in the linux command line. ``` Installing for i386-pc platform. Installation finished. No error reported. Switch CPU vendor is: GenuineIntel Switch CPU cstates are: disabled EXTRA_CMDLINE_LINUX=%%EXTRA_CMDLINE_LINUX%% Installed SONiC base image SONiC-OS successfully ONIE: NOS install successful: file://dev/vdb/onie-installer.bin ``` --- installer/default_platform.conf | 2 -- installer/install.sh | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/installer/default_platform.conf b/installer/default_platform.conf index af3fa8fc2235..ea13f00c040a 100755 --- a/installer/default_platform.conf +++ b/installer/default_platform.conf @@ -64,7 +64,6 @@ create_partition() # determine ONIE partition type onie_partition_type=$(${onie_bin} onie-sysinfo -t) # demo partition size in MB - demo_part_size="%%ONIE_IMAGE_PART_SIZE%%" if [ "$firmware" = "uefi" ] ; then create_demo_uefi_partition $blk_dev elif [ "$onie_partition_type" = "gpt" ] ; then @@ -471,7 +470,6 @@ EOF fi # Add extra linux command line -extra_cmdline_linux=%%EXTRA_CMDLINE_LINUX%% echo "EXTRA_CMDLINE_LINUX=$extra_cmdline_linux" GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX $extra_cmdline_linux" diff --git a/installer/install.sh b/installer/install.sh index 8f4a515579b0..8ae0fec0e8a2 100755 --- a/installer/install.sh +++ b/installer/install.sh @@ -236,6 +236,9 @@ if [ "$install_env" = "onie" ]; then fi fi +demo_part_size="%%ONIE_IMAGE_PART_SIZE%%" +echo "ONIE_IMAGE_PART_SIZE=$demo_part_size" + extra_cmdline_linux=%%EXTRA_CMDLINE_LINUX%% echo "EXTRA_CMDLINE_LINUX=$extra_cmdline_linux" From 9ff2e2cff38fa71d0e5ce38f92d4339206849a74 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Tue, 2 Aug 2022 16:24:14 +0800 Subject: [PATCH 14/16] [ci] Update azp reference to support transfering organization from Azure to sonic-net (#11601) 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-arm64.yml | 4 ++-- .azure-pipelines/docker-sonic-slave-armhf.yml | 4 ++-- .azure-pipelines/docker-sonic-slave.yml | 4 ++-- .azure-pipelines/official-build.yml | 4 ++-- azure-pipelines.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index cc6135b045ef..33f802b0d56c 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -22,9 +22,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-arm64.yml b/.azure-pipelines/docker-sonic-slave-arm64.yml index 2a9af06c3d01..6350d8fd3b5d 100644 --- a/.azure-pipelines/docker-sonic-slave-arm64.yml +++ b/.azure-pipelines/docker-sonic-slave-arm64.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 schedules: - cron: "0 8 * * *" diff --git a/.azure-pipelines/docker-sonic-slave-armhf.yml b/.azure-pipelines/docker-sonic-slave-armhf.yml index 69e73479f342..fcdad5f2cd19 100644 --- a/.azure-pipelines/docker-sonic-slave-armhf.yml +++ b/.azure-pipelines/docker-sonic-slave-armhf.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 schedules: - cron: "0 8 * * *" diff --git a/.azure-pipelines/docker-sonic-slave.yml b/.azure-pipelines/docker-sonic-slave.yml index 3ae3f88f0154..cd8a6df4aff4 100644 --- a/.azure-pipelines/docker-sonic-slave.yml +++ b/.azure-pipelines/docker-sonic-slave.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 schedules: - cron: "0 8 * * *" diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 21140fecf8b6..ee99d7ca3f28 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -22,9 +22,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 fff6e854c4c1..b9653c2bc8cd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,8 +32,8 @@ resources: endpoint: sonic-net - repository: buildimage type: github - name: Azure/sonic-buildimage - endpoint: build + name: sonic-net/sonic-buildimage + endpoint: sonic-net ref: master variables: From ba1e1a92563014b075b611cbd1ae8cb64a924f47 Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Tue, 2 Aug 2022 16:48:42 +0800 Subject: [PATCH 15/16] [sonic-swss-common] Update sonic-swss-common submodule (#11524) #### Why I did it Submodule update for sonic-swss-common with following change: ``` 2247dbe 2022-08-01 | Fix memory leak issue in ConfigDBConnector. (#655) [Hua Liu] 4af97d6 2022-07-27 | Add new table schemas for DASH (#654) [prabhataravind] d72e5ea 2022-07-23 | Fix epoll and socket resource leak issue. (#651) [Hua Liu] dda857b 2022-07-21 | Microsoft mandatory file (#620) [microsoft-github-policy-service[bot]] 4132d14 2022-07-21 | Fix PING database command not backward compatible with python version issue. (#650) [Hua Liu] ``` #### How I did it #### How to verify it #### Which release branch to backport (provide reason below if selected) - [ ] 201811 - [ ] 201911 - [ ] 202006 - [ ] 202012 - [ ] 202106 #### Description for the changelog Submodule update for sonic-swss-common with following change: ``` 2247dbe 2022-08-01 | Fix memory leak issue in ConfigDBConnector. (#655) [Hua Liu] 4af97d6 2022-07-27 | Add new table schemas for DASH (#654) [prabhataravind] d72e5ea 2022-07-23 | Fix epoll and socket resource leak issue. (#651) [Hua Liu] dda857b 2022-07-21 | Microsoft mandatory file (#620) [microsoft-github-policy-service[bot]] 4132d14 2022-07-21 | Fix PING database command not backward compatible with python version issue. (#650) [Hua Liu] ``` #### A picture of a cute animal (not mandatory but encouraged) Co-authored-by: liuh-80 --- 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 154cc9c05dd4..2247dbea47f9 160000 --- a/src/sonic-swss-common +++ b/src/sonic-swss-common @@ -1 +1 @@ -Subproject commit 154cc9c05dd44cdb179f802f78ae4344be50ccce +Subproject commit 2247dbea47f968411b28b5c04d4be89d72d08cbf From 847a29088b5cd221835938c3d896a2860377ffff Mon Sep 17 00:00:00 2001 From: Santhosh Kumar T <53558409+santhosh-kt@users.noreply.github.com> Date: Tue, 2 Aug 2022 22:26:17 +0530 Subject: [PATCH 16/16] [DellEMC] S6100 Platform Service optimization porting in master (#11330) To reduce rc.local script execution time. Porting changes from [DellEMC] S6100 Platform Service optimization #10989 Changes: Moving platform-modules-s6100.service and s6100-lpc-monitor.service asynchronous to rc.local script. --- .../debian/platform-modules-s6100.init | 40 ------------------ .../debian/platform-modules-s6100.postinst | 6 +-- .../sonic-platform-modules-dell/debian/rules | 3 ++ .../s6100/scripts/s6100_platform.sh | 41 +++++++++++-------- .../systemd/platform-modules-s6100.service | 2 +- .../systemd/s6100-platform-startup.service | 2 +- 6 files changed, 30 insertions(+), 64 deletions(-) delete mode 100755 platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.init diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.init b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.init deleted file mode 100755 index c798b24ef235..000000000000 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.init +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -### BEGIN INIT INFO -# Provides: setup-board -# Required-Start: -# Required-Stop: -# Should-Start: -# Should-Stop: -# Default-Start: S -# Default-Stop: 0 6 -# Short-Description: Setup S6100 board. -### END INIT INFO - -case "$1" in -start) - echo -n "Setting up board... " - - /usr/local/bin/iom_power_on.sh - /usr/local/bin/s6100_platform.sh init - - echo "done." - ;; - -stop) - /usr/local/bin/s6100_platform.sh deinit - echo "done." - - ;; - -force-reload|restart) - echo "Not supported" - ;; - -*) - echo "Usage: /etc/init.d/platform-modules-s6100.init {start|stop}" - exit 1 - ;; -esac - -exit 0 diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.postinst b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.postinst index eda8f7c8a41a..78c78fa0037f 100644 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.postinst +++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.postinst @@ -1,11 +1,7 @@ # postinst script for S6100 # Enable Dell-S6100-platform-service -depmod -a systemctl enable platform-modules-s6100.service -systemctl start platform-modules-s6100.service - -systemctl enable s6100-lpc-monitor.service -systemctl start s6100-lpc-monitor.service +systemctl start --no-block platform-modules-s6100.service #DEBHELPER# diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/rules b/platform/broadcom/sonic-platform-modules-dell/debian/rules index 9904cce52b6b..421057fdac33 100755 --- a/platform/broadcom/sonic-platform-modules-dell/debian/rules +++ b/platform/broadcom/sonic-platform-modules-dell/debian/rules @@ -95,6 +95,9 @@ override_dh_auto_install: override_dh_usrlocal: +override_dh_installmodules: + dh_installmodules --no-scripts; + override_dh_clean: dh_clean set -e; \ diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh index 15763bbc9e36..34973002dc38 100755 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh @@ -3,6 +3,30 @@ #platform init script for Dell S6100 if [[ "$1" == "init" ]]; then + depmod -a + case "$(cat /proc/cmdline)" in + *SONIC_BOOT_TYPE=warm*) + TYPE='warm' + ;; + *SONIC_BOOT_TYPE=fastfast*) + TYPE='fastfast' + ;; + *SONIC_BOOT_TYPE=fast*|*fast-reboot*) + TYPE='fast' + ;; + *SONIC_BOOT_TYPE=soft*) + TYPE='soft' + ;; + *) + TYPE='cold' + esac + + if [[ "$TYPE" == "cold" ]]; then + /usr/local/bin/iom_power_on.sh + fi + + systemctl enable s6100-lpc-monitor.service + systemctl start --no-block s6100-lpc-monitor.service pericom="/sys/bus/pci/devices/0000:08:00.0" modprobe i2c-dev @@ -24,23 +48,6 @@ if [[ "$1" == "init" ]]; then systemctl start --no-block s6100-ssd-upgrade-status.service - case "$(cat /proc/cmdline)" in - *SONIC_BOOT_TYPE=warm*) - TYPE='warm' - ;; - *SONIC_BOOT_TYPE=fastfast*) - TYPE='fastfast' - ;; - *SONIC_BOOT_TYPE=fast*|*fast-reboot*) - TYPE='fast' - ;; - *SONIC_BOOT_TYPE=soft*) - TYPE='soft' - ;; - *) - TYPE='cold' - esac - if [[ "$TYPE" == "cold" ]]; then systemctl start s6100-platform-startup.service else diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/platform-modules-s6100.service b/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/platform-modules-s6100.service index 4883ecf268fd..127426f09873 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/platform-modules-s6100.service +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/platform-modules-s6100.service @@ -1,6 +1,6 @@ [Unit] Description=Dell S6100 Platform modules -Before=pmon.service determine-reboot-cause.service +Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service DefaultDependencies=no [Service] diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/s6100-platform-startup.service b/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/s6100-platform-startup.service index d7a40f43033c..ecba7b006361 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/s6100-platform-startup.service +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/systemd/s6100-platform-startup.service @@ -1,6 +1,6 @@ [Unit] Description=Dell S6100 Platform Startup Service -Before=pmon.service determine-reboot-cause.service +Before=pmon.service determine-reboot-cause.service pcie-check.service system-health.service watchdog-control.service DefaultDependencies=no [Service]