Commit graph

432 commits

Author SHA1 Message Date
Jana Radhakrishnan
dc3bb60faa Merge pull request #288 from aboch/ag
Pass a canonical subnet to ipallocator
2015-07-24 10:45:20 -07:00
Andrei Ushakov
b62013c24c deadlock fix in RemoveStaticRoute 2015-07-24 01:32:35 -07:00
Kunal Kushwaha
83b6a338a4 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
413224ea84 Merge pull request #403 from mrjana/overlay
Sometimes fdb points to wrong vtep
2015-07-23 05:09:02 +05:30
Alexey Guskov
94ca1f5bba make libnetwork compile on freebsd (again)
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-07-21 19:41:01 +03:00
Jana Radhakrishnan
524b3dca97 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
TianHuan
951dcbe85e 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
Alexander Morozov
55e7175f64 Remove dependency on libcontainer
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-16 13:26:26 -07:00
Andrei Ushakov
b4e87d5c98 fix for #14633, use original nexthop ip value instead of obtained via RouteGet 2015-07-14 20:16:01 -07:00
Madhu Venugopal
981686787b 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
83ca3ba01f Merge pull request #336 from alecbenson/check-kernel-params
Refactor of docker PR #11405
2015-07-09 12:25:59 -06:00
Jana Radhakrishnan
456b0d1463 Merge pull request #355 from chenchun/compile
Use github golang tools mirror
2015-07-09 12:25:00 -06:00
Alec Benson
90a410eb3d Refactor of docker PR #11405
Signed-off-by: Alec Benson <albenson@redhat.com>
2015-07-08 10:15:08 -04:00
Derek
f88ad7d340 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
4a8b4af8af Merge pull request #366 from mrjana/cnm
BitSequence should unmarshal data during get
2015-07-07 09:21:57 +08:00
Madhu Venugopal
8b6b55f188 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
6692b6d072 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
Alessandro Boch
8c3c747c62 Fix incorrect error handling in bitseq constructor
- We must ignore key not found error when querying
  datastore for initial state.
- Regression introduced by 04bd8f67ad

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-07-04 17:35:55 -07:00
Dave Tucker
6bba1cd7b1 Use IANA assigned VXLAN port
Fixes #358

Signed-off-by: Dave Tucker <dt@docker.com>
2015-07-03 03:43:02 +01:00
Jana Radhakrishnan
00456020f5 Adjust overlay driver for netlink api change
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 10:39:43 -07:00
Jana Radhakrishnan
70429527b0 Honor driver side resolv.conf file
For the moment in 1.7.1 since we provide a resolv.conf set api
to the driver honor that so that for host driver we can use the
the host's /etc/resolv.conf file as is rather than putting the
contents through a filtering logic.

It should be noted that the driver side capability to set the
resolv.conf file is most likely going to go away in the future
but this should be fine for 1.7.1

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 10:39:06 -07:00
Jana Radhakrishnan
a22d29b7cf Update vishvananda/netlink package
PR to update to vishvananda/netlink package

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 09:32:22 -07:00
Jana Radhakrishnan
10444cb448 Manually bring up the host side veth interface
In preparation for the new update of vishvananda/netlink package
we need to bringup the host veth interface manually.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 09:32:03 -07:00
Jana Radhakrishnan
15759edb38 Fix networking issues in RHEL/Centos 6.6
Some parts of the bridge driver code needs to use a different kernel
api or use the already existing apis in slightly different ways to
make the bridge driver work in RHEL/Centos 6.6. This PR provides
those fixes.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 09:31:13 -07:00
Jana Radhakrishnan
885056b243 Use ioctls to create bridge
The netlink way of creating bridge has problems in older
kernels like the one used on RHEL 6 (which is a supported
one). So trying to use ioctl method to create bridge
so that it works on any version.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 09:27:53 -07:00
Jana Radhakrishnan
a35025569e Updated Godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-07-02 09:24:12 -07:00
Sebastien Goasguen
ca7aa81de8 Some users docs with a Vagrant setup 2015-07-01 23:04:46 +02:00
Sebastien Goasguen
e714096b54 small typo in the requirements 2015-07-01 15:35:52 +02:00
Chun Chen
1a52238be9 Use github golang tools mirror
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-07-01 12:57:39 +08:00
Madhu Venugopal
ee82cc7254 Merge pull request #270 from amylindburg/master
Update ROADMAP.md
2015-06-30 17:14:56 -07:00
Madhu Venugopal
1f1bb1700a Updating to latest netns to fix amd64 / RPI issues
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-30 14:46:49 -07:00
Alessandro Boch
a3879fc169 Endpoint interface stats read fails when invoked from docker
- When invoked from docker, endpoint.Statistics() returns
  the statistics of the host's interfaces.

  Issue is tracked down to ioutil.ReadFile(). For some
  reason even if invoked from inside the sandbox netns,
  it ends up reading the stats file from the default netns,
  when invoked from docker.
  If same operation is run from inside a dedicated binary,
  it works as expected.

