-
Notifications
You must be signed in to change notification settings - Fork 883
Description
Given a container can be connected to multiple networks, in order to do the correct programming related to exposed ports and port mapping, the ownership of this information has been moved from endpoint to sandbox (See #810).
This allows libnetwork to do this programming only for the endpoint which is selected for providing the default gateway to the container. And to revoke the programming on an endpoint which is no longer selected as container default gateway.
To achieve this a couple of new functions were added to driverapi interface: ProgramExternalConnectivity() and RevokeExternalConnectivity().
Libnetwork invokes them after and before the Join() and Leave() call to driver respectively.
Starting from docker/docker release 1.11, the internal network driver switched to using the new API.
Remote network drivers are not required to switch yet. Libnetwork is still sending the exposed ports and port mapping information during CreateEndpoint() call to driver as before.
Eventually libnetwork (and docker) will be changed to no longer send the information during endpoint creation, and remote network driver will have to comply to the new flow.
I am suggesting release 1.12 1.13 for the switch off.