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

[fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot #1100

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

arfeigin
Copy link
Contributor

@arfeigin arfeigin commented Aug 1, 2022

This PR should be merged together with sonic-utilities PR (sonic-net/sonic-utilities#2286) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

Fast-reboot is utilizing warm-reboot infrastructure to improve its performance, but it should ignore warm-boot logic when syncd starts in fast-boot.
As well it shouldn't use temporary view between init and apply.

@arfeigin arfeigin changed the title Use warm-boot infrastructure for fast-boot [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot Aug 1, 2022
@kcudnik
Copy link
Collaborator

kcudnik commented Aug 1, 2022

please address build issues

@arfeigin arfeigin marked this pull request as ready for review August 2, 2022 09:07
Copy link
Contributor

@vaibhavhd vaibhavhd left a comment

Choose a reason for hiding this comment

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

Minor suggestion added. LGTM.


if (m_isWarmStart && (m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT))
if (m_isWarmStart && m_commandLineOptions->m_startType != SAI_START_TYPE_FASTFAST_BOOT && m_commandLineOptions->m_startType != SAI_START_TYPE_FAST_BOOT)
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be better if this condition checks for positive match for SAI_START_TYPE_WARM_BOOT instead of a negative match for fastfast and fast reboot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case the assignment in line 214: "m_commandLineOptions->m_startType = SAI_START_TYPE_WARM_BOOT;" is redundant, not?
Should I change to the positive match and remove the redundancy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you think?

@vaibhavhd
Copy link
Contributor

Is this also needed for 202205?

@vaibhavhd
Copy link
Contributor

Will this break the logic to fall back to old way of fast-reboot?
We still need old fast-reboot logic to work in case of vendor-os to SONiC conversion scenario. In that scenario there won't be any db to reconcile.

@kcudnik
Copy link
Collaborator

kcudnik commented Aug 5, 2022

Will this break the logic to fall back to old way of fast-reboot? We still need old fast-reboot logic to work in case of vendor-os to SONiC conversion scenario. In that scenario there won't be any db to reconcile.

yea, this could be potential issue, good catch

@arfeigin
Copy link
Contributor Author

@vaibhavhd @kcudnik Thanks for your comment, the scenario of vendor-os to SONiC conversion was addressed in the HLD (https://github.com/shlomibitton/SONiC/blob/436cb6a4280cc0214d45e3e41c6d843eaec8fadb/doc/fast-reboot/Fast-reboot_Flow_Improvements_HLD.md#32-in-service-restart-and-upgrade-from-a-vendor-nos-to-sonic-nos). I will add a test according to Shlomi's description.

@arfeigin
Copy link
Contributor Author

arfeigin commented Aug 17, 2022

Automatic functional test case covering the scenario of vendor NOS to SONiC NOS reboot is in work. The test will simulate such scenario by dropping the dump files and perform fast-reboot without it.

vaibhavhd pushed a commit that referenced this pull request Sep 14, 2022
This PR is similar to #1100 
This PR should be merged together with sonic-utilities PR (sonic-net/sonic-utilities#2365) and sonic-buildimage PR (sonic-net/sonic-buildimage#12026).

Fast-reboot is utilizing warm-reboot infrastructure to improve its performance, but it should ignore warm-boot logic when syncd starts in fast-boot.
As well it shouldn't use temporary view between init and apply.
@liat-grozovik
Copy link
Collaborator

@kcudnik could you please help to merge?

@kcudnik kcudnik merged commit f9008ad into sonic-net:master Sep 19, 2022
vaibhavhd pushed a commit to sonic-net/sonic-utilities that referenced this pull request Sep 20, 2022
…t-boot (#2286)

This PR should be merged together with the sonic-sairedis PR (sonic-net/sonic-sairedis#1100) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

This is done to improve fast-reboot flow by:
Using warm-reboot infrastructure.
Clear all routes except of default routes for faster reconciliation time.
vaibhavhd pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Sep 26, 2022
This PR should be merged together with the sonic-utilities PR (sonic-net/sonic-utilities#2286) and sonic-sairedis PR (sonic-net/sonic-sairedis#1100).

Use redis contents from dump file in fast-reboot.

Improve fast-reboot flow by utilizing the warm-reboot infrastructure.
This followes https://github.com/sonic-net/SONiC/blob/master/doc/fast-reboot/Fast-reboot_Flow_Improvements_HLD.md
EdenGri pushed a commit to EdenGri/sonic-utilities that referenced this pull request Oct 12, 2022
…t-boot (sonic-net#2286)

This PR should be merged together with the sonic-sairedis PR (sonic-net/sonic-sairedis#1100) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

This is done to improve fast-reboot flow by:
Using warm-reboot infrastructure.
Clear all routes except of default routes for faster reconciliation time.
qiluo-msft pushed a commit to sonic-net/sonic-swss-common that referenced this pull request Oct 18, 2022
…691)

**Depends on:**

- sonic-net/sonic-sairedis#1100
- sonic-net/sonic-utilities#2286
- sonic-net/sonic-buildimage#11594

**Why I did this?**

Daemons which are not related to warm/fast restart might affect the performance of warm/fast restart. A hardcoded start up delay is the current solution to avoid this.

This PR implements a function to wait warm/fast restart done. This function provided a efficiency and graceful way for daemons to wait warm/fast restart done.

**How I did it?**

Implement a utility function RestartWaiter::waitRestartDone. This function waits warm restart done flag in STATE DB and return true if the flag is set by warm restart finalizer. This function is also exposed as python extension so that python daemons can utilize it.

This PR depends on new fastboot design: https://github.com/sonic-net/SONiC/blob/master/doc/fast-reboot/Fast-reboot_Flow_Improvements_HLD.md
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Oct 19, 2022
Update sonic-sairedis submodule pointer to include the following:
* af80caa Add Voqs to Virtual Switch ([sonic-net#1061](sonic-net/sonic-sairedis#1061))
* f9008ad [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot ([sonic-net#1100](sonic-net/sonic-sairedis#1100))

Signed-off-by: dprital <drorp@nvidia.com>
mdanish-kh pushed a commit to hamnarauf/sonic-utilities that referenced this pull request Oct 22, 2022
…t-boot (sonic-net#2286)

This PR should be merged together with the sonic-sairedis PR (sonic-net/sonic-sairedis#1100) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

This is done to improve fast-reboot flow by:
Using warm-reboot infrastructure.
Clear all routes except of default routes for faster reconciliation time.
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…t-boot (sonic-net#1100)

Fast-reboot is utilizing warm-reboot infrastructure to improve its performance, but it should ignore warm-boot logic when syncd starts in fast-boot.
As well it shouldn't use temporary view between init and apply.
preetham-singh pushed a commit to preetham-singh/sonic-utilities that referenced this pull request Nov 21, 2022
…t-boot (sonic-net#2286)

This PR should be merged together with the sonic-sairedis PR (sonic-net/sonic-sairedis#1100) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

This is done to improve fast-reboot flow by:
Using warm-reboot infrastructure.
Clear all routes except of default routes for faster reconciliation time.
skbarista pushed a commit to skbarista/sonic-sairedis that referenced this pull request Dec 2, 2022
This PR is similar to sonic-net#1100 
This PR should be merged together with sonic-utilities PR (sonic-net/sonic-utilities#2365) and sonic-buildimage PR (sonic-net/sonic-buildimage#12026).

Fast-reboot is utilizing warm-reboot infrastructure to improve its performance, but it should ignore warm-boot logic when syncd starts in fast-boot.
As well it shouldn't use temporary view between init and apply.
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
…t-boot (#2286)

This PR should be merged together with the sonic-sairedis PR (sonic-net/sonic-sairedis#1100) and sonic-buildimage PR (sonic-net/sonic-buildimage#11594).

This is done to improve fast-reboot flow by:
Using warm-reboot infrastructure.
Clear all routes except of default routes for faster reconciliation time.
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