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

Fix get_monit_services_status logic #16013

Conversation

deepak-singhal0408
Copy link
Contributor

Description of PR

Summary:
Fix the logic to parse "sudo monit status" output in get_monit_services_status()

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

The current logic simply checks for the keyword "status" in service_info without considering the context. If the keyword appears in 'last output' or another unintended section of the data, the logic misinterprets it.

How did you do it?

Ensuring "status" detection is specific to the intended line. Using a stricter parsing approach to avoid unintended matches.

How did you verify/test it?

Ran the test_pretest.py on kvm-t0 testbed. Captured the get_monit_services_status() output

Any platform specific information?

NA

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

@deepak-singhal0408 deepak-singhal0408 self-assigned this Dec 11, 2024
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@deepak-singhal0408
Copy link
Contributor Author

MSFT ADO: 30481994

@deepak-singhal0408
Copy link
Contributor Author

@rlhui @arlakshm could you please help merge this PR?
This PR is needed for the speed_up_route_check PR to get in.. More details in MSFT ADO.

@arlakshm arlakshm merged commit 4aa835e into sonic-net:master Dec 11, 2024
18 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Dec 11, 2024
What is the motivation for this PR?
The current logic simply checks for the keyword "status" in service_info without considering the context. If the keyword appears in 'last output' or another unintended section of the data, the logic misinterprets it.

How did you do it?
Ensuring "status" detection is specific to the intended line. Using a stricter parsing approach to avoid unintended matches.

How did you verify/test it?
Ran the test_pretest.py on kvm-t0 testbed. Captured the get_monit_services_status() output
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #16024

mssonicbld pushed a commit that referenced this pull request Dec 12, 2024
What is the motivation for this PR?
The current logic simply checks for the keyword "status" in service_info without considering the context. If the keyword appears in 'last output' or another unintended section of the data, the logic misinterprets it.

How did you do it?
Ensuring "status" detection is specific to the intended line. Using a stricter parsing approach to avoid unintended matches.

How did you verify/test it?
Ran the test_pretest.py on kvm-t0 testbed. Captured the get_monit_services_status() output
rlhui pushed a commit to sonic-net/sonic-utilities that referenced this pull request Dec 13, 2024
This PR fixes sonic-net/sonic-buildimage#18773 and sonic-net/sonic-buildimage#20648

Note: resubmitting the Old PR #3544 (with minor cosmetic changes). The original PR was reverted due to PR check failure. The failure has been root caused and fixed via sonic-net/sonic-mgmt#16013

How I did it
Parallely execute route_check on each Asic.
Parallelly fetch ipv4 routes and ipv6 routes.
abdosi pushed a commit to sonic-net/sonic-utilities that referenced this pull request Dec 15, 2024
This PR fixes sonic-net/sonic-buildimage#18773 and sonic-net/sonic-buildimage#20648

Note: resubmitting the PR. The original PR was reverted due to PR check failure. The failure has been root caused and fixed via sonic-net/sonic-mgmt#16013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants