Skip to content

Commit

Permalink
[fastboot] fastboot enhancement: Use warm-boot infrastructure for fas…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
arfeigin authored Sep 19, 2022
1 parent ab344e9 commit 07028cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ void Syncd::performStartupLogic()
{
SWSS_LOG_ENTER();

// ignore warm logic here if syncd starts in Mellanox fastfast boot mode
// ignore warm logic here if syncd starts in fast-boot or Mellanox fastfast boot mode

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)
{
SWSS_LOG_WARN("override command line startType=%s via SAI_START_TYPE_WARM_BOOT",
CommandLineOptions::startTypeToString(m_commandLineOptions->m_startType).c_str());
Expand Down
6 changes: 4 additions & 2 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ else
CMD_ARGS=
fi

# Use temporary view between init and apply
CMD_ARGS+=" -u"
# Use temporary view between init and apply except when in fast-reboot
if [[ "$(cat /proc/cmdline)" != *"SONIC_BOOT_TYPE=fast-reboot"* ]]; then
CMD_ARGS+=" -u"
fi

# Use bulk APIs in SAI
# currently disabled since most vendors don't support that yet
Expand Down

0 comments on commit 07028cb

Please sign in to comment.