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

[memory_checker] Enhance the implementation with flexible memory checker. #8343

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yozhao101
Copy link
Contributor

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

Why I did it

This PR aims to enhance the implementation of high memory restart feature which will restart a container if the memory usage of it is continuously beyond the threshold.

Initially the memory threshold is passed as a parameter to the script memory_checker and high memory restart feature is by default enabled. However, the flexible way should be retrieving the high memory restart state and memory threshold of each container from Config_DB by memory_checker. Then the container will be restarted only if the high memory restart state is enabled and memory usage is continuously beyond the threshold.

How I did it

First I add two more fields in the FEATURE table for each container: high_mem_restart and mem_threshold. Then memory_checker invoked by Monit is changed to retrieve these two configuration fields from Config_DB. After that, memory_checker will move forward to do the checking.

How to verify it

I tested this change on DuT str-msn2700-20. But I will submit PR to enhance the implementation of pytest script.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • [ x] 202106

Description for the changelog

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

…ker.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…`init_cfg.json.j2`.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@yozhao101 yozhao101 requested a review from qiluo-msft August 5, 2021 16:26
@yozhao101 yozhao101 marked this pull request as ready for review August 5, 2021 16:26
@yozhao101 yozhao101 requested a review from lguohan as a code owner August 5, 2021 16:26
@yozhao101
Copy link
Contributor Author

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…-> 775.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
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

Successfully merging this pull request may close these issues.

1 participant