From f4aefbaf3ff1690c4d10e186fdfe3eea9949e392 Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Mon, 25 Jan 2021 20:45:32 -0800 Subject: [PATCH] [Mux] Fix repeating logs in case of tunnel creation fail (#1610) * Fix repeating logs in case of tunnel creation fail --- orchagent/bufferorch.cpp | 2 +- orchagent/muxorch.cpp | 7 ++++--- orchagent/tunneldecaporch.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/orchagent/bufferorch.cpp b/orchagent/bufferorch.cpp index 2449dee113bf..c7977df43219 100644 --- a/orchagent/bufferorch.cpp +++ b/orchagent/bufferorch.cpp @@ -966,7 +966,7 @@ void BufferOrch::doTask() // ├── buffer queue // └── buffer pq table - SWSS_LOG_INFO("Handling buffer task"); + SWSS_LOG_DEBUG("Handling buffer task"); auto pool_consumer = getExecutor((APP_BUFFER_POOL_TABLE_NAME)); pool_consumer->drain(); diff --git a/orchagent/muxorch.cpp b/orchagent/muxorch.cpp index eabb7ab396e5..18bab8b10c3c 100644 --- a/orchagent/muxorch.cpp +++ b/orchagent/muxorch.cpp @@ -793,19 +793,20 @@ bool MuxOrch::handlePeerSwitch(const Request& request) if (op == SET_COMMAND) { + mux_peer_switch_ = peer_ip; + // Create P2P tunnel when peer_ip is available. IpAddresses dst_ips = decap_orch_->getDstIpAddresses(MUX_TUNNEL); if (!dst_ips.getSize()) { - SWSS_LOG_NOTICE("Mux tunnel not yet created for '%s' peer ip '%s'", - MUX_TUNNEL, peer_ip.to_string().c_str()); + SWSS_LOG_INFO("Mux tunnel not yet created for '%s' peer ip '%s'", + MUX_TUNNEL, peer_ip.to_string().c_str()); return false; } auto it = dst_ips.getIpAddresses().begin(); const IpAddress& dst_ip = *it; mux_tunnel_id_ = create_tunnel(&peer_ip, &dst_ip); - mux_peer_switch_ = peer_ip; SWSS_LOG_NOTICE("Mux peer ip '%s' was added, peer name '%s'", peer_ip.to_string().c_str(), peer_name.c_str()); } diff --git a/orchagent/tunneldecaporch.cpp b/orchagent/tunneldecaporch.cpp index 9aad474a0ed6..6f293493b591 100644 --- a/orchagent/tunneldecaporch.cpp +++ b/orchagent/tunneldecaporch.cpp @@ -758,7 +758,7 @@ IpAddresses TunnelDecapOrch::getDstIpAddresses(std::string tunnelKey) { if (tunnelTable.find(tunnelKey) == tunnelTable.end()) { - SWSS_LOG_ERROR("Tunnel not found %s", tunnelKey.c_str()); + SWSS_LOG_INFO("Tunnel not found %s", tunnelKey.c_str()); return IpAddresses(); }