Skip to content

Commit

Permalink
[Mux] Fix repeating logs in case of tunnel creation fail (#1610)
Browse files Browse the repository at this point in the history
* Fix repeating logs in case of tunnel creation fail
  • Loading branch information
prsunny authored Jan 26, 2021
1 parent f4e8245 commit f4aefba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion orchagent/bufferorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 4 additions & 3 deletions orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion orchagent/tunneldecaporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit f4aefba

Please sign in to comment.