Skip to content

[show/config] The subcommands related to features of high memory restart and memory threshold. - #1738

Closed
yozhao101 wants to merge 3 commits into
sonic-net:masterfrom
yozhao101:config_high_mem_restart
Closed

yozhao101 wants to merge 3 commits into
sonic-net:masterfrom
yozhao101:config_high_mem_restart

Conversation

@yozhao101

@yozhao101 yozhao101 commented Aug 2, 2021 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Yong Zhao yozhao@microsoft.com

What I did

This PR aims to implement the subcommands of show/config which can help users configure the status of high memory restart and memory threshold of a specific container.

How I did it

I implemented two functions in config/feature.py and show/feature.py files separately according to the following logic:

  • Check whether the container is configured in the FEATURE table of CONFIG_DB
  • Check whether the high_mem_restart or mem_threshold field exists in configuration of the container
  • Get or update the value of high_mem_restart or mem_threshold field which was provided by user

How to verify it

I tested this implementation on DuT str-msn2700-01.

Test result of Unit Test:

        test/feature_test.py::TestFeature::test_show_feature_status_no_kube_status PASSED                                                                               
        tests/feature_test.py::TestFeature::test_show_feature_status PASSED                                                                                              
        tests/feature_test.py::TestFeature::test_show_feature_config PASSED                                                                                             
        tests/feature_test.py::TestFeature::test_show_feature_status_abbrev_cmd PASSED                                                                                 
        tests/feature_test.py::TestFeature::test_show_bgp_feature_status PASSED                                                                                         
        tests/feature_test.py::TestFeature::test_show_unknown_feature_status PASSED                                                                                     
        tests/feature_test.py::TestFeature::test_show_feature_autorestart PASSED                                                                                         
        tests/feature_test.py::TestFeature::test_fail_autorestart PASSED                                                                                                 
        tests/feature_test.py::TestFeature::test_show_bgp_autorestart_status PASSED                                                                                      
        tests/feature_test.py::TestFeature::test_show_unknown_autorestart_status PASSED                                                                                  
        tests/feature_test.py::TestFeature::test_config_bgp_feature_state PASSED                                                                                         
        tests/feature_test.py::TestFeature::test_config_snmp_feature_owner PASSED                                                                                        
        tests/feature_test.py::TestFeature::test_config_unknown_feature_owner PASSED                                                                                     
        tests/feature_test.py::TestFeature::test_config_snmp_feature_fallback PASSED                                                                                     
        tests/feature_test.py::TestFeature::test_config_bgp_autorestart PASSED                                                                                           
        tests/feature_test.py::TestFeature::test_config_database_feature_state PASSED                                                                                    
        tests/feature_test.py::TestFeature::test_config_database_feature_autorestart PASSED                                                                              
        tests/feature_test.py::TestFeature::test_config_unknown_feature PASSED                                                                                           
        tests/feature_test.py::TestFeature::test_config_lldp_feature_high_mem_restart PASSED                                                                             
        tests/feature_test.py::TestFeature::test_config_lldp_feature_mem_threshold PASSED                                                                                
        tests/feature_test.py::TestFeatureMultiAsic::test_config_bgp_feature_inconsistent_state PASSED                                                                   
        tests/feature_test.py::TestFeatureMultiAsic::test_config_bgp_feature_inconsistent_autorestart PASSED                                                             
        tests/feature_test.py::TestFeatureMultiAsic::test_config_bgp_feature_consistent_state PASSED                                                                     
        tests/feature_test.py::TestFeatureMultiAsic::test_config_bgp_feature_consistent_autorestart PASSED                                                              

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

…memory

restart status and memory threshold of a container.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…st cases.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@yozhao101 yozhao101 changed the title [config] Enable/disable high memory restart and set memory threshold of a container [show/config] The subcommands related to features of high memory restart and memory threshold. Aug 4, 2021
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@yozhao101
yozhao101 requested a review from qiluo-msft August 5, 2021 16:29
@yozhao101
yozhao101 marked this pull request as ready for review August 5, 2021 16:29
@yozhao101

Copy link
Copy Markdown
Contributor Author

/Azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 365 days. It will be closed in 14 days if no further activity occurs.

If this PR is still relevant, please leave a comment or push a new commit — this will reset the inactivity timer.

Important: before this PR can be merged it must be rebased onto the latest master. After a year of inactivity it is almost certainly out of date and will not build or merge cleanly against the current tree. Please rebase, resolve any conflicts, and force-push so CI can re-run against current master; a PR that cannot be rebased cleanly will not be merged.

If you believe this PR should remain open regardless of activity, add the never-stale label.

Thank you for your contribution to SONiC!

@github-actions github-actions Bot added the stale label Aug 29, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been closed due to inactivity (no updates in over 1 year). If you would like to continue this work, please re-open the PR or submit a new one rebased onto the latest master.

Thank you for your contribution to SONiC!

@github-actions github-actions Bot closed this Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant