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

[warm-reboot] initialize warm reboot state table before warm rebooting #492

Merged
merged 3 commits into from
Mar 30, 2019

Conversation

yxieca
Copy link
Contributor

@yxieca yxieca commented Mar 28, 2019

- What I did

Make sure that when the new image boots up, the component state won't
be 'reconciled'.

Signed-off-by: Ying Xie ying.xie@microsoft.com

- How to verify it
continuous warm reboot.

admin@str-7260cx3-acs-1:~$ show warm_restart state ; uptime
name restore_count state


syncd 83
vlanmgrd 83
neighsyncd 83 reconciled
portsyncd 83
teammgrd 83
bgp 83 reconciled
warm-shutdown 0 pre-shutdown-succeeded
orchagent 83 reconciled
teamsyncd 83
16:13:00 up 6 min, 1 user, load average: 2.81, 1.54, 0.76
admin@str-7260cx3-acs-1:~$ show warm_restart state ; uptime
name restore_count state


syncd 83
vlanmgrd 83
neighsyncd 83
portsyncd 83
teammgrd 83
bgp 83
warm-shutdown 0
orchagent 83
teamsyncd 83
16:13:08 up 6 min, 1 user, load average: 2.61, 1.53, 0.77

Make sure that when the new image boots up, the component state won't
be 'reconciled'.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
scripts/fast-reboot Outdated Show resolved Hide resolved
@@ -106,6 +106,18 @@ function clear_warm_boot()
fi
}

function init_warm_reboot_states()
Copy link
Contributor

@qiluo-msft qiluo-msft Mar 28, 2019

Choose a reason for hiding this comment

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

init_warm_reboot_states [](start = 9, length = 23)

You could move code into backup_database(). And consider to adapt the optimization there. #Closed

Copy link
Contributor Author

@yxieca yxieca Mar 28, 2019

Choose a reason for hiding this comment

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

That would interfere the warm reboot. Syncd warmshutdown uses this table to coordinate operations. Some module might (not today, but maybe in the future) want to leave information to be handled after warm reboot is done. So it would be best to clear the table before any real warm reboot operation started.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Incorporated the optimization. Thanks!

@yxieca yxieca merged commit 170fed9 into sonic-net:master Mar 30, 2019
@yxieca yxieca deleted the clear_state branch March 30, 2019 01:32
yxieca added a commit that referenced this pull request Mar 30, 2019
#492)

* [warm-reboot] initialize warm reboot state table before warm rebooting

Make sure that when the new image boots up, the component state won't
be 'reconciled'.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* fix typo

* optimize state deletion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants