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

make sure only syncd is match on pgrep #1708

Merged
merged 1 commit into from
May 31, 2020

Conversation

abdosi
Copy link
Contributor

@abdosi abdosi commented May 29, 2020

make sure only syncd is match on pgrep. Without this even /usr/bin/syncd.sh were getting O/P of pgrep command making test case case fail as we expect no O/P once syncd is terminated.

Fix for Issue sonic-net/sonic-buildimage#4127

Fix is to use -x option of pgrep to exact match on syncd.
-x, --exact
Only match processes whose names (or command line if -f is specified) exactly match the pattern.

Verified Manually syncd process gets terminated with no core.
also run testcase "restart_syncd"

make sure only syncd is match on pgrep
@abdosi
Copy link
Contributor Author

abdosi commented May 30, 2020

@yxieca Can you please review/approve.

@lguohan
Copy link
Contributor

lguohan commented May 30, 2020

what is '-x' can you explain how you did it?

@abdosi
Copy link
Contributor Author

abdosi commented May 30, 2020

what is '-x' can you explain how you did it?

@lguohan

Fix is to use -x option of pgrep to exact match on syncd. From man pgrep
-x, --exact
Only match processes whose names (or command line if -f is specified) exactly match the pattern.

@abdosi abdosi merged commit 90351bb into sonic-net:master May 31, 2020
@abdosi abdosi deleted the fix_restart_syncd branch May 31, 2020 00:52
yxieca pushed a commit that referenced this pull request Jun 2, 2020
make sure only syncd is match on pgrep
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.

3 participants