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

Threshold feature Orch changes. #1067

Closed
wants to merge 10 commits into from
Closed

Conversation

shdasari
Copy link

@shdasari shdasari commented Sep 21, 2019

What I did
Implemented the threshold feature orch.

Why I did it
Threshold feature brings in support to configure thresholds on a port's PG/queue's buffer usage stat. When the buffer usage crosses the configured threshold, a breach is generated. This PR brings in the orch changes for the threshold feature.

How I verified it
Pytests in tests/test_threshold.py validate the orch changes.

Details if related
Please refer to sonic-net/SONiC@3962074#diff-8c1cef396dfe5dd465889eb11be4106c for the threshold feature HLD.

Depends upon:
sonic-net/sonic-swss-common#310
sonic-net/sonic-utilities#665
Azure/sonic-tam#12
sonic-net/sonic-buildimage#3501

}

/* Create TAM collector object */
/* Create TAM collector object */
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unwanted code

Copy link
Author

Choose a reason for hiding this comment

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

Done, have updated latest diff.

orchagent/thresholdorch.cpp Show resolved Hide resolved
AshokDaparthi
AshokDaparthi previously approved these changes Nov 27, 2019
@shdasari
Copy link
Author

shdasari commented Feb 4, 2021

Changes being tracked via #1545.

oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
In azp run, the following failure always happens at the stage of `make check` of building syncd. 

```
Making check in syncd
make[2]: Entering directory '/__w/1/s/syncd'
make check-TESTS
make[3]: Entering directory '/__w/1/s/syncd'
tests: tests.cpp:843: void test_watchdog_timer_clock_rollback(): Assertion `settimeofday(&currentTime, NULL) == 0' failed.
/bin/bash: line 5: 13004 Aborted (core dumped) ${dir}$tst
FAIL: tests
```
The execution of `settimeofday(&currentTime, NULL)` fails in slave docker with errno **EPERM**, because CAP_SYS_TIME capability is dropped in docker. Using option `--privileged` gives docker extended privileges for its success.

This failure has existed for a long time in azp build and is not exposed till sonic-net/sonic-sairedis#1050.
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
…net#1068)

The fix sonic-net#1067 is not enough. If docker user is non-root, set capability CAP_SYS_TIME for settimeofday success in syncd test, then test_watchdog_timer_clock_rollback can be run.

Co-authored-by: junhuazhai <junhuazhai@contoso.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.

2 participants