Skip to content

[Services] Restart Platform-monitor service upon unexpected critical process exit.#3689

Merged
jleveque merged 5 commits intosonic-net:masterfrom
yozhao101:Restart_Pmon
Nov 5, 2019
Merged

[Services] Restart Platform-monitor service upon unexpected critical process exit.#3689
jleveque merged 5 commits intosonic-net:masterfrom
yozhao101:Restart_Pmon

Conversation

@yozhao101
Copy link
Copy Markdown
Contributor

  • What I did
    Restart Platform-monitor service if one of critical processes running in Platform-monitor container exited or crashed abnormally.
  • How I did it
    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).
  • 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 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.

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>
@yozhao101 yozhao101 marked this pull request as ready for review November 1, 2019 23:14
@yozhao101 yozhao101 requested a review from jleveque November 1, 2019 23:15
@jleveque jleveque merged commit 4fa3a1e into sonic-net:master 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
```
* 2f8508f - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (#3689) (3 days ago) [xwjiang-ms]
* 5481d0e - Optimize techsupport reducing number of vtysh calls in scale sceario (#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam]
* 7e2e59c - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (#3672) (5 days ago) [Changrong Wu]
* d85e1db - 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]
* 139983a - platform/marvell renaming to platform/marvell-prestera (#3622) (6 days ago) [krismarvell]
* e3991d5 - Add scope to field validator. (#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
```
* 2f8508f - (HEAD -> master, origin/master, origin/HEAD) Revert PR: Add scope to field validator (sonic-net#3689) (3 days ago) [xwjiang-ms]
* 5481d0e - Optimize techsupport reducing number of vtysh calls in scale sceario (sonic-net#3605) (5 days ago) [Sudharsan Dhamal Gopalarathnam]
* 7e2e59c - add sonic_asic_platform in the render context when rendering docker_image_ctl.j2 (sonic-net#3672) (5 days ago) [Changrong Wu]
* d85e1db - 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]
* 139983a - platform/marvell renaming to platform/marvell-prestera (sonic-net#3622) (6 days ago) [krismarvell]
* e3991d5 - 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
mssonicbld added a commit that referenced this pull request Jun 7, 2025
…lly (#22880)

#### Why I did it
src/sonic-swss
```
* 91bbfb2c - (HEAD -> 202505, origin/202505) [muxorch] Catch error when checking active state of missing neighbor (#3689) (10 hours ago) [mssonicbld]
* 119bd9d2 - [SRv6] add MySID counters support (#3684) (19 hours ago) [mssonicbld]
* 9c860b1a - [swss]: IcmpOrch to support ICMP session offload to ASIC (#3685) (19 hours ago) [mssonicbld]
```
#### 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants