Commit Graph

589 Commits

Author SHA1 Message Date
aboch 33d8e828aa Merge pull request #431 from mavenugo/vagrant
Fixing Vagrant to use ubuntu 15.04 to pull Experimental docker version
2015-08-01 10:33:26 -07:00
Madhu Venugopal b4cc3c4c1c Fixing Vagrant to use ubuntu 15.04 to get Experimental docker working again
14.10 reached EOL recently and hence experimental builds are not built for
that distro any more. Upgrading it to 15.04 means handling the systemd
specific docker daemon configs required for multi-host networking.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-07-31 18:08:27 -07:00
Jana Radhakrishnan 69ca590d5d Merge pull request #424 from mavenugo/nlioctl
Prefer Netlink over ioctl
2015-07-30 10:20:07 -07:00
Madhu Venugopal 783efcd822 Merge pull request #423 from mrjana/bugs
Fix data race in controller sandboxes
2015-07-30 09:42:28 -07:00
Madhu Venugopal 79b3e7761d Prefer Netlink calls over ioctl
As seen in https://github.com/docker/docker/issues/14738 there is
general instability in the later kernels under race conditions when ioctl
calls are used in parallel with netlink calls for various operations.
(We are yet to narrow down to the exact root-cause on the kernel).

For those older kernels which doesnt support some of the netlink APIs,
we can fallback to using ioctl calls. Hence bringing back the original
code that used netlink (https://github.com/docker/libnetwork/pull/349).

Also, there was an existing bug in bridge creation using netlink which
was setting bridge mac during bridge creation. That operation is not
supported in the netlink library (and doesnt throw an error either).
Included a fix for that condition by setting the bridge mac after
creating the bridge.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-07-30 09:10:22 -07:00
Madhu Venugopal aa9c60c86b Merge pull request #421 from aboch/kn
Incorrect kernel version check in bridge
2015-07-30 08:15:02 -07:00
Alessandro Boch 7f1bd47fac Incorrect kernel version check in bridge
- Kernel version check logic was wrong

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-30 06:51:43 -07:00
Jana Radhakrishnan 81edaa64a7 Fix data race in controller sandboxes
The controller sandboxes hashmap is not being protected by a lock
while deleting it in `LeaveAll` call. This may result in a race
whereby any other read access that happens with the lock held is
also vulnerable to return random sandbox data which could result
in totally unpredictable behavior.

Also as part of the fix check if `s.endpoints` is empty and log an
error in `rmEndpoint` so that we don't bring down the process
for this unexpected error.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-29 23:57:50 -07:00
Jana Radhakrishnan cd3ea5bd2c Merge pull request #300 from aboch/qr
Pass proper regex to mux for query fields
2015-07-29 09:47:17 -07:00
Jana Radhakrishnan 4d6e9ae0da Merge pull request #249 from erikh/expose-api
Expose the remote driver API structs publicly.
2015-07-29 08:47:50 -07:00
Madhu Venugopal 979a0eb2e4 Merge pull request #419 from mountkin/avoid-iface-leak-on-error
make sure the interfaces is cleared on error
2015-07-29 08:20:28 -07:00
Shijiang Wei 21e6f10be6 make sure the interfaces is cleared on error
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-07-29 20:15:02 +08:00
Madhu Venugopal 0cc39f8727 Merge pull request #417 from aboch/cgw
Misc fixes to ipallocator & bridge driver about FixedCIDR
2015-07-28 18:05:19 -07:00
Alessandro Boch dbe6172d8c Misc fixes to ipallocator & bridge driver about FixedCIDR
- NetworkRange() function on which ipallocatore relies
  to compute the subnet limits has a bug in computing the upper limit IP
- in case container subnet is specified (fixedCIDR), bridge driver to
  reserve bridge and gateway addresses only if they belong to the container
  subnet
- Make ipallocator more robust in using converting the passed network
  to a canonical one before using it as a key in its public APIs

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-27 18:12:33 -07:00
Jana Radhakrishnan f1c5671f1e Merge pull request #416 from aboch/ag
Misc fixes to ip allocation in bridge driver
2015-07-24 17:09:17 -07:00
Alessandro Boch fd896b98ce Misc fixes to ip allocation in bridge driver
Two changes were missing:
- On allocation of bridge ip was not passing canonical subnet
- Canonical subnet has to be passed on ip release
  as well, otherwise ipallocator will attempt
  ip release from a non registered nw

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-24 16:59:27 -07:00
aboch bf4ea43b71 Merge pull request #412 from mrjana/bugs
Use sysfs to set hairpin mode
2015-07-24 12:03:53 -07:00
Jana Radhakrishnan 9740746cf5 Merge pull request #409 from alecbenson/iccfix
Fix ICC on Fedora systems with Firewalld
2015-07-24 10:46:03 -07:00
Jana Radhakrishnan ef0378b1f3 Merge pull request #288 from aboch/ag
Pass a canonical subnet to ipallocator
2015-07-24 10:45:20 -07:00
Jana Radhakrishnan 22e60f160b Use sysfs to set hairpin mode
Set the hairpin mode using the sysfs interface which
looks like it is working all the way to the oldest
of RHEL6.6 kernels.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-24 10:26:08 -07:00
Alec Benson 7110f5ae6c Fix ICC on Firewalld enabled fedora systems, add in missing firewalld functionality to re-apply configuration when reloaded
Signed-off-by: Alec Benson <albenson@redhat.com>
2015-07-24 13:20:48 -04:00
Jana Radhakrishnan 1a4cce64a3 Merge pull request #413 from pyakpyak/master
deadlock fix in RemoveStaticRoute
2015-07-24 08:11:15 -07:00
Andrei Ushakov 730604773c deadlock fix in RemoveStaticRoute 2015-07-24 01:32:35 -07:00
Jana Radhakrishnan 4348eb8a3f Merge pull request #410 from kunalkushwaha/network-help-experimental
Reduced the two spaces for network help
2015-07-23 13:45:08 -07:00
Kunal Kushwaha 3307a15208 Reduced the two spaces for network help, required to pass tests at docker build
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2015-07-23 11:46:57 +09:00
Madhu Venugopal 759cf09e97 Merge pull request #403 from mrjana/overlay
Sometimes fdb points to wrong vtep
2015-07-23 05:09:02 +05:30
Madhu Venugopal 41deb53c4e Merge pull request #306 from kvasdopil/freebsd-work
make libnetwork compile on freebsd (again)
2015-07-23 02:55:53 +05:30
Alexey Guskov 69e7002c89 make libnetwork compile on freebsd (again)
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-07-21 19:41:01 +03:00
Jana Radhakrishnan c7b0931862 Sometimes fdb points to wrong vtep
When you start a container after some other container has already
been started in the same network, the current container will have
an fdb which points to a wrong vtep to reach the already started
container. This makes the network connectivity to not work. The root
cause of the issue is because of golang does variable capture by
reference in closures and so we cannot use the return values from
range iterators directly. It needs to be copied to a locally scoped
variable and then use that copy as a capture variable in the closure.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-20 18:01:40 -07:00
Jana Radhakrishnan 0a26da6d73 Merge pull request #400 from QthCN/fix/readme_err
FIX incorrect usage about libnetwork.New() in README.md
2015-07-20 14:46:24 -07:00
TianHuan 0352dc3f83 FIX incorrect usage about libnetwork.New() in README.md
libnetwork.New() should return a controller and an error. The
example in README.md ignore the error now, which will let the
codes can not be compiled by Go.
2015-07-20 21:59:05 +08:00
Jana Radhakrishnan 2a5cb84758 Merge pull request #398 from LK4D4/remove_libcontainer_dep
Remove dependency on libcontainer
2015-07-16 13:53:04 -07:00
Alexander Morozov fb6dd9766e Remove dependency on libcontainer
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-16 13:26:26 -07:00
Erik Hollensbe 100f13fff5 Expose the remote driver API structs publicly. 2015-07-16 06:11:50 +00:00
Jana Radhakrishnan f7fb8b127c Merge pull request #396 from pyakpyak/master
fix for #14633, use original nexthop ip value instead of obtained via…
2015-07-15 09:08:11 -07:00
Andrei Ushakov d2963ca9ca fix for #14633, use original nexthop ip value instead of obtained via RouteGet 2015-07-14 20:16:01 -07:00
Jana Radhakrishnan 1f1733c91c Merge pull request #371 from mavenugo/v6
Fixed a bug in DeleteEndpoint to properly release v6 ip
2015-07-10 10:04:57 -06:00
Madhu Venugopal bc3bf488c3 Fixed a bug in DeleteEndpoint to properly release v6 ip
When fixed-cidrv6 is used, the allocation and release must happen from
the appropriate network. Allocation is done properly in createendpoint,
but the DeleteEndpoint wasnt taking care of this case.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-07-09 20:46:36 -07:00
Jana Radhakrishnan 2d094748d9 Merge pull request #336 from alecbenson/check-kernel-params
Refactor of docker PR #11405
2015-07-09 12:25:59 -06:00
Jana Radhakrishnan a7fb18793f Merge pull request #355 from chenchun/compile
Use github golang tools mirror
2015-07-09 12:25:00 -06:00
Madhu Venugopal d6b189f249 Merge pull request #367 from crquan/patch-1
fix file descriptor leak of ".../ip_local_port_range"
2015-07-09 12:14:24 +05:30
Alec Benson ec88bd0a72 Refactor of docker PR #11405
Signed-off-by: Alec Benson <albenson@redhat.com>
2015-07-08 10:15:08 -04:00
Derek 1accb4da40 fix file descriptor leak of ".../ip_local_port_range"
fix file descriptor leak of "/proc/sys/net/ipv4/ip_local_port_range"
2015-07-07 16:56:24 -07:00
Madhu Venugopal 0517ceae7d Merge pull request #366 from mrjana/cnm
BitSequence should unmarshal data during get
2015-07-07 09:21:57 +08:00
Madhu Venugopal 161770051f Merge pull request #357 from runseb/vagrant-docs
Some users docs with a Vagrant setup
2015-07-07 09:19:15 +08:00
Jana Radhakrishnan 8e69328c3b BitSequence should unmarshal data during get
When bit sequence is trying to get key/value from the
data store it should always unmarshall the json data
before using it, as the data is JSON marshalled before
storing it in the data store.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-06 11:25:42 -07:00
Jana Radhakrishnan 8fb0a8bc9e Merge pull request #363 from aboch/nf
Fix incorrect error handling in bitseq constructor
2015-07-05 22:16:54 -07:00
Alessandro Boch 4f6d381470 Fix incorrect error handling in bitseq constructor
- We must ignore key not found error when querying
  datastore for initial state.
- Regression introduced by e2a63dff5a

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-04 17:35:55 -07:00
Jana Radhakrishnan 72ac684e76 Merge pull request #361 from dave-tucker/bug/358
Use IANA assigned VXLAN port
2015-07-02 23:14:09 -07:00
Dave Tucker f5df0c6bbd Use IANA assigned VXLAN port
Fixes #358

Signed-off-by: Dave Tucker <dt@docker.com>
2015-07-03 03:43:02 +01:00