Commit a732858 1 parent 1288f77 commit a732858 Copy full SHA for a732858
File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -3672,7 +3672,9 @@ int syncd_main(int argc, char **argv)
3672
3672
{
3673
3673
SWSS_LOG_ERROR (" Failed to set SAI_SWITCH_ATTR_RESTART_WARM=true: %s for pre-shutdown" ,
3674
3674
sai_serialize_status (status).c_str ());
3675
+
3675
3676
shutdownType = SYNCD_RESTART_TYPE_COLD;
3677
+
3676
3678
warmRestartTable->hset (" warm-shutdown" , " state" , " set-flag-failed" );
3677
3679
continue ;
3678
3680
}
@@ -3681,14 +3683,22 @@ int syncd_main(int argc, char **argv)
3681
3683
attr.value .booldata = true ;
3682
3684
3683
3685
status = sai_switch_api->set_switch_attribute (gSwitchId , &attr);
3686
+
3684
3687
if (status == SAI_STATUS_SUCCESS)
3685
3688
{
3686
3689
warmRestartTable->hset (" warm-shutdown" , " state" , " pre-shutdown-succeeded" );
3690
+
3691
+ s = swss::Select ();
3692
+
3693
+ s.addSelectable (restartQuery.get ());
3694
+
3695
+ SWSS_LOG_NOTICE (" switched to PRE_SHUTDOWN, from now on accepting only shurdown requests" );
3687
3696
}
3688
3697
else
3689
3698
{
3690
3699
SWSS_LOG_ERROR (" Failed to set SAI_SWITCH_ATTR_PRE_SHUTDOWN=true: %s" ,
3691
3700
sai_serialize_status (status).c_str ());
3701
+
3692
3702
warmRestartTable->hset (" warm-shutdown" , " state" , " pre-shutdown-failed" );
3693
3703
3694
3704
// Restore cold shutdown.
You can’t perform that action at this time.
0 commit comments