-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Service] Enable/disable container auto-restart based on configuration. #4073
Conversation
of auto-restart feature from database and then decide whether to enable/disable this feature. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…ame to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…er bgp and event listener will monitor these critical processes and if one of them exited, the event listener will restart this container based on the configuration flag set in database. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
container name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
container name to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
container name as parameter to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
name as parameter to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
container name as parameter to event listener. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the BGP container changes from this PR, and submit them as a separate PR, with the new flag being passed to the event listener script.
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Signed-off-by: Yong Zhao <yozhao@microsoft.com>
…le is not found in config db and container name is not found in the table. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Retest vsimage please. |
Retest vsimage please |
4 similar comments
Retest vsimage please |
Retest vsimage please |
Retest vsimage please |
Retest vsimage please |
file. Signed-off-by: Yong Zhao <yozhao@microsoft.com>
Retest vsimage please. |
Retest vsimage please |
Retest vs please |
Retest vsimage please |
1 similar comment
Retest vsimage please |
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 all containers 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 all containers. 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.