Commit Graph

177 Commits

Author SHA1 Message Date
Derek McGowan 43f00b74d7 Update logrus to v1.0.1
Fix case sensitivity issue
Update docker and runc vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-07 11:20:47 -07:00
Flavio Crisciani 4994c597ce
Fixed code issues
Fixed issues highlighted by the new checks

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-06-12 11:31:35 -07:00
Abhinandan Prativadi 21553c8a5a Removing the override for ipamdriver for local scope networks
The commit contains fix for the issue reported in
https://github.com/moby/moby/issues/33415 and
https://github.com/docker/libnetwork/issues/1772. With the
feature introduced to support local scope networks in swarm
mode the network configuration to include ipam driver was overriden
in libnetwork. This has been removed with this fix which will allow
ipam-driver option to be used for task allocation

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-05-30 16:01:15 -07:00
Flavio Crisciani 90f43a798b
Revert "Move Cluster provider back to Moby"
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-25 10:47:02 -07:00
Flavio Crisciani 9cc5cd9b53
Moved the cluster provider to Moby
Moved the cluster provider interface definition from
libnetwork to moby

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-24 11:28:23 -07:00
Madhu Venugopal c62ad42b87 Merge pull request #1762 from aboch/nlo2
Do not accept swarm scope network creation if swarm is off
2017-05-18 13:09:19 -07:00
Alessandro Boch e255d33b70 Do not accept swarm scope network creation if swarm is off
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 08:59:52 -07:00
Jacob Wen 0067b3a8ec Add a filter chain to allow persistent rules
Allow users to configure firewall policies in a way that persists
docker operations/restarts. Docker will not delete or modify any
pre-existing rules from the DOCKER-USER filter chain. This allows
the user to create in advance any rules required to further
restrict access from/to the containers.

Fixes docker/docker#29184
Fixes docker/docker#23987
Related to docker/docker#24848

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
2017-05-16 10:24:56 +08:00
Alessandro Boch 596122e05e Add ConnectivityScope capability for network drivers along with scope network option
- It specifies whether the network driver can
  provide containers connectivity across hosts.
- As of now, the data scope of the driver was
  being overloaded with this notion.
- The driver scope information is still valid
  and it defines whether the data allocation
  of the network resources can be done globally
  or only locally.
- With the scope network option, user can now
  force a network as swarm scoped
  regardless of the driver data scope.
- In case the network is configured as swarm scoped,
  and the network driver is multihost capable,
  a network DB instance will be launched for it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-12 17:16:34 -07:00
Alessandro Boch 16406c8dbd Support configuration networks
- They are configuration-only networks which
  can be used to supply the configuration
  when creating regular networks.
- They do not get allocated and do net get plumbed.
  Drivers do not get to know about them.
- They can be removed, once no other network is
  using them.
- When user creates a network specifying a
  configuration network for the config, no
  other network specific configuration field
  is are accepted. User can only specify
  network operator fields (attachable, internal,...)
- They do not need to have a driver field, that
  field gets actually reset upon creation.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-11 11:37:18 -07:00
Flavio Crisciani 5008b0c26d
Fix for swarm/libnetwork init race condition
This change cleans up the SetClusterProvider method.
Swarm calls the SetClusterProvider to pass to libnetwork the pointer
of the provider from which libnetwork can fetch all the information to
initialize the internal agent.

The method can be and is called multiple times passing the same value,
with the previous logic that was erroneusly spawning multiple go routines that
were making possiblea race between an agentInit and an agentClose.

The new logic aims to disallow it by checking for the provider passed and
ensuring that if the provider is already present there is nothing to do because
there is already an active go routine that is ready to process cluster events.
Moreover a patch on moby side takes care of clearing up the Cluster Events
dispacthing using only 1 channel to handle all the events types.
This will also guarantee in order event handling because now all the events are
piped into one single channel.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-04 15:35:28 -07:00
Alessandro Boch 6c94115857 Merge pull request #1681 from krasi-georgiev/31610-ingress-sandbox-files-location-with-custom-daemon-root-directory
ingress sandbox hosts and resolve.conf files location didn't respect the custom daemon root directory
2017-04-10 16:39:12 -07:00
Krasi Georgiev f1d3e96f41 ingress sandbox hosts and resolve.conf files location didn't respect the custom daemon root directory
Signed-off-by: Krasi Georgiev <krasi@vip-consult.solutions>
2017-04-11 00:51:54 +03:00
Alessandro Boch eda2dbf808 Add AgentStopWait method
- to signal when the networking cluster agent is stopped

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-05 11:13:56 -07:00
Alessandro Boch cc38477063 Do not clear ingress network in libnetwork
- Now that docker has the code to release the ingress
  network, have docker do the release on cluster leave
  and on graceful daemon shutdown.
  This is a cleaner approach in line with the cleanup
  triggered by who created the resource and will avoid
  races on ingress network removal as revealed by the
  docker tests.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-31 14:00:56 -07:00
