Files
moby/libnetwork
Cory Snider e3f9edd348 libn/networkdb: advertise the configured bind port
The NetworkDB unit tests instantiate clusters which communicate over
loopback where every "node" listens on a distinct localhost port. The
tests make use of a NetworkDB configuration knob to set the port. When
the NetworkDB configuration's BindPort field is set to a nonzero value,
its memberlist instance is configured to bind to the specified port
number. However, the advertise port is left at the
memberlist.DefaultLANConfig() default value of 7946. Because of this,
nodes would be unable to contact any of the other nodes in the cluster
learned by gossip as the gossiped addresseses specify the wrong ports!
The flaky tests passed as often as they did thanks to the robustness of
the memberlist module: NetworkDB gossip and and memberlist node
liveness-probe pings to unreachable nodes can all be relayed through
the reachable nodes, the nodes on the bootstrap join list.

Make the NetworkDB unit tests less flaky by setting each node's
advertise port to the bind port.

The daemon is unaffected by this oversight as it unconditionally uses
the default listen port of 7946, which aligns with the advertise port.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-05-07 11:38:12 -04:00
..
2024-06-27 23:18:48 +02:00
2025-05-01 14:16:44 +02:00
2025-02-25 15:24:25 +00:00
2025-03-04 13:55:46 +01:00
2024-09-06 21:53:09 +10:00
2024-09-06 21:53:09 +10:00
2025-04-07 16:56:49 +01:00
2024-06-27 23:18:48 +02:00
2024-09-06 21:53:09 +10:00
2025-04-09 08:45:33 +02:00
2025-04-09 08:45:33 +02:00
2025-04-04 11:21:17 +02:00

libnetwork - networking for containers

Libnetwork provides a native Go implementation for connecting containers

The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.

Design

Please refer to the design for more information.

Using libnetwork

There are many networking solutions available to suit a broad range of use-cases. libnetwork uses a driver / plugin model to support all of these solutions while abstracting the complexity of the driver implementations by exposing a simple and consistent Network Model to users.

Contributing

Want to hack on libnetwork? Docker's contributions guidelines apply.

Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.