Commit b514449
authored
[action] [PR:24393] Enhance supervisor-proc-exit-listener script to handle redis-communication failure case gracefully (#1842)
#### Why I did it
redis-server is considered as critical process in database container.
However, currently supervisor-proc-exit-listener will break if
redis-server exits. By design, supervisor-proc-exit-listener should
1. periodically logging a critical process is not running if container
auto_restart is disabled
2. kill the container if container auto_restart is enabled
This PR will help upervisor-proc-exit-listener achieve designed behavior
if redis-server exits
##### Work item tracking
- Microsoft ADO **(number only)**:
#### How I did it
#### How to verify it
Kill the redis-server process inside database container.
Observing logs:
```
2025 Oct 31 01:25:27.304563 sonic INFO database#supervisord 2025-10-31 01:25:27,303 WARN exited: redis (terminated by SIGKILL; not expected)
2025 Oct 31 01:25:28.309293 sonic WARNING database#supervisor-proc-exit-listener: Unable to retrieve features table from Config DB: Unable to connect to redis - Connection refused(1): Cannot assign requested address
2025 Oct 31 01:26:28.436837 sonic ERR database#supervisor-proc-exit-listener: Process 'redis' is not running in namespace 'host' (1.0 minutes).
2025 Oct 31 01:27:28.559959 sonic ERR database#supervisor-proc-exit-listener: Process 'redis' is not running in namespace 'host' (2.0 minutes).
```
#### Which release branch to backport (provide reason below if selected)
<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->
- [ ] 202205
- [ ] 202211
- [ ] 202305
- [ ] 202311
- [ ] 202405
- [ ] 202411
- [ ] 202505
#### Tested branch (Please provide the tested image version)
<!--
- Please provide tested image version
- e.g.
- [x] 20201231.100
-->
- [ ] <!-- image version 1 -->
- [ ] <!-- image version 2 -->
#### Description for the changelog
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog:
-->
<!--
Ensure to add label/tag for the feature raised. example - PR#2174 under
sonic-utilities repo. where, Generic Config and Update feature has been
labelled as GCU.
-->
#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md
-->
#### A picture of a cute animal (not mandatory but encouraged)1 parent ab01ef5 commit b514449
1 file changed
+13
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
101 | 106 | | |
102 | | - | |
103 | | - | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 111 | + | |
| 112 | + | |
114 | 113 | | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments