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

Remove runtime config update for FLEX_COUNTER_TABLE: new counters added depending on switch type #20492

Open
stepanblyschak opened this issue Oct 14, 2024 · 0 comments

Comments

@stepanblyschak
Copy link
Collaborator

Description

FLEX_COUNTER_TABLE config will be updated some time later after load_minigraph. This will result in the FLEX_COUNTER_TABLE is inconsistent between the desired config and running config.
The ask it to make it consistent and not more run time update. The fix should also consider the backward compatibility.

Steps to reproduce the issue:

  1. Run config load_minigraph -y
  2. Record the config right after the command finish.
admin@bjw-can-2700-2:~$ show run all  | grep FLEX_COUNTER_TABLE -A6
    "FLEX_COUNTER_TABLE": {
        "ACL": {
            "FLEX_COUNTER_STATUS": "enable",
            "FLEX_COUNTER_DELAY_STATUS": "true",
            "POLL_INTERVAL": "10000"
        }
    },
  1. The FLEX_COUNTER_TABLE are the same as the init_cfg.json
admin@bjw-can-2700-2:~$ show run all | grep FLEX_COUNTER_TABLE -A35
    "FLEX_COUNTER_TABLE": {
        "ACL": {
            "FLEX_COUNTER_DELAY_STATUS": "false",
            "FLEX_COUNTER_STATUS": "enable",
            "POLL_INTERVAL": "10000"
        },
        "BUFFER_POOL_WATERMARK": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "PFCWD": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "PG_DROP": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "PG_WATERMARK": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "PORT": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "PORT_BUFFER_DROP": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "QUEUE": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "QUEUE_WATERMARK": {
            "FLEX_COUNTER_STATUS": "enable"
        },
        "RIF": {
            "FLEX_COUNTER_STATUS": "enable"
        }
    },

This issue is related to #20302, specifically in enable_counters.py:

    platform_info = device_info.get_platform_info(db)
    if platform_info.get('switch_type') == 'dpu':
        for key in dpu_counters:
            enable_counter_group(db, key)

Describe the results you received:

FLEX_COUNTER_TABLE was updated with new entry.

Describe the results you expected:

We expect the FLEX_COUNTER_TABLE to be consitent and no longer have run time update. This will help us manage the running config of the device.
Currently if we refer the init_cfg.json as the source of truth, it will be wrong.

Output of show version:

SONiC Software Version: SONiC.20231110.21
SONiC OS Version: 11
Distribution: Debian 11.10
Kernel: 5.10.0-23-2-amd64
Build commit: e868b9ca70

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant