-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Warm reboot: Don't load json conifg like copp, ininip, ports and switch again upon… #1939
Changes from 1 commit
294a2a7
3aca62d
63baa3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,18 @@ fast_reboot | |
|
||
HWSKU=`sonic-cfggen -d -v "DEVICE_METADATA['localhost']['hwsku']"` | ||
|
||
# Don't load json config if system warm start or | ||
# swss docker warm start is enabled, the data already exists in appDB. | ||
WARM_START=`redis-cli -n 4 hget "WARM_RESTART|system" enable` | ||
if [ "$WARM_START" == "true" ]; then | ||
exit 0 | ||
fi | ||
|
||
WARM_START=`redis-cli -n 4 hget "WARM_RESTART|swss" enable` | ||
if [ "$WARM_START" == "true" ]; then | ||
exit 0 | ||
fi | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what if we have modified any of the json? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good question. At restore phase, you get whatever the previous configurations are. Should anything be changed for any configuration in the json files, probably there should be specific script, or program implemented for the delta update. It is similar to configDB data change. I doubt this script is the right place to deal with each possible change. Maybe the long term solution is to eliminate these json files and make them part of the configDB. |
||
SWSSCONFIG_ARGS="00-copp.config.json ipinip.json ports.json switch.json " | ||
|
||
for file in $SWSSCONFIG_ARGS; do | ||
|
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.
In the scope of this PR, what is the use case for
Intuitively, this module should care only the swss one.
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.
There are two scenarios:
<1> Individual SWSS docker restart.
either system == true or swss == true, warm start will be performed.
<2> system restart.
It is to be supported. But we may hit issue when system == false, swss == true. data would have been flushed at system init. SWSS docker has to perform extra check to make sure data exits for state restore.