-
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
[warm boot finalizer] only wait for enabled components to reconcile #6454
Conversation
Define the component with its associated service. Only wait for components that have associated service enabled to reconcile during warm reboot. Signed-off-by: Ying Xie <[email protected]>
COMPONENT_LIST="" | ||
for cp in ${CP_LIST}; do | ||
service=${RECONCILE_COMPONENTS[${cp}]} | ||
status=$(show feature status | grep "^${service}" | awk '{ print $2 }') |
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.
This logic depends on the raw output format of show feature status
. If anything changes in this show api, awk
might return some other column value. Can this rather be obtained directly from the DB?
$ redis-cli -n 4 HMGET "FEATURE|nat" state
1) "disabled"
$ redis-cli -n 4 HMGET "FEATURE|bgp" state
1) "enabled"
...
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.
good idea! changed. Thanks!
COMPONENT_LIST="" | ||
for cp in ${CP_LIST}; do | ||
service=${RECONCILE_COMPONENTS[${cp}]} | ||
status=$(sonic-db-cli CONFIG_DB HGET "FEATURE|${service}" state) |
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.
The indentation looks a little off.
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.
yeah, editing on the target dut. vim setting is wrong there.
retest mellanox please |
…6454) * [warm boot finalizer] only wait for enabled components to reconcile Define the component with its associated service. Only wait for components that have associated service enabled to reconcile during warm reboot. Signed-off-by: Ying Xie <[email protected]>
This is needed for 201911 branch too. Without this fix finalizer spends more than 5 minutes to finish warmboot. Letting finalizer wait for so long can cause:
Checked in 2700 device running 201911 with this fix added:
|
…6454) * [warm boot finalizer] only wait for enabled components to reconcile Define the component with its associated service. Only wait for components that have associated service enabled to reconcile during warm reboot. Signed-off-by: Ying Xie <[email protected]>
- Why I did it
Fix issue #6383
- How I did it
Define the component with its associated service. Only wait for components that have associated service enabled to reconcile during warm reboot.
Signed-off-by: Ying Xie [email protected]
- How to verify it
Run warm reboot with the change (note that 'natsyncd' is no longer in the wait list:
/var/log/syslog.1:Jan 14 18:28:41.239710 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Wait for database to become ready...
/var/log/syslog.1:Jan 14 18:28:41.730254 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Database is ready...
/var/log/syslog.1:Jan 14 18:28:42.104362 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Restoring counters folder after warmboot...
/var/log/syslog.1:Jan 14 18:28:46.043684 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Waiting for components: ' neighsyncd bgp orchagent' to reconcile ...
/var/log/syslog:Jan 14 18:30:55.913965 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Tearing down control plane assistant ...
/var/log/syslog:Jan 14 18:30:59.123504 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Save in-memory database after warm reboot ...
/var/log/syslog:Jan 14 18:30:59.727347 str-7260cx3-acs-1 NOTICE root: WARMBOOT_FINALIZER : Finalizing warmboot...