-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Services] Restart BGP service upon unexpected critical process exit #3632
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
Conversation
…l processes list into dockerfile. Signed-off-by: Yong Zhao <[email protected]>
Signed-off-by: Yong Zhao <[email protected]>
…pervisord conf file. Signed-off-by: Yong Zhao <[email protected]>
…pts to restart this container more than 3 times in 20 minutes. Signed-off-by: Yong Zhao <[email protected]>
…red Makefile docker-fpm-frr.mk. Signed-off-by: Yong Zhao <[email protected]>
Retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikos-github , I have concerns on PR #3486 exactly because this reason. We do want to have a unified mechanism to manage process restart. I do not agree that PR 3486 should be merged first. I suggest to find different approach to address watchfrr issue or integrated mode issue. It is frr issue, not sonic issue. |
@lguohan We need to have a technical reason for requesting a unified approach. You haven't presented one and there isn't one. #3486 will address what this PR is trying to do for the frr services. Your concern is unfounded and isn't backed up/driven by data. More importantly, routing application should be driven independently and not have tight coupling to how sonic is managed - today it's frr, tomorrow it may be some other routing stack. Your proposal doesn't allow alternative routing stacks to easily come in as plug-and-play into sonic. I am also concerned that we are so easily dismissing the issues we have reported and overall we are refusing to address them for the community while at the same time so casually removing without proper review, functionality that existed in sonic. |
@@ -0,0 +1,5 @@ | |||
zebra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of restarting the whole docker, shouldn't zebra be restarted alone? Fpmsyncd can start the reconciliation with app-db when it reconnects to zebra.
What I did
Restart BGP service if one of critical processes running in BGP container exited or crashed abnormally.
How I did it
Generally I follow the framework created by Joe to implement this feature in BGP container.
First, add supervisor-proc-exit-listener event listener option in Supervisord configuration file in BGP Docker container. Supervisord will read a list of critical processes for which to monitor the unexpected crashed and exited.
Second, configure bgp.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).
How to verify it
On your switch device, please use docker ps command to list all running docker containers.
Then use docker exec -it container_id /bin/bash to login your 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 kill one process.
After exiting the container, you can use watch -n 1 docker ps to dynamically see the restart
of BGP container.