Commit Graph

19 Commits

Author SHA1 Message Date
Alessandro Boch 651f6ea0fa 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 64a2d2a3a2 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 c7684b5ff7 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 22801e071f 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 7089723ee2 Fixing support for static mac and updating dependencies
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-16 11:07:20 -07:00
msabansal 679ee7a070 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 b532754b19 Merge pull request #970 from chenchun/nil
Add nil ipam driver
2016-03-02 08:22:46 -08:00
Alessandro Boch ac1ec348ff 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 13451d9a07 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 48a7860211 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 f845a45b4f Merge pull request #908 from aboch/dds
Allow pass global datastore config after boot
2016-02-17 15:19:39 -08:00
msabansal 3ff94689ef Fixed build tags for linux files
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-02-17 11:45:51 -08:00
Alessandro Boch 5dc5acfa58 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 9871032e4d Windows HNS integration
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-02-12 15:01:37 -08:00
Jana Radhakrishnan e026deb981 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 29299b73df 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 379609e362 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 8d56508190 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 2aaef377f3 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