- Replacing it with exec.Command("cat", <file>) solves the issue

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-29 20:29:41 -07:00
Madhu Venugopal
667f714bc7 Merge pull request #342 from alexwlchan/master
Minor spelling fixes in documentation and code comments
2015-06-29 19:57:09 -07:00
Alessandro Boch
5ac330aca2 Endpoint to expose interfaces' statistics
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-29 16:15:31 -07:00
Matt Bentley
1cba00c62b Fixed URL used by curl in overlay readme
Signed-off-by: Matt Bentley <mbentley@mbentley.net>
2015-06-26 21:07:26 -04:00
Jana Radhakrishnan
a4e942d9b4 Merge pull request #339 from nerdalert/overlay-doc
multi-host overlay driver quick start doc
2015-06-26 13:15:49 -07:00
Jana Radhakrishnan
f621be2b30 Merge pull request #335 from glevand/for-merge-netns
netns: Update to latest for arm64
2015-06-26 13:14:57 -07:00
Madhu Venugopal
5344e75e4e Merge pull request #278 from LK4D4/firewalld_support
Resurrect firewalld support
2015-06-26 13:12:19 -07:00
Alex Chan
2e64ce637b Minor spelling fixes in documentation and code comments 2015-06-26 11:02:54 +01:00
Brent Salisbury
6ed26709bd multi-host overlay driver quick start doc 2015-06-25 21:47:41 -07:00
aboch
b1f84e6f12 Merge pull request #304 from wulonghui/wulonghui-patch-1
Update modprobe bridge output
2015-06-25 16:51:30 -07:00
aboch
f6ee03ae88 Merge pull request #333 from calavera/extra_conditional
Remove extra conditional.
2015-06-25 14:59:19 -07:00
Geoff Levand
cacdd39761 netns: Update to latest for arm64
Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-06-25 14:22:00 -07:00
Spike Curtis
04bd8f67ad Datastore handles creating objects atomically.
In that commit, AtomicPutCreate takes previous = nil to Atomically create keys
that don't exist.  We need a create operation that is atomic to prevent races
between multiple libnetworks creating the same object.

Previously, we just created new KVs with an index of 0 and wrote them to the
datastore.  Consul accepts this behaviour and interprets index of 0 as
non-existing, but other data backends do no.

 - Add Exists() to the KV interface.  SetIndex() should also modify a KV so
   that it exists.
 - Call SetIndex() from within the GetObject() method on DataStore interface.
   - This ensures objects have the updated values for exists and index.
 - Add SetValue() to the KV interface.  This allows implementers to define
   their own method to marshall and unmarshall (as bitseq and allocator have).
 - Update existing users of the DataStore (endpoint, network, bitseq,
   allocator, ov_network) to new interfaces.
 - Fix UTs.
2015-06-25 10:53:48 -07:00
David Calavera
1d5698936a Remove extra conditional.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-06-25 09:58:16 -07:00
Jana Radhakrishnan
ce88039f44 Merge pull request #328 from wulonghui/wulonghui-patch-3
Update error return in bridge driver's getNetwork
2015-06-24 23:59:54 -07:00
wulonghui
df56ce5f47 Update error return in bridge driver's getNetwork 2015-06-25 19:33:46 +08:00
Jana Radhakrishnan
28c2445dad Do not update /etc/hosts for empty endpoints
There is no need to update the /etc/hosts files
of containers for endpoints which are created/deleted
in a network whose interface list is empty

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-24 12:09:44 -07:00
Alexander Morozov
63514b2749 Resurrect firewalld support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-06-21 16:42:01 -07:00
Madhu Venugopal
f7c37712ea Fixing a windows compile error in docker during vendor-in
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-21 02:32:07 -07:00