summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2014-07-28 16:15:28 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-07-28 18:47:50 +0900
commita1367ba23313b124b0076a7303284fbfea0c852a (patch)
tree986aadd226a06f1b10c8b228c39fbb9977755541
parent7304a57b956eb5ccb51a11d80d5b5443e2835498 (diff)
bgpspeaker: refine logs
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/bgp/peer.py14
-rw-r--r--ryu/services/protocols/bgp/speaker.py1
2 files changed, 6 insertions, 9 deletions
diff --git a/ryu/services/protocols/bgp/peer.py b/ryu/services/protocols/bgp/peer.py
index 9c511dcc..14115de8 100644
--- a/ryu/services/protocols/bgp/peer.py
+++ b/ryu/services/protocols/bgp/peer.py
@@ -412,9 +412,8 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
enabled = conf_evt.value
# If we do not have any protocol bound and configuration asks us to
# enable this peer, we try to establish connection again.
- LOG.debug('Peer %s configuration update event, enabled: %s.' %
- (self, enabled))
if enabled:
+ LOG.info('%s enabled' % self)
if self._protocol and self._protocol.started:
LOG.error('Tried to enable neighbor that is already enabled')
else:
@@ -424,6 +423,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
self._connect_retry_event.set()
LOG.debug('Starting connect loop as neighbor is enabled.')
else:
+ LOG.info('%s disabled' % self)
if self._protocol:
# Stopping protocol will eventually trigger connection_lost
# handler which will do some clean-up.
@@ -439,8 +439,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
self.state.bgp_state = const.BGP_FSM_IDLE
# If this peer is not enabled any-more we stop trying to make any
# connection.
- LOG.debug('Disabling connect-retry as neighbor was disabled (%s)' %
- (not enabled))
+ LOG.debug('Disabling connect-retry as neighbor was disabled')
self._connect_retry_event.clear()
def on_update_med(self, conf_evt):
@@ -932,8 +931,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
# Stop connect_loop retry timer as we are now connected
if self._protocol and self._connect_retry_event.is_set():
self._connect_retry_event.clear()
- LOG.debug('Connect retry event for %s is now set: %s' %
- (self, self._connect_retry_event.is_set()))
+ LOG.debug('Connect retry event for %s is cleared' % self)
if self._protocol and self.outgoing_msg_event.is_set():
# Start processing sink.
@@ -1760,7 +1758,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
def connection_made(self):
"""Protocols connection established handler
"""
- LOG.critical(
+ LOG.info(
'Connection to peer: %s established',
self._neigh_conf.ip_address,
extra={
@@ -1772,7 +1770,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
def connection_lost(self, reason):
"""Protocols connection lost handler.
"""
- LOG.critical(
+ LOG.info(
'Connection to peer %s lost, reason: %s Resetting '
'retry connect loop: %s' %
(self._neigh_conf.ip_address, reason,
diff --git a/ryu/services/protocols/bgp/speaker.py b/ryu/services/protocols/bgp/speaker.py
index cfa8be78..f66ea41d 100644
--- a/ryu/services/protocols/bgp/speaker.py
+++ b/ryu/services/protocols/bgp/speaker.py
@@ -583,7 +583,6 @@ class BgpProtocol(Protocol, Activity):
self.sent_open_msg = open_msg
self.send(open_msg)
self._peer.connection_made()
- LOG.debug('Sent open message %s' % open_msg)
def connection_lost(self, reason):
"""Stops all timers and notifies peer that connection is lost.