Skip to content

[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.#4068
yozhao101 wants to merge 3 commits intosonic-net:masterfrom
yozhao101:autorestart_dhcprelay

Conversation

@yozhao101
Copy link
Contributor

  • 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.

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>
@lguohan
Copy link
Collaborator

lguohan commented Jan 26, 2020

retest this please

@yozhao101 yozhao101 requested a review from jleveque January 27, 2020 17:52
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.

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.

@yozhao101
Copy link
Contributor Author

@jleveque I am working it.

@yozhao101 yozhao101 closed this Jan 27, 2020
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants