Commit Graph

36 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
Santhosh Manohar 4da563bb06 Merge pull request #1599 from mavenugo/v0.9
Make use of GetAllManagedPluginsForCap to avoid loading v1-plugins
2017-01-04 15:02:06 -08:00
Madhu Venugopal a4e5218e63 Make use of GetAllManagedPluginsForCap to avoid loading v1-plugins
Read this for more details : https://github.com/docker/docker/pull/29665

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-04 14:35:42 -08:00
Alessandro Boch 75756e4712 Merge pull request #1568 from likel/refactor
Remove unnecessary string formats
2016-12-29 12:18:06 -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 119c5ba3bc Handle the case of registering active plugins during remote init
With Plugin-V2, plugins can get activated before remote driver is
Initialized. Those plugins fails to get registered with drvRegistry.

This fix handles that scenario

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-16 08:38:55 -08:00
Ke Li a3aa25c794 Remove unnecessary string formats
Signed-off-by: Ke Li <kel@splunk.com>
2016-11-22 09:29:53 +08: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
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
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
Jana Radhakrishnan 734d626141 Move engine-api to docker/docker/api
Remove all dependencies to engine-api and start using docker/docker/api.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-09-07 14:38:45 -07:00
Jana Radhakrishnan b33b7c68a5 Merge pull request #1205 from allencloud/fix-typos
use grep to find a/an misuse
2016-08-01 09:49:31 -07:00
Jana Radhakrishnan ea0bbcc5a9 Merge pull request #1284 from liubin/fix-typos
fix typos
2016-08-01 09:49:00 -07:00
Thomas Graf 618f80aa35 Fix crash when remote plugin returns empty address string
If a remote plugin returns an empty string in response to RequestAddress(),
the internal helper will return nil which will crash libnetwork in several
places.

Treat an empty string as a new error ipamapi.ErrNoIPReturned.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
2016-07-29 10:45:48 +02:00
bin liu 21c5a6281b fix typos
Signed-off-by: bin liu <liubin0329@gmail.com>
2016-06-22 14:20:30 +08:00
allencloud 8acef98c5f use grep to find a/an misuse
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-03 16:35:33 +08:00
Alessandro Boch 91d57d65f4 Avoid persisting ipam data if it can be reconstructed
- Also restore older behavior where overlap check is not run
  when preferred pool is specified. Got broken by recent changes

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-12 10:27:10 -07:00
Jana Radhakrishnan 2e1e8f5b9a Fix ipams builtin package for darwin
Make ipams builtin package work for os x target as ipam
driver developers happen to be using os x as well.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-15 14:48:49 -07:00
Amit Krishnan 1882f69175 Get libnetwork to build on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-14 14:03:50 -07:00
Brian Goff fc4ef5fce9 Remove pre-defined networks from package init
This moves the initialization of the pre-defined networks to where it's
used instead of in package init.
This reason for this change is having this be populated in `init()`
causes it to always consume cpu, and memory (4.3MB of memory), to
populate even if the package is unused (like for instnace, in a re-exec).

Here is a memory profile of docker/docker just after starting the daemon of the
top 10 largest memory consumers:

Before:
```
      flat  flat%   sum%        cum   cum%
         0     0%     0%    11.89MB 95.96%  runtime.goexit
         0     0%     0%     6.79MB 54.82%  runtime.main
         0     0%     0%     5.79MB 46.74%  main.init
         0     0%     0%     4.79MB 38.67%  github.com/docker/docker/api/server/router/network.init
         0     0%     0%     4.79MB 38.67%  github.com/docker/libnetwork.init
         0     0%     0%     4.29MB 34.63%  github.com/docker/libnetwork/ipam.init
         0     0%     0%     4.29MB 34.63%  github.com/docker/libnetwork/ipams/builtin.init
         0     0%     0%     4.29MB 34.63%  github.com/docker/libnetwork/ipamutils.init
         0     0%     0%     4.29MB 34.63%  github.com/docker/libnetwork/ipamutils.init.1
    4.29MB 34.63% 34.63%     4.29MB 34.63%  github.com/docker/libnetwork/ipamutils.initGranularPredefinedNetworks
```

