-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[yang]Fixing sonic-cfg-help to handle nested container #17260
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g. "AUTO_TECHSUPPORT": { "GLOBAL": { } }
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
vivekrnv
approved these changes
Nov 22, 2023
ganglyu
approved these changes
Nov 23, 2023
StormLiangMS
approved these changes
Nov 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Nov 23, 2023
Why I did it Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g. "AUTO_TECHSUPPORT": { "GLOBAL": { } } Previous output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ New output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json key - GLOBAL +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ Work item tracking Microsoft ADO (number only): How I did it Fixing sonic-cfg-help tool to handle nested container How to verify it Added UT to verify it.
Cherry-pick PR to 202305: #17289 |
11 tasks
mssonicbld
added a commit
that referenced
this pull request
Nov 23, 2023
mssonicbld
added
Included in 202305 Branch
and removed
Created PR to 202305 Branch
labels
Nov 23, 2023
yxieca
pushed a commit
that referenced
this pull request
Dec 4, 2023
Why I did it Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g. "AUTO_TECHSUPPORT": { "GLOBAL": { } } Previous output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ New output AUTO_TECHSUPPORT Description: AUTO_TECHSUPPORT part of config_db.json key - GLOBAL +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | Field | Description | Mandatory | Default | Reference | +=========================+====================================================+=============+===========+=============+ | state | Knob to make techsupport invocation event-driven | | | | | | based on core-dump generation | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | rate_limit_interval | Minimum time in seconds between two successive | | | | | | techsupport invocations. Configure 0 to explicitly | | | | | | disable | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_techsupport_limit | Max Limit in percentage for the cummulative size | | | | | | of ts dumps. No cleanup is performed if the value | | | | | | isn't configured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | max_core_limit | Max Limit in percentage for the cummulative size | | | | | | of core dumps. No cleanup is performed if the | | | | | | value isn't congiured or is 0.0 | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | available_mem_threshold | Memory threshold; 0 to disable techsupport | | 10.0 | | | | invocation on memory usage threshold crossing | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | min_available_mem | Minimum Free memory (in MB) that should be | | 200 | | | | available for the techsupport execution to start | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ | since | Only collect the logs & core-dumps generated since | | | | | | the time provided. A default value of '2 days ago' | | | | | | is used if this value is not set explicitly or a | | | | | | non-valid string is provided | | | | +-------------------------+----------------------------------------------------+-------------+-----------+-------------+ Work item tracking Microsoft ADO (number only): How I did it Fixing sonic-cfg-help tool to handle nested container How to verify it Added UT to verify it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Approved for 202305 Branch
Included in 202305 Branch
Request for 202305 Branch
YANG
YANG model related changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
Fixing sonic-cfg-help to handle nested container scenario. In case of nested container, the inner container name acts as key for the table. For e.g.
Previous output
New output
Work item tracking
How I did it
Fixing sonic-cfg-help tool to handle nested container
How to verify it
Added UT to verify it.
Which release branch to backport (provide reason below if selected)
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)