parent
b029f49013
commit
c5167457eb
@ -0,0 +1,122 @@
|
|||||||
|
From c423bce4db804c1d07d65ce3d06a9e62c4eceb2b Mon Sep 17 00:00:00 2001
|
||||||
|
From: stormliang <stormliang@microsoft.com>
|
||||||
|
Date: Mon, 19 Jun 2023 13:57:01 +0000
|
||||||
|
Subject: [PATCH] change log level for graceful restart events
|
||||||
|
|
||||||
|
---
|
||||||
|
bgpd/bgp_fsm.c | 44 ++++++++++++++++++++------------------------
|
||||||
|
bgpd/bgpd.c | 12 +++++-------
|
||||||
|
2 files changed, 25 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
|
||||||
|
index 672fa4512..e392cd6e1 100644
|
||||||
|
--- a/bgpd/bgp_fsm.c
|
||||||
|
+++ b/bgpd/bgp_fsm.c
|
||||||
|
@@ -786,9 +786,9 @@ static int bgp_graceful_restart_timer_expire(struct thread *thread)
|
||||||
|
|
||||||
|
peer = THREAD_ARG(thread);
|
||||||
|
|
||||||
|
- if (bgp_debug_neighbor_events(peer)) {
|
||||||
|
- zlog_debug("%s graceful restart timer expired", peer->host);
|
||||||
|
- zlog_debug("%s graceful restart stalepath timer stopped",
|
||||||
|
+ if (peer) {
|
||||||
|
+ zlog_info("%s graceful restart timer expired", peer->host);
|
||||||
|
+ zlog_info("%s graceful restart stalepath timer stopped",
|
||||||
|
peer->host);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -852,8 +852,8 @@ static int bgp_graceful_stale_timer_expire(struct thread *thread)
|
||||||
|
|
||||||
|
peer = THREAD_ARG(thread);
|
||||||
|
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug("%s graceful restart stalepath timer expired",
|
||||||
|
+ if (peer)
|
||||||
|
+ zlog_info("%s graceful restart stalepath timer expired",
|
||||||
|
peer->host);
|
||||||
|
|
||||||
|
/* NSF delete stale route */
|
||||||
|
@@ -1427,20 +1427,18 @@ int bgp_stop(struct peer *peer)
|
||||||
|
/* graceful restart */
|
||||||
|
if (peer->t_gr_stale) {
|
||||||
|
BGP_TIMER_OFF(peer->t_gr_stale);
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug(
|
||||||
|
- "%s graceful restart stalepath timer stopped",
|
||||||
|
- peer->host);
|
||||||
|
+ zlog_info(
|
||||||
|
+ "%s graceful restart stalepath timer stopped",
|
||||||
|
+ peer->host);
|
||||||
|
}
|
||||||
|
if (CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_WAIT)) {
|
||||||
|
- if (bgp_debug_neighbor_events(peer)) {
|
||||||
|
- zlog_debug(
|
||||||
|
- "%s graceful restart timer started for %d sec",
|
||||||
|
- peer->host, peer->v_gr_restart);
|
||||||
|
- zlog_debug(
|
||||||
|
- "%s graceful restart stalepath timer started for %d sec",
|
||||||
|
- peer->host, peer->bgp->stalepath_time);
|
||||||
|
- }
|
||||||
|
+ zlog_info(
|
||||||
|
+ "%s graceful restart timer started for %d sec",
|
||||||
|
+ peer->host, peer->v_gr_restart);
|
||||||
|
+ zlog_info(
|
||||||
|
+ "%s graceful restart stalepath timer started for %d sec",
|
||||||
|
+ peer->host, peer->bgp->stalepath_time);
|
||||||
|
+
|
||||||
|
BGP_TIMER_ON(peer->t_gr_restart,
|
||||||
|
bgp_graceful_restart_timer_expire,
|
||||||
|
peer->v_gr_restart);
|
||||||
|
@@ -2205,18 +2203,16 @@ static int bgp_establish(struct peer *peer)
|
||||||
|
UNSET_FLAG(peer->sflags, PEER_STATUS_NSF_MODE);
|
||||||
|
if (peer->t_gr_stale) {
|
||||||
|
BGP_TIMER_OFF(peer->t_gr_stale);
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug(
|
||||||
|
- "%s graceful restart stalepath timer stopped",
|
||||||
|
- peer->host);
|
||||||
|
+ zlog_info(
|
||||||
|
+ "%s graceful restart stalepath timer stopped",
|
||||||
|
+ peer->host);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (peer->t_gr_restart) {
|
||||||
|
BGP_TIMER_OFF(peer->t_gr_restart);
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug("%s graceful restart timer stopped",
|
||||||
|
- peer->host);
|
||||||
|
+ zlog_info("%s graceful restart timer stopped",
|
||||||
|
+ peer->host);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reset uptime, turn on keepalives, send current table. */
|
||||||
|
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
|
||||||
|
index 7e528b219..2fc471555 100644
|
||||||
|
--- a/bgpd/bgpd.c
|
||||||
|
+++ b/bgpd/bgpd.c
|
||||||
|
@@ -2346,16 +2346,14 @@ void peer_nsf_stop(struct peer *peer)
|
||||||
|
|
||||||
|
if (peer->t_gr_restart) {
|
||||||
|
BGP_TIMER_OFF(peer->t_gr_restart);
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug("%s graceful restart timer stopped",
|
||||||
|
- peer->host);
|
||||||
|
+ zlog_info("%s graceful restart timer stopped",
|
||||||
|
+ peer->host);
|
||||||
|
}
|
||||||
|
if (peer->t_gr_stale) {
|
||||||
|
BGP_TIMER_OFF(peer->t_gr_stale);
|
||||||
|
- if (bgp_debug_neighbor_events(peer))
|
||||||
|
- zlog_debug(
|
||||||
|
- "%s graceful restart stalepath timer stopped",
|
||||||
|
- peer->host);
|
||||||
|
+ zlog_info(
|
||||||
|
+ "%s graceful restart stalepath timer stopped",
|
||||||
|
+ peer->host);
|
||||||
|
}
|
||||||
|
bgp_clear_route_all(peer);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
@ -27,4 +27,5 @@ cross-compile-changes.patch
|
|||||||
0026-bgpd-Ensure-suppress-fib-pending-works-with-network-.patch
|
0026-bgpd-Ensure-suppress-fib-pending-works-with-network-.patch
|
||||||
0027-bgpd-Ensure-FRR-has-enough-data-to-read-in-peek_for_as4_capability-and-bgp_open_option_parse.patch
|
0027-bgpd-Ensure-FRR-has-enough-data-to-read-in-peek_for_as4_capability-and-bgp_open_option_parse.patch
|
||||||
0028-bgpd-Ensure-that-bgp-open-message-stream-has-enough-data-to-read.patch
|
0028-bgpd-Ensure-that-bgp-open-message-stream-has-enough-data-to-read.patch
|
||||||
|
0029-bgpd-Change-log-level-for-graceful-restart-events.patch
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user