1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/drivers/bridge
Alessandro Boch 3e6a889cd6 Port Allocator as a libnetwork package
DESCRIPTION:
  As part of bringing libnetwork bridge driver features
  in parity with docker/daemon/network/driver/bridge
  features (Issue #46), this commit addresses the
  bridge.RequestPort() API.

  Currenlty docker/api/server.go needs an hold of port
  allocator in order to reserve a transport port which
  will be used by the http server on the host machine,
  so that portallocator does not give out that port when
  queried by portmapper as part of network driver operations.

ISSUE:
  Current implementation in docker is server.go directly
  access portmapper and then portallocator from bridge pkg
  calling bridge.RequestPort(). This also forces that function
  to trigger portmapper initialization (in case bridge init()
  was not executed yet), while portmapper life cycle should
  only be controlled by bridge network driver.
  We cannot mantain this behavior with libnetwrok as this
  violates the modularization of networking code which
  libnetwork is bringing in.

FIX:
  Make portallocator a singleton, now both docker core and
  portmapper code can initialize it and get the only one instance
  (Change in docker core code will happen when docker code
  will migrate to use libnetwork), given it is being used for
  host specific needs.

NOTE:
  Long term fix is having multiple portallocator instances (so
  no more singleton) each capable to be in sync with OS regarding
  current port allocation.
  When this change comes, no change whould be required on portallocator'
  clients side, changes will be confined to portallocator package.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-04-16 17:29:13 -07:00
..
bridge.go Port Allocator as a libnetwork package 2015-04-16 17:29:13 -07:00
bridge_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
interface.go Added driver specific config support 2015-04-15 18:32:07 +00:00
interface_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
network_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
resolvconf.go Move bridge to drivers/ 2015-02-24 11:29:06 -08:00
resolvconf_test.go Test coverage on bridge 2015-02-24 18:41:17 -08:00
setup.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_device.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_device_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_fixedcidrv4.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_fixedcidrv4_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_fixedcidrv6.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_fixedcidrv6_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ip_forwarding.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ip_forwarding_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ip_tables.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ip_tables_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ipv4.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ipv4_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ipv6.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_ipv6_test.go Added driver specific config support 2015-04-15 18:32:07 +00:00
setup_verify.go Fixed a bug in bridge driver where when the bridge already exists 2015-04-16 13:56:52 +00:00
setup_verify_test.go - Fixed the makefile which was not checking failures in test code 2015-04-16 19:00:36 +00:00