Skip to content

libn/d/overlay: delete FDB entry from AF_BRIDGE#50236

Merged
thaJeztah merged 1 commit intomoby:masterfrom
corhere:libn/overlay-really-delete-neigh
Jun 24, 2025
Merged

libn/d/overlay: delete FDB entry from AF_BRIDGE#50236
thaJeztah merged 1 commit intomoby:masterfrom
corhere:libn/overlay-really-delete-neigh

Conversation

@corhere
Copy link
Copy Markdown
Contributor

@corhere corhere commented Jun 19, 2025

- What I did
- How I did it

Starting with commit 0d6e7cd DeleteNeighbor() needs to be called with the same options as the AddNeighbor() call that created the neighbor entry. The calls in peerdb were modified incorrectly, resulting in the deletes failing and leaking neighbor entries. Fix up the DeleteNeighbor calls so that the FDB entry is deleted from the FDB instead of the neighbor table, and the neighbor is deleted from the neighbor table instead of the FDB.

- How to verify it

  1. Set up a multi-node Swarm cluster.
  2. Create a user-defined overlay network.
  3. Run a dummy task or basic container connected to the overlay on one of the nodes (henceforth referred to as the node under test) in order to force libnetwork to keep the network namespace around for the duration of the test.
  4. Create a Swarm service with tasks attached to the overlay network, scheduled such that at least one task is scheduled on a different node than the node under test.
  5. Scale the service up and down, or repeatedly force-update the service -- something to repeatedly connect and disconnect containers from the overlay.
  6. Verify that the daemon on the node under test did not log any Peer delete operation failed messages.
  7. Verify that the ARP table and VXLAN FDB in the overlay network's netns on the node under test are free of stale entries.
    nsenter --net="/run/docker/netns/1-$(docker network inspect $NETWORK_NAME --format '{{slice .ID 0 10}}')" \
      sh -c 'bridge fdb show brport vxlan0; ip neigh'
    

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

Starting with commit 0d6e7cd
DeleteNeighbor() needs to be called with the same options as the
AddNeighbor() call that created the neighbor entry. The calls in peerdb
were modified incorrectly, resulting in the deletes failing and leaking
neighbor entries. Fix up the DeleteNeighbor calls so that the FDB entry
is deleted from the FDB instead of the neighbor table, and the neighbor
is deleted from the neighbor table instead of the FDB.

Signed-off-by: Cory Snider <[email protected]>
@Adam7288

This comment was marked as off-topic.

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entries are never deleted from overlay ARP table

5 participants