Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions drivers/overlay/ov_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@ func (n *network) watchMiss(nlSock *nl.NetlinkSocket) {
}

if neigh.IP.To4() == nil {
if neigh.HardwareAddr != nil {
logrus.Debugf("Miss notification, l2 mac %v", neigh.HardwareAddr)
}
continue
}

Expand Down
8 changes: 5 additions & 3 deletions drivers/overlay/ov_serf.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (d *driver) serfJoin(neighIP string) error {
if neighIP == "" {
return fmt.Errorf("no neighbor to join")
}
if _, err := d.serfInstance.Join([]string{neighIP}, false); err != nil {
if _, err := d.serfInstance.Join([]string{neighIP}, true); err != nil {
return fmt.Errorf("Failed to join the cluster at neigh IP %s: %v",
neighIP, err)
}
Expand All @@ -94,8 +94,8 @@ func (d *driver) notifyEvent(event ovNotify) {
}

func (d *driver) processEvent(u serf.UserEvent) {
logrus.Debugf("Received user event name:%s, payload:%s\n", u.Name,
string(u.Payload))
logrus.Debugf("Received user event name:%s, payload:%s LTime:%d \n", u.Name,
string(u.Payload), uint64(u.LTime))

var dummy, action, vtepStr, nid, eid, ipStr, maskStr, macStr string
if _, err := fmt.Sscan(u.Name, &dummy, &vtepStr, &nid, &eid); err != nil {
Expand Down Expand Up @@ -146,6 +146,7 @@ func (d *driver) processQuery(q *serf.Query) {
return
}

logrus.Debugf("Sending peer query resp mac %s, mask %s, vtep %s", peerMac, net.IP(peerIPMask), vtep)
q.Respond([]byte(fmt.Sprintf("%s %s %s", peerMac.String(), net.IP(peerIPMask).String(), vtep.String())))
}

Expand Down Expand Up @@ -173,6 +174,7 @@ func (d *driver) resolvePeer(nid string, peerIP net.IP) (net.HardwareAddr, net.I
return nil, nil, nil, fmt.Errorf("failed to parse mac: %v", err)
}

logrus.Debugf("Received peer query response, mac %s, vtep %s, mask %s", macStr, vtepStr, maskStr)
return mac, net.IPMask(net.ParseIP(maskStr).To4()), net.ParseIP(vtepStr), nil

case <-time.After(time.Second):
Expand Down
2 changes: 2 additions & 0 deletions osl/neigh_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net"

"github.com/Sirupsen/logrus"
"github.com/vishvananda/netlink"
)

Expand Down Expand Up @@ -96,6 +97,7 @@ func (n *networkNamespace) AddNeighbor(dstIP net.IP, dstMac net.HardwareAddr, op

nh := n.findNeighbor(dstIP, dstMac)
if nh != nil {
logrus.Debugf("Neighbor entry already present for IP %v, mac %v", dstIP, dstMac)
// If it exists silently return
return nil
}
Expand Down