Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:16937] [minigraph-parser] Disable unsupported counters on management devices #17103

Merged
merged 2 commits into from
Nov 8, 2023

Conversation

mssonicbld
Copy link
Collaborator

Why I did it

To avoid orchagent crash issue like sonic-net/sonic-swss#2935, disable unsupported counters on SONiC management devices.

Work item tracking
  • Microsoft ADO (number only): 25437720

How I did it

Update the minigraph parser to disable unsupported counters on management devices.

How to verify it

  1. Verified by unittest.
root@dd14c2cb8789:/sonic/src/sonic-config-engine/tests$ pytest-3 -v test_minigraph_case.py
============================================================== test session starts ==============================================================
platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /sonic/src/sonic-config-engine
plugins: pyfakefs-5.3.0, cov-2.10.1
collected 43 items

test_minigraph_case.py::TestCfgGenCaseInsensitive::test_additional_json_data PASSED [ 2%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_dhcp_table PASSED [ 4%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_dummy_run PASSED [ 6%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_jinja_expression PASSED [ 9%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_kube PASSED [ 11%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_ntp PASSED [ 13%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_metadata_tacacs PASSED [ 16%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_mgmt_device_disable_counters PASSED [ 18%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_acl_attach_to_ports PASSED [ 20%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_acl_type_bmcdata PASSED [ 23%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_bgp_mon PASSED [ 25%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_cluster PASSED [ 27%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_console_mgmt_feature PASSED [ 30%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_console_port PASSED [ 32%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_deployment_id PASSED [ 34%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_dhcp_server_feature PASSED [ 37%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_interfaces PASSED [ 39%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mgmt_port PASSED [ 41%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mirror_dscp PASSED [ 44%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_mux_cable_table PASSED [ 46%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_neighbor_metadata PASSED [ 48%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_peer_switch PASSED [ 51%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_peer_switch_hostname PASSED [ 53%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_portchannels PASSED [ 55%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_rack_mgmt_map PASSED [ 58%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_sku PASSED [ 60%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_no_resource_type PASSED [ 62%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_resource_type PASSED [ 65%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_backend_subintf PASSED [ 67%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_storage_device PASSED [ 69%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_subtype PASSED [ 72%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_tunnel_table PASSED [ 74%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_interfaces PASSED [ 76%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_interfaces_keys PASSED [ 79%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlan_members PASSED [ 81%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vlans PASSED [ 83%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vnet PASSED [ 86%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_minigraph_vxlan PASSED [ 88%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_mux_cable_parsing PASSED [ 90%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_parse_device_desc_xml_mgmt_interface PASSED [ 93%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_print_data PASSED [ 95%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_read_yaml PASSED [ 97%]
test_minigraph_case.py::TestCfgGenCaseInsensitive::test_render_template PASSED [100%]

============================================================== 43 passed in 24.59s ==============================================================
  1. Manually apply patch to DUT and do config load_minigraph. Then confirmed:
  2. show run all: the FLEX_COUNTER_TABLE section in running-config is shown as expected.
  3. config save -y: the FLEX_COUNTER_TABLE section in config_db.json is shown as expected.
  4. show int st: confirm all interface are healthy.
  5. show ip bgp sum && show ipv6 bgp sum: confirm BGP session is healthy.
  6. portstat: interface counters are shown as expected.
  7. show int counters rif: L3 interface counters are shown as expected.
  8. aclshow -a: ACL counters are shown as expected.

Above contents are confirmed on below platforms and branch:

Platform SONiC Image Branch Device Type Result
Nokia-7215 202305 MgmtToRRouter (M0) All Passed
Nokia-7215 202205 MgmtToRRouter (M0) All Passed
Nokia-7215 202012 MgmtToRRouter (M0) All Passed
Arista-720DT 202205 BmcMgmtToRRouter (Mx) All Passed
Arista-720DT 202305 BmcMgmtToRRouter (Mx) All Passed

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

…sonic-net#16937)

Why I did it
To avoid orchagent crash issue like sonic-net/sonic-swss#2935, disable unsupported counters on SONiC management devices.

Work item tracking
Microsoft ADO (number only): 25437720
How I did it
Update the minigraph parser to disable unsupported counters on management devices.

How to verify it
Verified by unittest.
Manually apply patch to DUT and do config load_minigraph
@mssonicbld
Copy link
Collaborator Author

Original PR: #16937

@liushilongbuaa
Copy link
Contributor

/azpw ms_conflict

@mssonicbld
Copy link
Collaborator Author

/azp run Azure.sonic-buildimage

Copy link

Pull request contains merge conflicts.

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit f887f59 into sonic-net:202305 Nov 8, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants