From 8a5714eba1ea05e9fee0bde93aff838513aa3859 Mon Sep 17 00:00:00 2001 From: InspurSDN Date: Thu, 16 Nov 2023 16:42:08 +0800 Subject: [PATCH] Add application and orchdameon warm start default status Description: 1. When executing warm-reboot continuously, the orchagent cannot finish pre-warm task within 10 secs. 2. And then, the orchagent will be frozen by "second" warm restart. 3. In order to prevent the orchagent is frozen, add warm start default status. 4. If executing warm-reboot, will check wart start status. --- neighsyncd/neighsyncd.cpp | 4 ++++ orchagent/orchdaemon.cpp | 4 ++++ teamsyncd/teamsync.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/neighsyncd/neighsyncd.cpp b/neighsyncd/neighsyncd.cpp index a0882c28e2..14220389eb 100644 --- a/neighsyncd/neighsyncd.cpp +++ b/neighsyncd/neighsyncd.cpp @@ -61,6 +61,10 @@ int main(int argc, char **argv) } sync.getRestartAssist()->startReconcileTimer(s); } + else + { + sync.getRestartAssist()->warmStartDisabled(); + } netlink.registerGroup(RTNLGRP_NEIGH); cout << "Listens to neigh messages..." << endl; diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index d1b418882c..19fc8fa9a1 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -660,6 +660,10 @@ bool OrchDaemon::init() return false; } } + else + { + WarmStart::setWarmStartState("orchagent", WarmStart::WSDISABLED); + } return true; } diff --git a/teamsyncd/teamsync.cpp b/teamsyncd/teamsync.cpp index 6d8c025911..a088bbc082 100644 --- a/teamsyncd/teamsync.cpp +++ b/teamsyncd/teamsync.cpp @@ -41,6 +41,10 @@ TeamSync::TeamSync(DBConnector *db, DBConnector *stateDb, Select *select) : WarmStart::setWarmStartState(TEAMSYNCD_APP_NAME, WarmStart::INITIALIZED); SWSS_LOG_NOTICE("Starting in warmstart mode"); } + else + { + WarmStart::setWarmStartState(TEAMSYNCD_APP_NAME, WarmStart::WSDISABLED); + } } void TeamSync::periodic()