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

[auto-ts] add memory check #2116

Merged
merged 12 commits into from
May 14, 2022
Merged

Conversation

stepanblyschak
Copy link
Contributor

What I did

Implemented memory threashold check in auto techsupport feature according to sonic-net/SONiC#939.

How I did it

Added two scripts. The check script and the handler script. Few modifications made in auto tech implementation. UT added.

How to verify it

Run the action script and the handler script on the switch. Run UT.

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)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@vivekrnv
Copy link
Contributor

vivekrnv commented Apr 4, 2022

@stepanblyschak, This PR #2114 already addresses handling the techsupport exit codes such for locking.

Please update this PR accordingly

…o auto-ts-mem

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@stepanblyschak, This PR #2114 already addresses handling the techsupport exit codes such for locking.

Please update this PR accordingly

@stepanblyschak could you confirm this is done?
@vivekreddynv could you please review/approve this PR from your side?

@stepanblyschak
Copy link
Contributor Author

@liat-grozovik Yes

vivekrnv
vivekrnv previously approved these changes Apr 26, 2022
@qiluo-msft qiluo-msft requested a review from ganglyu May 11, 2022 17:46
Returns:
(bool, str)
"""
# don't bother getting stats if availbale threshold is set to 0
Copy link
Contributor

@ganglyu ganglyu May 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

availbale? typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

memory_threshold_check = load_module_from_source('memory_threshold_check.py', memory_threshold_check_path)

@pytest.fixture()
def case_1():
Copy link
Contributor

@ganglyu ganglyu May 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is case_1? Could you please use a meaningful name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed fixtures

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@liat-grozovik liat-grozovik merged commit aa81b97 into sonic-net:master May 14, 2022
dprital added a commit to dprital/sonic-buildimage that referenced this pull request May 25, 2022
Update sonic-utilities submodule pointer to include the following:
* [GCU] Handling type1 lists ([sonic-net#2171](sonic-net/sonic-utilities#2171))
* [yang] extend ConfigMgmt constructor to pass YANG options ([sonic-net#2118](sonic-net/sonic-utilities#2118))
* [dump] implement ACL modules ([sonic-net#2153](sonic-net/sonic-utilities#2153))
* show commands for SYSTEM READY ([sonic-net#1851](sonic-net/sonic-utilities#1851))
* [GCU] Handling non-compliant leaf-list with string values ([sonic-net#2174](sonic-net/sonic-utilities#2174))
* Add sonic-delayed.target to Application Extension .timer file generator ([sonic-net#2176](sonic-net/sonic-utilities#2176))
* [portconfig] Allow to configure interface mtu for physical ports ([#l](https://github.com/Azure/sonic-utilities/pull/l))
* Broadcast Unknown-multicast and Unknown-unicast Storm-control  ([sonic-net#928](sonic-net/sonic-utilities#928))
* sonic-utils: initial support for link-training ([sonic-net#2071](sonic-net/sonic-utilities#2071))
* [portchannel] Added ACL/PBH binding checks to the port before getting added to portchannel ([sonic-net#2151](sonic-net/sonic-utilities#2151))
* Modify override testcase to cover PORT admin_status ([sonic-net#2165](sonic-net/sonic-utilities#2165))
* [GCU] Validate peer_group_range ip_range are correct ([sonic-net#2145](sonic-net/sonic-utilities#2145))
* [auto-ts] add memory check ([sonic-net#2116](sonic-net/sonic-utilities#2116))
* support new interface types CR8/SR8/KR8/LR8 which are brougnt by SAI V.1.10.2 ([sonic-net#2167](sonic-net/sonic-utilities#2167))
* [scripts/fast-reboot] Add option to include ssd-upgrader-part boot option with SONiC partition ([sonic-net#2150](sonic-net/sonic-utilities#2150))
* [config reload] Fix invalid rstrip. ([sonic-net#2157](sonic-net/sonic-utilities#2157))
* Accept 0 for queue and dscp ([sonic-net#2162](sonic-net/sonic-utilities#2162))

Signed-off-by: dprital <drorp@nvidia.com>
qiluo-msft pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 20, 2022
#### Why I did it

To support automatic techsupport invokation in case memory usage is too high.

#### How I did it

Implemented according to sonic-net/SONiC#939

#### How to verify it

UT, manual test on the switch.

*DEPENDS* on sonic-net/sonic-utilities#2116
liat-grozovik pushed a commit that referenced this pull request Oct 2, 2022
Backport of #2116

- What I did
Implemented memory threashold check in auto techsupport feature according to sonic-net/SONiC#939.

- How I did it
Added two scripts. The check script and the handler script. Few modifications made in auto tech implementation. UT added.

- How to verify it
Run the action script and the handler script on the switch. Run UT.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Oct 3, 2022
#### Why I did it

To support automatic techsupport invokation in case memory usage is too high.

#### How I did it

Implemented according to sonic-net/SONiC#939

#### How to verify it

UT, manual test on the switch.

*DEPENDS* on sonic-net/sonic-utilities#2116
stepanblyschak added a commit to stepanblyschak/sonic-buildimage that referenced this pull request Oct 6, 2022
#### Why I did it

To support automatic techsupport invokation in case memory usage is too high.

#### How I did it

Implemented according to sonic-net/SONiC#939

#### How to verify it

UT, manual test on the switch.

*DEPENDS* on sonic-net/sonic-utilities#2116
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Oct 6, 2022
#### Why I did it

To support automatic techsupport invokation in case memory usage is too high.

#### How I did it

Implemented according to sonic-net/SONiC#939

#### How to verify it

UT, manual test on the switch.

*DEPENDS* on sonic-net/sonic-utilities#2116
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.

6 participants