Skip to content
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

Add system warm-reboot check in WarmRestart class #246

Merged
merged 3 commits into from
Nov 8, 2018

Conversation

zhenggen-xu
Copy link
Contributor

@zhenggen-xu zhenggen-xu commented Nov 6, 2018

Add system warm-reboot check in WarmRestart class
UT test is also updated

Add the WarmRestart Class to python binding

@jipanyang
Copy link
Contributor

The change looks ok to me. What is the use case?
One possible issue is that, for processes in a docker which are experiencing warm restart, the flag doesn't completely identify whether it is a system warm reboot or a docker warm restart.

Ex. for swss docker restart, if the processes see system warm restart flag, it will do warm data reload. But seeing the flag enabled doesn't mean system level reboot is in progress, it may just be a docker warm restart.

@zhenggen-xu
Copy link
Contributor Author

This PR is for the system level warm reboot related processes. E,g, neighbor table restore during the system warm reboot. We will check the system level reboot flag and make distinction between pure docker warm restart and system level warm reboot.
C++/Python program will use this new lib function for checking instead of writing own functions. It will be part of another PR update shortly.

@zhenggen-xu
Copy link
Contributor Author

Also added the WarmRestart class to python binding

common/warm_restart.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok to me. please resolve other reviewers' comments.

Add flag for checkWarmStart to increase the restore count or not

Signed-off-by: Zhenggen Xu <[email protected]>
@zhenggen-xu
Copy link
Contributor Author

Done the renaming, also added a flag to increase the restore count or not.

@zhenggen-xu zhenggen-xu changed the title Add system warm-reboot check in WarmRetart class Add system warm-reboot check in WarmRestart class Nov 8, 2018
@lguohan lguohan merged commit 2a37c5c into sonic-net:master Nov 8, 2018
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.

4 participants