Skip to content

Commit 6784f7b

Browse files
authored
notification: Exiting orchagent once syncd is down (sonic-net#90)
1 parent 025c82b commit 6784f7b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

orchagent/notifications.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,22 @@ void on_port_state_change(uint32_t count, sai_port_oper_status_notification_t *d
2424
}
2525
}
2626

27+
void on_switch_shutdown_request()
28+
{
29+
SWSS_LOG_ENTER();
30+
31+
/* TODO: Later a better restart story will be told here */
32+
SWSS_LOG_ERROR("Syncd stopped");
33+
34+
exit(EXIT_FAILURE);
35+
}
36+
2737
sai_switch_notification_t switch_notifications
2838
{
2939
NULL,
3040
NULL,
3141
on_port_state_change,
3242
NULL,
33-
NULL,
43+
on_switch_shutdown_request,
3444
NULL
3545
};

0 commit comments

Comments
 (0)