diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index e662b73ff2a1..ebed4b6ae0ff 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -150,8 +150,11 @@ void sighup(void) __attribute__((__noreturn__)) void sigint(void) { zlog_notice("Terminating on signal"); - if (CHECK_FLAG(bm->flags, BM_FLAG_FAST_SHUTDOWN)) + + if (CHECK_FLAG(bm->flags, BM_FLAG_FAST_SHUTDOWN)) { + zlog_info("Fast-shutdown configured, exiting."); exit(0); + } assert(bm->terminating == false); bm->terminating = true; /* global flag that shutting down */ @@ -187,6 +190,8 @@ static __attribute__((__noreturn__)) void bgp_exit(int status) /* it only makes sense for this to be called on a clean exit */ assert(status == 0); + zlog_info("BGP exiting."); + frr_early_fini(); bgp_close(); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 4cd15da47bc7..832145123805 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -8621,6 +8621,8 @@ void bgp_terminate(void) struct listnode *node, *nnode; struct listnode *mnode, *mnnode; + zlog_info("BGP Terminating"); + QOBJ_UNREG(bm); /* Close the listener sockets first as this prevents peers from diff --git a/lib/libfrr.c b/lib/libfrr.c index a9b874213a66..4fba68e9daf7 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -1245,6 +1245,8 @@ void frr_fini(void) hook_call(frr_fini); + zlog_info("FRR Fini"); + vty_terminate(); cmd_terminate(); nb_terminate(); diff --git a/lib/sigevent.c b/lib/sigevent.c index 06f80db4cca8..dc7bffeecd69 100644 --- a/lib/sigevent.c +++ b/lib/sigevent.c @@ -103,6 +103,9 @@ int frr_sigevent_process(void) #endif /* SIGEVENT_BLOCK_SIGNALS */ if (sigmaster.caught > 0) { + + zlog_info("%s: calling daemon handlers", __func__); + sigmaster.caught = 0; /* must not read or set sigmaster.caught after here, * race condition with per-sig caught flags if one does diff --git a/zebra/main.c b/zebra/main.c index 197bda3d64e9..d94a16a73aa1 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -152,8 +152,12 @@ static void sigint(void) struct zserv *client; static bool sigint_done; - if (zrouter.fast_shutdown) + zlog_info("Handling SIGINT"); + + if (zrouter.fast_shutdown) { + zlog_info("Fast-shutdown, exiting"); exit(0); + } if (sigint_done) return;