Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

In some cases "Captured frame from MAC ... associated with another peer" is not an error #2877

Open
brb opened this issue Mar 31, 2017 · 5 comments

Comments

@brb
Copy link
Contributor

brb commented Mar 31, 2017

TL;DR fastdp sometimes executes handleCapturedPacket for received over tunnel packets, which leads to logging the "Captured frame from MAC ... associated with another peer" error. The error is quite often seen in logs provided by users.

How it happens:

  1. peerC forwards a packet (p0) to peerA.
  2. peerA executes a vxlan miss handler which calls the handleForwardedPacket callback.
  3. the callback learns about p0.srcMAC -> peerC, and injects the packet with fastdp.InjectPacket.
  4. InjectPacket calls fastdp.bridge(..) which learns p0.srcMAC -> routerBridgePortID.
    <..>
  5. at some point peerB forwards a packet (p1, p1.dstMAC == p0.srcMAC) to peerA.
  6. peerA execs the same vxlan miss handler, learns about p1.srcMAC -> peerB, and injects the packet.
  7. this time, the fastdp.bridge(..) function knows about dstMAC -> vport mapping, and because of that calls fastdp.sendToPort[routerBridgePortID] which is the handleCapturedPacket callback.
  8. the callback logs the infamous error because of the learnt mapping at the step 6.

Logs which illustrate the case usually look like the following:

Discovered remote MAC 06:66:e3:00:72:d0 at ...(k8s-node-3)
<..>
Discovered remote MAC 82:2f:27:ff:b5:53 at ...(k8s-node-2)
<..>
Captured frame from MAC (82:2f:27:ff:b5:53) to (06:66:e3:00:72:d0) associated with another peer ...(k8s-node-2)

An easy fix (before applying 17c8dc9) is to extend the if-clause by adding the following cases:

if dstPeer == nil{ // not found
   InjectPacket    // might be local container...
   relayBroadcast  // ...or not
}
if dstPeer != nil { // not us
   relay            // just relay, because destination is know
}

However, we should be super careful (and think twice) as we are changing the routing logic.

@brb brb added this to the 2.0 milestone Mar 31, 2017
@brb brb self-assigned this Mar 31, 2017
@rade
Copy link
Member

rade commented Mar 31, 2017

to extend the if-clause

or, rather, turn it into a switch dstPeer ...

@mcortinas
Copy link

We also can see these error messages, any plan in order to silence this?

@brb
Copy link
Contributor Author

brb commented Jan 29, 2018

@mcortinas I'm going to prioritize this issue after the 2.2 release.

@brb brb removed their assignment Jun 12, 2018
@brb brb removed this from the overflow milestone Jul 24, 2018
@brb brb added this to the 2.5 milestone Jul 30, 2018
@brb brb self-assigned this Jul 30, 2018
@bboreham bboreham modified the milestones: 2.5, 2.5.1 Nov 1, 2018
@timanovsky
Copy link

Is it only logging problem, or does it have other consequences? We see a lot of those

@bboreham
Copy link
Contributor

bboreham commented Nov 8, 2018

@timanovsky it depends on the cause. If you have the same cause as described at the top, exactly, then it is only a logging problem. But if your cause is different then the impact could be different.

Best to open a new issue and post the logs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants