-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Services] Restart Platform-monitor service upon unexpected critical process exit. #3689
Merged
Conversation
This file contains 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
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
in supervisord conf file. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
critical processes file into dockerfile.j2. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
platform-monitor if it attempts to restart this container more than 3 times in 20 minutes. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…CRIPT) into shared Makefile docker-platform-monitor.mk. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
jleveque
approved these changes
Nov 5, 2019
praveen-li
pushed a commit
to praveen-li/sonic-buildimage
that referenced
this pull request
Feb 9, 2021
…s exit. (sonic-net#3667) Signed-off-by: Yong Zhao <yozhao@microsoft.com> [Services] Restart Platform-monitor service upon unexpected critical process exit. (sonic-net#3689) Signed-off-by: Yong Zhao <yozhao@microsoft.com> Signed-off-by: Sangita Maity <sangitamaity0211@gmail.com> RB=2126600 G=lnos-reviewers R=pchaudha,pmao,vapatil,zxu A=zxu
mssonicbld
added a commit
that referenced
this pull request
Dec 23, 2024
…atically (#21194) #### Why I did it src/sonic-utilities ``` * 2f8508f1 - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (#3689) (3 days ago) [xwjiang-ms] * 5481d0ef - Optimize techsupport reducing number of vtysh calls in scale sceario (#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam] * 7e2e59c5 - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (#3672) (5 days ago) [Changrong Wu] * d85e1db3 - Disable routeCheck monit as part of config reload/minigraph stop service and enable it back as part of service start. (#3682) (6 days ago) [abdosi] * 139983ad - platform/marvell renaming to platform/marvell-prestera (#3622) (6 days ago) [krismarvell] * e3991d54 - Add scope to field validator. (#3675) (7 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
…atically (sonic-net#21194) #### Why I did it src/sonic-utilities ``` * 2f8508f1 - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (sonic-net#3689) (3 days ago) [xwjiang-ms] * 5481d0ef - Optimize techsupport reducing number of vtysh calls in scale sceario (sonic-net#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam] * 7e2e59c5 - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (sonic-net#3672) (5 days ago) [Changrong Wu] * d85e1db3 - Disable routeCheck monit as part of config reload/minigraph stop service and enable it back as part of service start. (sonic-net#3682) (6 days ago) [abdosi] * 139983ad - platform/marvell renaming to platform/marvell-prestera (sonic-net#3622) (6 days ago) [krismarvell] * e3991d54 - Add scope to field validator. (sonic-net#3675) (7 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
…atically (sonic-net#21194) #### Why I did it src/sonic-utilities ``` * 2f8508f1 - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (sonic-net#3689) (3 days ago) [xwjiang-ms] * 5481d0ef - Optimize techsupport reducing number of vtysh calls in scale sceario (sonic-net#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam] * 7e2e59c5 - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (sonic-net#3672) (5 days ago) [Changrong Wu] * d85e1db3 - Disable routeCheck monit as part of config reload/minigraph stop service and enable it back as part of service start. (sonic-net#3682) (6 days ago) [abdosi] * 139983ad - platform/marvell renaming to platform/marvell-prestera (sonic-net#3622) (6 days ago) [krismarvell] * e3991d54 - Add scope to field validator. (sonic-net#3675) (7 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog
github-actions bot
pushed a commit
to bradh352/sonic-buildimage
that referenced
this pull request
Jan 2, 2025
…atically (sonic-net#21194) #### Why I did it src/sonic-utilities ``` * 2f8508f1 - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (sonic-net#3689) (3 days ago) [xwjiang-ms] * 5481d0ef - Optimize techsupport reducing number of vtysh calls in scale sceario (sonic-net#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam] * 7e2e59c5 - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (sonic-net#3672) (5 days ago) [Changrong Wu] * d85e1db3 - Disable routeCheck monit as part of config reload/minigraph stop service and enable it back as part of service start. (sonic-net#3682) (6 days ago) [abdosi] * 139983ad - platform/marvell renaming to platform/marvell-prestera (sonic-net#3622) (6 days ago) [krismarvell] * e3991d54 - Add scope to field validator. (sonic-net#3675) (7 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog
VladimirKuk
pushed a commit
to Marvell-switching/sonic-buildimage
that referenced
this pull request
Jan 21, 2025
…atically (sonic-net#21194) #### Why I did it src/sonic-utilities ``` * 2f8508f1 - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (sonic-net#3689) (3 days ago) [xwjiang-ms] * 5481d0ef - Optimize techsupport reducing number of vtysh calls in scale sceario (sonic-net#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam] * 7e2e59c5 - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (sonic-net#3672) (5 days ago) [Changrong Wu] * d85e1db3 - Disable routeCheck monit as part of config reload/minigraph stop service and enable it back as part of service start. (sonic-net#3682) (6 days ago) [abdosi] * 139983ad - platform/marvell renaming to platform/marvell-prestera (sonic-net#3622) (6 days ago) [krismarvell] * e3991d54 - Add scope to field validator. (sonic-net#3675) (7 days ago) [Xincun Li] ``` #### How I did it #### How to verify it #### Description for the changelog
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.
Restart Platform-monitor service if one of critical processes running in Platform-monitor container exited or crashed abnormally.
Generally I follow the framework created by Joe to implement this feature in Platform-monitor container.
First, add supervisor-proc-exit-listener event listener option in Supervisord configuration file in Platform-monitor docker container. Supervisord will read a list of critical processes for which to monitor the unexpected crashed and exited.
Second, configure Platform-monitor.service to always auto-restart the service if it stops, with a delay of 30 seconds. Also set a rate limit of 3 restarts within 20 minutes (1200 seconds).
On your switch device, please use docker ps command to list all running docker containers.
Then use docker exec -it container_id bash to login target container. Typing top command
on the shell will display all the processes dynamically and you will spot the process id of one
of the critical processes. Finally type the command kill -9 process_id to terminate one process.
After exiting the container, you can use watch -n 1 docker ps to dynamically see the restart
of Platform-monitor container.