[sonic-mgmt] Fix test container_checker monit flaky issue. #21218
Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom Nov 13, 2025
Merged
Conversation
Collaborator
|
/azp run |
|
|
|
Azure Pipelines successfully started running 1 pipeline(s). |
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: aristanetworks/sonic-qual.msft#906
f9b5262 to
caa4ba8
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
hi @ZhaohuiS This could be a reference for flaky issue we are handling. |
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Nov 18, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Collaborator
|
Cherry-pick PR to 202505: #21337 |
11 tasks
mssonicbld
pushed a commit
that referenced
this pull request
Nov 18, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
vikumarks
pushed a commit
to vikumarks/sonic-mgmt
that referenced
this pull request
Dec 1, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: vikumarks <[email protected]>
albertovillarreal-keys
pushed a commit
to albertovillarreal-keys/sonic-mgmt
that referenced
this pull request
Dec 2, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Alberto Villarreal <[email protected]>
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: aristanetworks/sonic-qual.msft#906
Signed-off-by: opcoder0 <[email protected]>
dcaugher
pushed a commit
to dcaugher/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Dan Caugherty <[email protected]>
nissampa
pushed a commit
to nissampa/sonic-mgmt_dpu_test
that referenced
this pull request
Dec 9, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Nishanth Sampath Kumar <[email protected]>
selldinesh
pushed a commit
to selldinesh/sonic-mgmt
that referenced
this pull request
Dec 11, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: selldinesh <[email protected]>
echuawu
pushed a commit
to echuawu/sonic-mgmt
that referenced
this pull request
Dec 12, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
saravanan-nexthop
pushed a commit
to saravanan-nexthop/sonic-mgmt
that referenced
this pull request
Dec 15, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Saravanan <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
yifan-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Jan 14, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: YiFan Wang <[email protected]>
lakshmi-nexthop
pushed a commit
to lakshmi-nexthop/sonic-mgmt
that referenced
this pull request
Jan 28, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Lakshmi Yarramaneni <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Jan 29, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Yael Tzur <[email protected]>
abhishek-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Feb 6, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Feb 13, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Raghavendran Ramanathan <[email protected]>
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
…) (sonic-net#21579) [YangModel][asic_sensors] Add ASIC_SENSORS yang models
abhishek-nexthop
pushed a commit
to nexthop-ai/sonic-mgmt
that referenced
this pull request
Mar 17, 2026
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing
the following issues in pytest fixture "update_monit_service":
- fixing bug updating monit conf "/etc/monit/conf.d/sonic-host" for
container_checker periodicity.
(Currently the sed commands are updating the last line rule, which does not
correctly update the container_checker alert periodicity rule.)
- Adds wait_until after monit restart, to ensure tests are running when monit
is properly up.
related bug: https://github.com/aristanetworks/sonic-qual.msft/issues/906
Signed-off-by: Abhishek <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
These changes fix the sonic-mgmt test "container_checker.py" flaky issue by fixing the bugs found in pytest fixture "update_monit_service":
Fixes # 906
Type of change
Back port request
Approach
What is the motivation for this PR?
As per issue 906 test_container_checker test is flaky.
How did you do it?
It was found out from the failing vs passing logs that the flakiness is due to monit not alerting timely about the containers going down.
After code inspection it was found out that pytest fixture "update_monit_service" in test_container_checker.py was incorrectly updating the etc/monit/conf.d/sonic-host file before the test would begin.
The issue was tested to be resolved by :
How did you verify/test it?
Running the test test_container_checker multiple times with the changes to see pass at each time.
Any platform specific information?
N/A
Supported testbed topology if it's a new test case?
N/A
Documentation
N/A