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 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 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): 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) 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 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 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";