[DHCP_Relay] Enable/disable container auto-restart based on configuration.#4068
Closed
yozhao101 wants to merge 3 commits intosonic-net:masterfrom
yozhao101:autorestart_dhcprelay
Closed
[DHCP_Relay] Enable/disable container auto-restart based on configuration.#4068yozhao101 wants to merge 3 commits intosonic-net:masterfrom yozhao101:autorestart_dhcprelay
yozhao101 wants to merge 3 commits intosonic-net:masterfrom
yozhao101:autorestart_dhcprelay
Conversation
current local directory. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
flag of auto-restart feature from database and then decide whether to enable/disable this feature. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
makefile. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Collaborator
|
retest this please |
jleveque
suggested changes
Jan 27, 2020
Contributor
jleveque
left a comment
There was a problem hiding this comment.
Please try the alternative solution, adding a --container-name parameter to the shared event listener script. If it works, you can close all of these related PRs and open one PR which covers all containers.
Contributor
Author
|
@jleveque I am working it. |
mssonicbld
added a commit
that referenced
this pull request
Dec 21, 2025
…lly (#24914) #### Why I did it src/sonic-swss ``` * dd9cf3d7 - (HEAD -> master, origin/master, origin/HEAD) [orchagent] Event-based Retry Strategy (#3699) (27 hours ago) [Yijiao Qin] * 9d38663e - [chassis] Fixed bug in Fabric monitor capacity (#4057) (30 hours ago) [saksarav-nokia] * 8aca780a - [ssw][ha] add ACTION_COUNTER to acl table type (#4068) (34 hours ago) [Jing Zhang] * 8e0a0e7d - Use the correct slave container for the branch (#4074) (34 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog
xwjiang-ms
pushed a commit
to xwjiang-ms/sonic-buildimage
that referenced
this pull request
Dec 22, 2025
…lly (sonic-net#24914) #### Why I did it src/sonic-swss ``` * dd9cf3d - (HEAD -> master, origin/master, origin/HEAD) [orchagent] Event-based Retry Strategy (sonic-net#3699) (27 hours ago) [Yijiao Qin] * 9d38663 - [chassis] Fixed bug in Fabric monitor capacity (sonic-net#4057) (30 hours ago) [saksarav-nokia] * 8aca780 - [ssw][ha] add ACTION_COUNTER to acl table type (sonic-net#4068) (34 hours ago) [Jing Zhang] * 8e0a0e7 - Use the correct slave container for the branch (sonic-net#4074) (34 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: xiaweijiang <xiaweijiang@microsoft.com>
jasonbridges
pushed a commit
to jasonbridges/sonic-buildimage
that referenced
this pull request
Jan 22, 2026
…lly (sonic-net#24914) #### Why I did it src/sonic-swss ``` * dd9cf3d - (HEAD -> master, origin/master, origin/HEAD) [orchagent] Event-based Retry Strategy (sonic-net#3699) (27 hours ago) [Yijiao Qin] * 9d38663 - [chassis] Fixed bug in Fabric monitor capacity (sonic-net#4057) (30 hours ago) [saksarav-nokia] * 8aca780 - [ssw][ha] add ACTION_COUNTER to acl table type (sonic-net#4068) (34 hours ago) [Jing Zhang] * 8e0a0e7 - Use the correct slave container for the branch (sonic-net#4074) (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#24914) #### Why I did it src/sonic-swss ``` * dd9cf3d - (HEAD -> master, origin/master, origin/HEAD) [orchagent] Event-based Retry Strategy (sonic-net#3699) (27 hours ago) [Yijiao Qin] * 9d38663 - [chassis] Fixed bug in Fabric monitor capacity (sonic-net#4057) (30 hours ago) [saksarav-nokia] * 8aca780 - [ssw][ha] add ACTION_COUNTER to acl table type (sonic-net#4068) (34 hours ago) [Jing Zhang] * 8e0a0e7 - Use the correct slave container for the branch (sonic-net#4074) (34 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: Feng Pan <fenpan@microsoft.com>
dprital
pushed a commit
that referenced
this pull request
Mar 19, 2026
…lly (#24914) #### Why I did it src/sonic-swss ``` * dd9cf3d - (HEAD -> master, origin/master, origin/HEAD) [orchagent] Event-based Retry Strategy (#3699) (27 hours ago) [Yijiao Qin] * 9d38663 - [chassis] Fixed bug in Fabric monitor capacity (#4057) (30 hours ago) [saksarav-nokia] * 8aca780 - [ssw][ha] add ACTION_COUNTER to acl table type (#4068) (34 hours ago) [Jing Zhang] * 8e0a0e7 - Use the correct slave container for the branch (#4074) (34 hours ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog Signed-off-by: dprital <drorp@nvidia.com>
This file contains hidden or 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
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.
What I did
Currently we already have the auto-restart features for each docker container. That means if a critical
process exited abnormally or crashed, this event will be captured and then the corresponding
container will be restarted. Right now, we want to add a knob/switch for this feature in dhcp_relay such that the developer can dynamically turn on/off it during testing new docker images.
How I did it
We will create a table in the database container. In this table, we store the current state of
auto-restart feature for dhcp_relay. Initially, the state of this feature will be enabled.
The event listener will dynamically read the state from database container and then decide whether
restart the container based on it once receive the event showing a critical process exited.
The user can use the existing interface (TBD) to modify this state from enabled to disabled or
vice versa.
How to verify it
I manually created a table in the database container called CONTAINER_FEATURE. In this table, each
container will have its corresponding state row such as the initial state of auto-restart for dhcp_relay is in the 'enabled' status.