From 8a780ca7e93a37eb1a8ee6a1822221f7d8fd92e9 Mon Sep 17 00:00:00 2001 From: ganglv <88995770+ganglyu@users.noreply.github.com> Date: Tue, 12 Mar 2024 02:46:23 +0800 Subject: [PATCH 1/7] ASN 0 for BGP monitor (#18322) ### Why I did it BGP monitor asn is 0 in production, and we should have test to cover this configuration. ### How I did it Update sonic-config-engine unit test, BGP monitor uses asn 0. #### How to verify it Run sonic-config-engine unit test. --- src/sonic-config-engine/tests/simple-sample-graph.xml | 2 +- src/sonic-config-engine/tests/test_cfggen.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index 7da7cb58d4ad..d0dcc02806d7 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -72,7 +72,7 @@ - 1 + 0 BGPMonitor diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index b8480cf81fee..7018dc7db3bf 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -720,7 +720,7 @@ def test_minigraph_bgp_mon(self): output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), - utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '1', 'keepalive': '3'}}") + utils.to_dict("{'10.20.30.40': {'rrclient': 0, 'name': 'BGPMonitor', 'local_addr': '10.1.0.32', 'nhopself': 0, 'holdtime': '10', 'asn': '0', 'keepalive': '3'}}") ) def test_minigraph_bgp_voq_chassis_peer(self): From f9af461dd035415707773b5682b962a586950124 Mon Sep 17 00:00:00 2001 From: mihirpat1 <112018033+mihirpat1@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:27:25 -0700 Subject: [PATCH 2/7] [YANG]: Add Yang model support for adding dom_polling to PORT table (#18277) ### Why I did it Added YANG related changes for adding `dom_polling` field in PORT table of CONFIG_DB. This field can be set with `config interface transceiver dom PORT_NAME (enable|disable)` CLI. The `dom_polling` field was added through https://github.com/sonic-net/sonic-utilities/pull/3187. Please refer to this PR for the details on the reason for adding `dom_polling` field. ### How I did it Added `dom_polling` field to CONFIG_DB PORT table. #### How to verify it Added unit tests for both valid and invalid options for controlling `dom_polling`. Valid values for for `dom_polling` are `enabled` and `disabled` Any other value is treated as an invalid value --- src/sonic-yang-models/doc/Configuration.md | 15 ++++--- .../tests/files/sample_config_db.json | 6 ++- .../tests/yang_model_tests/tests/port.json | 8 ++++ .../yang_model_tests/tests_config/port.json | 42 +++++++++++++++++++ .../yang-models/sonic-port.yang | 4 ++ 5 files changed, 68 insertions(+), 7 deletions(-) diff --git a/src/sonic-yang-models/doc/Configuration.md b/src/sonic-yang-models/doc/Configuration.md index fb30dc422917..886277d26f7c 100644 --- a/src/sonic-yang-models/doc/Configuration.md +++ b/src/sonic-yang-models/doc/Configuration.md @@ -1807,7 +1807,8 @@ optional attributes. "speed": "40000", "link_training": "off", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "enabled" }, "Ethernet1": { "index": "1", @@ -1819,7 +1820,8 @@ optional attributes. "speed": "40000", "link_training": "on", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "enabled" }, "Ethernet63": { "index": "63", @@ -1829,7 +1831,8 @@ optional attributes. "alias": "fortyGigE1/4/16", "speed": "40000", "laser_freq": "191300", - "tx_power": "-27.3" + "tx_power": "-27.3", + "dom_polling": "disabled" } } } @@ -1845,7 +1848,8 @@ optional attributes. "mtu": "9100", "alias": "etp1a", "speed": "100000", - "subport": 1 + "subport": 1, + "dom_polling": "enabled" }, "Ethernet4": { "admin_status": "up", @@ -1855,7 +1859,8 @@ optional attributes. "mtu": "9100", "alias": "etp1b", "speed": "100000", - "subport": 2 + "subport": 2, + "dom_polling": "enabled" }, } } diff --git a/src/sonic-yang-models/tests/files/sample_config_db.json b/src/sonic-yang-models/tests/files/sample_config_db.json index f54e9f588248..050f4433bac6 100644 --- a/src/sonic-yang-models/tests/files/sample_config_db.json +++ b/src/sonic-yang-models/tests/files/sample_config_db.json @@ -605,7 +605,8 @@ "adv_speeds": "all", "adv_interface_types": "all", "subport" : "0", - "mode":"trunk" + "mode":"trunk", + "dom_polling":"enabled" }, "Ethernet3": { "alias": "Eth1/4", @@ -625,7 +626,8 @@ "tpid": "0x9100", "admin_status": "up", "subport": "2", - "mode":"trunk" + "mode":"trunk", + "dom_polling":"enabled" }, "Ethernet5": { "alias": "Eth2/2", diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json index 38c2b27cb6a9..a6656b832815 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests/port.json @@ -134,6 +134,14 @@ "eStrKey": "Range", "eStr": "0..8" }, + "PORT_VALID_DOM_POLLING": { + "desc": "PORT_VALID_DOM_POLLING no failure." + }, + "PORT_INVALID_DOM_POLLING": { + "desc": "PORT_INVALID_DOM_POLLING invalid condition failure.", + "eStrKey" : "InvalidValue", + "eStr": ["dom_polling"] + }, "PORT_AUTO_FEC_TEST": { "desc": "PORT_AUTO_FEC_TEST validate auto mode in fec." } diff --git a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json index 5864ae1444ed..3e8899b6e6da 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json +++ b/src/sonic-yang-models/tests/yang_model_tests/tests_config/port.json @@ -669,6 +669,48 @@ } }, + "PORT_INVALID_DOM_POLLING": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "alias": "etp1a", + "lanes": "60, 61", + "speed": 100000, + "subport": 1, + "dom_polling": "on" + } + ] + } + } + }, + + "PORT_VALID_DOM_POLLING": { + "sonic-port:sonic-port": { + "sonic-port:PORT": { + "PORT_LIST": [ + { + "name": "Ethernet0", + "alias": "etp1a", + "lanes": "60, 61", + "speed": 100000, + "subport": 1, + "dom_polling": "enabled" + }, + { + "name": "Ethernet2", + "alias": "etp1b", + "lanes": "62, 63", + "speed": 100000, + "subport": 2, + "dom_polling": "disabled" + } + ] + } + } + }, + "PORT_AUTO_FEC_TEST": { "sonic-port:sonic-port": { "sonic-port:PORT": { diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index 94a38967cdb5..f82d74465c97 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -161,6 +161,10 @@ module sonic-port{ } } + leaf dom_polling { + type stypes:admin_mode; + } + leaf pfc_asym { type string { pattern "on|off"; From c02206652290268f3fdf6de7b2a0277ab6c443fb Mon Sep 17 00:00:00 2001 From: longhuan-cisco <84595962+longhuan-cisco@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:39:13 -0700 Subject: [PATCH 3/7] Add enable_sff_mgr flag support for xcvrd (#18054) This PR is a dependency of sonic-net/sonic-platform-daemons#383 HLD of sff_mgr: sonic-net/SONiC#1371 Why I did it Add enable_xcvrd_sff_mgr flag support for sff_mgr --- .../docker-pmon.supervisord.conf.j2 | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 index 3cb5f0509a26..4673b62da6e5 100644 --- a/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 +++ b/dockers/docker-platform-monitor/docker-pmon.supervisord.conf.j2 @@ -95,13 +95,23 @@ dependent_startup_wait_for=rsyslogd:running {% if not skip_xcvrd %} [program:xcvrd] -{% if delay_xcvrd %} -command={% if skip_xcvrd_cmis_mgr %} bash -c "sleep 30 && python3 /usr/local/bin/xcvrd --skip_cmis_mgr" {% else %} bash -c "sleep 30 && python3 /usr/local/bin/xcvrd" {% endif %} +{% set base_command = "python3 /usr/local/bin/xcvrd" %} +{% set options = "" -%} -{% else %} -command={% if skip_xcvrd_cmis_mgr %} python3 /usr/local/bin/xcvrd --skip_cmis_mgr {% else %} python3 /usr/local/bin/xcvrd {% endif %} +{% if skip_xcvrd_cmis_mgr %} + {%- set options = options + " --skip_cmis_mgr" %} +{% endif -%} -{% endif %} +{% if enable_xcvrd_sff_mgr %} + {%- set options = options + " --enable_sff_mgr" %} +{% endif -%} + +{% if delay_xcvrd %} + {%- set command = "bash -c \"sleep 30 && " ~ base_command ~ options ~ "\"" %} +{% else %} + {%- set command = base_command ~ options %} +{% endif -%} +command={{ command }} priority=6 autostart=false autorestart=unexpected From 283d1ff97d3094281dd040428e000028bc14e57f Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Tue, 12 Mar 2024 19:01:17 +0800 Subject: [PATCH 4/7] [submodule] Update submodule sonic-linux-kernel to the latest HEAD automatically (#18333) #### Why I did it src/sonic-linux-kernel ``` * b6fd1ba - (HEAD -> master, origin/master, origin/HEAD) arm64: dts: marvell: Add DTS for 7215-IXS-A1 board (#378) (4 hours ago) [Pavan-Nokia] * bab1510 - Disable small sector erase size for UBIFS on flash (#382) (8 hours ago) [Mridul Bajpai] ``` #### How I did it #### How to verify it #### Description for the changelog --- 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 45295bfbf051..b6fd1ba62cd3 160000 --- a/src/sonic-linux-kernel +++ b/src/sonic-linux-kernel @@ -1 +1 @@ -Subproject commit 45295bfbf051bc7d9b591eab465bd01ca81687ff +Subproject commit b6fd1ba62cd3677536a33f261cdce0350194706c From b05f488ba6fc61d24ea50656951d3865de68158d Mon Sep 17 00:00:00 2001 From: Zhijian Li Date: Wed, 13 Mar 2024 06:07:08 +0800 Subject: [PATCH 5/7] Update minigraph testcases (#18321) --- src/sonic-config-engine/tests/test_minigraph_case.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 70c5c410332e..8bad0f5f3560 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -528,7 +528,7 @@ def test_minigraph_acl_type_bmcdata(self): } # TC1: Minigraph contains acl table type BmcData sample_mx_graph = os.path.join(self.test_dir,'simple-sample-graph-mx.xml') - result = minigraph.parse_xml(sample_mx_graph) + result = minigraph.parse_xml(sample_mx_graph, port_config_file=self.port_config) self.assertIn('ACL_TABLE_TYPE', result) self.assertIn('BMCDATA', result['ACL_TABLE_TYPE']) self.assertIn('BMCDATAV6', result['ACL_TABLE_TYPE']) @@ -537,7 +537,7 @@ def test_minigraph_acl_type_bmcdata(self): self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND'], expected_acl_table_bmc_acl_northbound) self.assertDictEqual(result['ACL_TABLE']['BMC_ACL_NORTHBOUND_V6'], expected_acl_table_bmc_acl_northbound_v6) # TC2: Minigraph doesn't contain acl table type BmcData - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('ACL_TABLE_TYPE', result) def test_parse_device_desc_xml_mgmt_interface(self): @@ -564,7 +564,7 @@ def test_mgmt_device_disable_counters(self): mgmt_graphs = ['simple-sample-graph-mx.xml', 'simple-sample-graph-m0.xml'] for graph in mgmt_graphs: graph_path = os.path.join(self.test_dir, graph) - result = minigraph.parse_xml(graph_path) + result = minigraph.parse_xml(graph_path, port_config_file=self.port_config) self.assertIn('FLEX_COUNTER_TABLE', result) for counter in expected_mgmt_disabled_counters: self.assertIn(counter, result['FLEX_COUNTER_TABLE']) @@ -573,5 +573,5 @@ def test_mgmt_device_disable_counters(self): if counter in result['FLEX_COUNTER_TABLE']: self.assertDictEqual(result['FLEX_COUNTER_TABLE'][counter], {'FLEX_COUNTER_STATUS': 'enable'}) # TC2: For other minigraph, result should not contain FLEX_COUNTER_TABLE - result = minigraph.parse_xml(self.sample_graph) + result = minigraph.parse_xml(self.sample_graph, port_config_file=self.port_config) self.assertNotIn('FLEX_COUNTER_TABLE', result) From 80448380e6976a3e326902a37818252abb160dc0 Mon Sep 17 00:00:00 2001 From: amulyan7 <98349131+amulyan7@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:36:51 -0700 Subject: [PATCH 6/7] Set loglevel for crash kernel to reduce verbosity and improve overall router recovery time (#18285) Why I did it On certain routers with baud rate 9600, crash kernel is taking a long time , close to ~5mins, to complete kernel dump and reload the box. On contrast to routers with baud rate 115200, crash kernel dump process is observed to be completed under 35s-60s (depending on the platform). Currently, all debug and informational messages are printed on the console which also factors in for the delay seen. Unless the router is monitored on console in real time, these messages are not very useful. Setting the loglevel to warning will help reduce the verbosity of logs on console, in turn allow crash kernel dump process to be completed in a reasonable time which will also help in overall router recovery time. How I did it Setting loglevel attribute in crashkernel cmdline How to verify it Install SONiC image with crashkernel cmdline with loglevel set to warning and initiate an induced a crash (sysrq-trigger) crashkernel boot and dump process will be completed in 20s-30s depending on the platform --- files/image_config/kdump/kdump-tools | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/image_config/kdump/kdump-tools b/files/image_config/kdump/kdump-tools index 83c2766524d3..2fb39d81bc75 100644 --- a/files/image_config/kdump/kdump-tools +++ b/files/image_config/kdump/kdump-tools @@ -7,10 +7,11 @@ KDUMP_CMDLINE_APPEND="irqpoll nr_cpus=1 nousb systemd.unit=kdump-tools.service a # Reboot crash kernel on panic # Enable debug level logging of crash kernel for better visibility +# Set loglevel to reduce verbosity and print only warning conditions # Disable advanced pcie features # Disable high precision event timer as on some platforms it is interfering with the kdump operation # Pass platform identifier string as part of crash kernel command line to be used by the reboot script during kdump -KDUMP_CMDLINE_APPEND="${KDUMP_CMDLINE_APPEND} panic=10 debug hpet=disable pcie_port=compat pci=nommconf sonic_platform=__PLATFORM__" +KDUMP_CMDLINE_APPEND="${KDUMP_CMDLINE_APPEND} panic=10 debug loglevel=4 hpet=disable pcie_port=compat pci=nommconf sonic_platform=__PLATFORM__" # Use SONiC reboot wrapper script present in /usr/local/bin post kdump PATH=/usr/local/bin:$PATH From 86a9ab6a7b8c08d142a2eb65d5f7ba8ab77ad221 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Wed, 13 Mar 2024 19:01:17 +0800 Subject: [PATCH 7/7] [submodule] Update submodule sonic-host-services to the latest HEAD automatically (#18354) #### Why I did it src/sonic-host-services ``` * 6fce478 - (HEAD -> master, origin/master, origin/HEAD) Remove UpdateGraphService feature (#105) (2 hours ago) [ganglv] ``` #### How I did it #### How to verify it #### Description for the changelog --- src/sonic-host-services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-host-services b/src/sonic-host-services index 970e7b34dec8..6fce4781da50 160000 --- a/src/sonic-host-services +++ b/src/sonic-host-services @@ -1 +1 @@ -Subproject commit 970e7b34dec888c4f32a728146cba27ddafb37ba +Subproject commit 6fce4781da508709f11be595e3c7048ffd3138cb