After:
```
      flat  flat%   sum%        cum   cum%
         0     0%     0%  4439.37kB 89.66%  runtime.goexit
         0     0%     0%  4439.37kB 89.66%  runtime.main
         0     0%     0%  3882.11kB 78.40%  github.com/docker/docker/cli.(*Cli).Run
         0     0%     0%  3882.11kB 78.40%  main.main
 3882.11kB 78.40% 78.40%  3882.11kB 78.40%  reflect.callMethod
         0     0% 78.40%  3882.11kB 78.40%  reflect.methodValueCall
         0     0% 78.40%   557.26kB 11.25%  github.com/docker/docker/api/server.init
  557.26kB 11.25% 89.66%   557.26kB 11.25%  html.init
         0     0% 89.66%   557.26kB 11.25%  html/template.init
         0     0% 89.66%   557.26kB 11.25%  main.init
```

Now, of course the docker daemon will still need to consume this memory, but
at least now re-execs and such won't have to re-init these variables.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-04 15:25:29 -04:00
msabansal 1804e7e5bb Fixing support for static mac and updating dependencies
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-16 11:07:20 -07:00
msabansal fc702ebf58 Fixed IP information not displayed properly in docker network inspect
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-07 13:20:42 -08:00
Alessandro Boch 184d2a0c6a Merge pull request #970 from chenchun/nil
Add nil ipam driver
2016-03-02 08:22:46 -08:00
Alessandro Boch 5ff4eb2a52 Add nil ipam driver
Signed-off-by: Alessandro Boch <aboch@docker.com>
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-03-02 10:55:38 +07:00
Stefan Weil 18a445b35f Fix some typos in comments and strings
All of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-03-01 16:45:14 +01:00
Alessandro Boch 72d08dc877 Fix cross compilation breakage
- happened becasue of two independent commits

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-17 16:35:11 -08:00
Santhosh Manohar c4197ed3f0 Merge pull request #908 from aboch/dds
Allow pass global datastore config after boot
2016-02-17 15:19:39 -08:00
msabansal 4ac2644797 Fixed build tags for linux files
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-02-17 11:45:51 -08:00
Alessandro Boch be2b6962cc Handle datastore update in Ipam and overlay drivers
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-16 13:49:49 -08:00
msabansal 6d4d4b87cb Windows HNS integration
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-02-12 15:01:37 -08:00
Jana Radhakrishnan 9227b00fea Fix up Godeps and update docker/docker packages
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-23 15:07:33 -08:00
Alessandro Boch 21991ef33a Allow remote IPAM driver to express capability
- So that a DHCP based plugin can express it needs
  the endpoint MAC address when requested for an IP address.
- In such case libnetwork will allocate one if not already
  provided by user

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-17 15:41:47 -08:00
Alessandro Boch 45715ed54b Allow remote ipam driver to return nil address
- This brings the remote ipam driver in pair with the local one.
  As of now remote driver package is assuming a valid address in CIDR
  form is always present in a nil error AddressRequestResponse,
  which is no longer true as community has requested to remove this
  limitation.
- We are ok to remove it until we can provide a null ipam driver
  option in future releases.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-20 23:08:59 -07:00
Alessandro Boch a9386d0076 Change in remote IPAM API payload
- Avoid net.IP and net.IPNet types to ease marshalling/unmarshalling
  at client and server side

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-12 13:03:28 -07:00
Alessandro Boch ec95763dee IPAM driver
- Add IPAM cotract and remote IPAM hooks
 - Add ipam registration in controller
 - Have default IPAM follow ipamapi contract

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-03 16:18:19 -07:00