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] Retrieves high memory alert status and memory threshold from CONFIG_DB #11312

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

Conversation

yozhao101
Copy link
Contributor

@yozhao101 yozhao101 commented Jul 2, 2022

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

Why I did it

This PR aims to propose a feature of high memory alerting on containers in SONiC. The design is: sonic-net/SONiC#1016. PR to implement the CLI is: sonic-net/sonic-utilities#2243.

How I did it

I added a Monit configuration file for each container. Meanwhile, memory_checker will read high memory alerting status and memory threshold of each container from CONFIG_DB. The memory threshold of each container will be initialized in init_cfg.json.j2 file.

How to verify it

I verfied this change on a lab device and will also have sonic-mgmt test cases to do fully testing of this mechanism.

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

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

Description for the changelog

Link to config_db schema for YANG module changes

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

yozhao101 added 2 commits July 1, 2022 18:04
of each container from `CONFIG_DB`.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
add syslog statement in `memory_checker`.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@yozhao101
Copy link
Contributor Author

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yozhao101
Copy link
Contributor Author

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

yozhao101 added 4 commits July 8, 2022 14:03
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
yozhao101 added 5 commits July 8, 2022 22:46
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@xumia
Copy link
Collaborator

xumia commented Jul 11, 2022

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…onfig file.

Signed-off-by: Yong Zhao <yozhao@microsoft.com>
@yozhao101 yozhao101 marked this pull request as ready for review July 15, 2022 23:20
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.

2 participants