Skip to content

[Services] Restart BGP service upon unexpected critical process exit.#4207

Merged
jleveque merged 8 commits intosonic-net:masterfrom
yozhao101:autorestart_bgp_container
Mar 4, 2020
Merged

[Services] Restart BGP service upon unexpected critical process exit.#4207
jleveque merged 8 commits intosonic-net:masterfrom
yozhao101:autorestart_bgp_container

Conversation

@yozhao101
Copy link
Contributor

  • 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 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 commandkill -9 process_idto terminate one process.
    After exiting the container, you can use watch -n 1 docker ps to dynamically see the restart
    of database container.

critical processes crashed or exited unexpectedly.

Signed-off-by: Yong Zhao <[email protected]>
@yozhao101 yozhao101 requested a review from jleveque February 28, 2020 22:43
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

As part of this PR, can you also add the same support to the other BGP containers (docker-fpm-quagga, docker-fpm-gobgp)?

@yozhao101
Copy link
Contributor Author

Yes, I will add that.

of its processes crahsed or exited unexpectedly.

Signed-off-by: Yong Zhao <[email protected]>
of its critical processes crashed or exited unexpectedly.

Signed-off-by: Yong Zhao <[email protected]>
@yozhao101
Copy link
Contributor Author

@jleveque Please help me review these changes on gobgp and quagga.

rules/docker-fpm-quagga.mk and rules/docker-fpm-frr.mk.

Signed-off-by: Yong Zhao <[email protected]>
@jleveque jleveque merged commit 23ff55a into sonic-net:master Mar 4, 2020
pphuchar pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Mar 9, 2020
tiantianlv pushed a commit to SONIC-DEV/sonic-buildimage that referenced this pull request Apr 24, 2020
mssonicbld added a commit that referenced this pull request Feb 25, 2026
…lly (#25637)

#### Why I did it
src/sonic-swss
```
* dbe0768e - (HEAD -> master, origin/master, origin/HEAD) Fix the "Invalid BUFFER QUEUE" error (#4224) (6 hours ago) [saksarav-nokia]
* d29d7ea1 - This patch is to fix a major bug in the for loop of the function AclRange::remove. (#4256) (9 hours ago) [ashishalok-arista]
* 35288a65 - Fix performance issue in fpmsyncd for non-ZMQ configuration (#4219) (9 hours ago) [venkit-nexthop]
* 1c384fb6 - Merge pull request #4022 from ksravani-hcl/swss_1 (12 hours ago) [StephenWangGoogle]
|\ 
| failure_prs.log skip_prs.log 36d98d61 - Enable response pipeline for P4Orch. (22 hours ago) [mint570]
|/ 
* 63860664 - [build] Add docker-based build environment (#3715) (22 hours ago) [Lawrence Lee]
* 26ec7561 - [buffermgrd] Wait for lossless buffer profile to be applied to SAI (#4154) (23 hours ago) [ganglv]
* 599eae77 - [tunnel] use warning message when setting a create-only attribute (#4212) (27 hours ago) [Yakiv Huryk]
* ebf8c73f - [orchagent] Fix getopt string for -R option (ring_thread_enabled regression) (#4207) (27 hours ago) [Chiranjeevi U - MapleLabs]
* aa081017 - Avoid using an uninitialized source MAC address (#4201) (28 hours ago) [Andriy Yurkiv]
* 2a258c2 - Added mux neighbor_mode support with prefix-route (#4152) (31 hours ago) [manamand2020]
* 9616cd52 - [ci] Install redis from Debian (#4241) (34 hours ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog
FengPan-Frank pushed a commit to FengPan-Frank/sonic-buildimage that referenced this pull request Mar 6, 2026
…lly (sonic-net#25637)

#### Why I did it
src/sonic-swss
```
* dbe0768e - (HEAD -> master, origin/master, origin/HEAD) Fix the "Invalid BUFFER QUEUE" error (sonic-net#4224) (6 hours ago) [saksarav-nokia]
* d29d7ea1 - This patch is to fix a major bug in the for loop of the function AclRange::remove. (sonic-net#4256) (9 hours ago) [ashishalok-arista]
* 35288a65 - Fix performance issue in fpmsyncd for non-ZMQ configuration (sonic-net#4219) (9 hours ago) [venkit-nexthop]
* 1c384fb6 - Merge pull request sonic-net#4022 from ksravani-hcl/swss_1 (12 hours ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log 36d98d61 - Enable response pipeline for P4Orch. (22 hours ago) [mint570]
|/
* 63860664 - [build] Add docker-based build environment (sonic-net#3715) (22 hours ago) [Lawrence Lee]
* 26ec7561 - [buffermgrd] Wait for lossless buffer profile to be applied to SAI (sonic-net#4154) (23 hours ago) [ganglv]
* 599eae77 - [tunnel] use warning message when setting a create-only attribute (sonic-net#4212) (27 hours ago) [Yakiv Huryk]
* ebf8c73f - [orchagent] Fix getopt string for -R option (ring_thread_enabled regression) (sonic-net#4207) (27 hours ago) [Chiranjeevi U - MapleLabs]
* aa081017 - Avoid using an uninitialized source MAC address (sonic-net#4201) (28 hours ago) [Andriy Yurkiv]
* 2a258c2 - Added mux neighbor_mode support with prefix-route (sonic-net#4152) (31 hours ago) [manamand2020]
* 9616cd52 - [ci] Install redis from Debian (sonic-net#4241) (34 hours ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: Feng Pan <[email protected]>
dprital pushed a commit that referenced this pull request Mar 19, 2026
…lly (#25637)

#### Why I did it
src/sonic-swss
```
* dbe0768e - (HEAD -> master, origin/master, origin/HEAD) Fix the "Invalid BUFFER QUEUE" error (#4224) (6 hours ago) [saksarav-nokia]
* d29d7ea1 - This patch is to fix a major bug in the for loop of the function AclRange::remove. (#4256) (9 hours ago) [ashishalok-arista]
* 35288a65 - Fix performance issue in fpmsyncd for non-ZMQ configuration (#4219) (9 hours ago) [venkit-nexthop]
* 1c384fb6 - Merge pull request #4022 from ksravani-hcl/swss_1 (12 hours ago) [StephenWangGoogle]
|\
| failure_prs.log skip_prs.log 36d98d61 - Enable response pipeline for P4Orch. (22 hours ago) [mint570]
|/
* 63860664 - [build] Add docker-based build environment (#3715) (22 hours ago) [Lawrence Lee]
* 26ec7561 - [buffermgrd] Wait for lossless buffer profile to be applied to SAI (#4154) (23 hours ago) [ganglv]
* 599eae77 - [tunnel] use warning message when setting a create-only attribute (#4212) (27 hours ago) [Yakiv Huryk]
* ebf8c73f - [orchagent] Fix getopt string for -R option (ring_thread_enabled regression) (#4207) (27 hours ago) [Chiranjeevi U - MapleLabs]
* aa081017 - Avoid using an uninitialized source MAC address (#4201) (28 hours ago) [Andriy Yurkiv]
* 2a258c2 - Added mux neighbor_mode support with prefix-route (#4152) (31 hours ago) [manamand2020]
* 9616cd52 - [ci] Install redis from Debian (#4241) (34 hours ago) [Saikrishna Arcot]
```
#### How I did it
#### How to verify it
#### Description for the changelog

Signed-off-by: dprital <[email protected]>
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