Alessandro Boch d4a543fb33 Expose ingress network option
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-08 17:03:04 -08:00
Santhosh Manohar 530e1d972e Merge pull request #1658 from aboch/iptlck
Serialize non-atomic jump rule programming in bridge
2017-02-22 11:04:37 -08:00
Alessandro Boch fe741120db Serialize non-atomic jump rule programming in bridge
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-02-22 08:35:26 -08:00
Santhosh Manohar e7f5cfa276 Merge pull request #1631 from mavenugo/nstrict
Reverting the strict network name check
2017-02-01 22:31:20 -08:00
Madhu Venugopal d3194e4506 Revert "validate network and endpoint name more strictly"
This reverts commit 1807951d7f.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-02-01 18:18:17 -08:00
Madhu Venugopal 4131b4d9f4 Generating node discovery events to the drivers from networkdb
With the introduction of networkdb, the node discovery events were not
sent to the drivers. This commit generates the node discovery events and
sents it to the drivers interested in it.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-02-01 17:54:51 -08:00
Santhosh Manohar ec570ad8c6 carry docker/docker #29564
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-01-10 13:17:15 -08:00
Alessandro Boch 1ed42d1d80 Merge pull request #1595 from sanimej/host
Add support in embedded DNS server for host loopback resolver
2017-01-05 12:18:48 -08:00
allencloud c1865b811b fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-28 18:49:18 +08:00
Santhosh Manohar 14ae4337e1 Add embedded DNS server support for host loopback resolver
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-12-22 14:34:13 -08:00
Madhu Venugopal fb8744be86 Internal interface to differentiate built-in drivers from remote
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-19 05:17:42 -08:00
Madhu Venugopal 14b2be6d74 Handling the new experimental daemon flag
related to https://github.com/docker/docker/issues/29368

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-13 13:57:17 -08:00
Madhu Venugopal 3e10a22c84 Merge pull request #1576 from daehyeok/misspell
Fixed misspelling
2016-12-02 16:02:23 -08:00
Alessandro Boch 8dcf9960aa Add missing locks in agent and service code
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-29 13:58:06 -08:00
Daehyeok Mun d55c701e0c Fixed misspelling
Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-11-28 11:46:52 -07:00
Daehyeok Mun b735bb2ada Refactoring logrus import and formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.
Also fix import name to use original project name 'logrus' instead of
'log'

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-11-08 12:42:41 -07:00
allencloud 2638e83ffc update reapNode interval
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-08 15:28:42 +08:00
Madhu Venugopal 0bf056d59f Windows overlay driver support
1. Base work was done by msabansal and nwoodmsft
   from : https://github.com/msabansal/docker/tree/overlay
2. reorganized under drivers/windows/overlay and rebased to
   libnetwork master
3. Porting overlay common fixes to windows driver
    * 4658085
    * bb736c4
    * f6d8968
4. Windows Service Discovery changes for swarm-mode
5. renaming default windows ipam drivers as "windows"

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Signed-off-by: msabansal <sabansal@microsoft.com>
Signed-off-by: nwoodmsft <Nicholas.Wood@microsoft.com>
2016-11-03 16:50:04 -07:00
Jana Radhakrishnan a54d631ae4 Merge pull request #1510 from allencloud/validate-network-and-endpoint-name-strictly
validate network and endpoint name more strictly
2016-11-02 09:57:50 -07:00
Madhu Venugopal f21b774676 Merge pull request #1511 from anusha-ragunathan/fix-drvLoad
Update loadDriver to use pluginv2.
2016-10-24 10:43:55 -07:00
allencloud 1807951d7f validate network and endpoint name more strictly
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-18 11:01:18 +08:00
Anusha Ragunathan 5f99a7d85f Update loadDriver to use pluginv2.
NetworkDrivers were still using v1 to Get plugins. Fix that.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-10-17 15:18:43 -07:00
Akihiro Suda e9fe159e20 add Created to NetworkInfo
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-14 05:27:44 +00:00
Santhosh Manohar 393afa7aad Merge pull request #1495 from LK4D4/fix_sb_race
fix race in serializing sandbox to string
2016-10-13 13:16:59 -07:00
Alexander Morozov 93eead6d22 fix race in serializing sandbox to string
Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2016-10-10 09:41:43 -07:00
Alessandro Boch 848cd92ec2 Merge pull request #1500 from anusha-ragunathan/update_path
Update plugingetter import path.
2016-10-07 13:25:42 -07:00
Anusha Ragunathan a9a4aaf382 Update plugingetter import path.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-10-07 12:00:57 -07:00
Madhu Venugopal 6b6d230a19 Add support for NetworkAllocate and NetworkFree in remote driver
Also added an API to return list of builtin network drivers

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-10-05 18:20:02 -07:00
Alessandro Boch 81757138e2 Clear ingress resources on graceful shutdown
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-09-29 15:01:44 -07:00
Anusha Ragunathan 7b26d7e300 Make libnetwork understand pluginv2.
As part of daemon init, network and ipam drivers are passed a
pluginstore object that implements the plugin/getter interface. Use this
interface methods in libnetwork to interact with network plugins. This
interface provides the new and improved pluginv2 functionality and falls
back to pluginv1 (legacy) if necessary.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-09-27 15:29:10 -07:00
Madhu Venugopal e669011e26 Merge pull request #1412 from msabansal/dnsv2
DNS support for Windows
2016-09-20 17:35:26 -07:00
msabansal 52d17c5717 DNS support
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-09-20 13:02:02 -07:00
Jana Radhakrishnan d271945d6b Merge pull request #1449 from sanimej/ingress
Name the ingress sandbox explicitly
2016-09-20 11:39:57 -07:00
Santhosh Manohar ccd4408636 Name the ingress sandbox explicitly
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-09-15 15:22:57 -07:00
Alessandro Boch 214f592fb6 Check if IPv6 is enabled before restoring the network pools
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-09-15 11:21:33 -07:00