Commit Graph

341 Commits

Author SHA1 Message Date
Jana Radhakrishnan 6cacb70196 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-06-29 23:10:30 -07:00
Madhu Venugopal cb9c2bfaa2 Merge pull request #315 from mrjana/docker1.7.0_integ
Use ioctl to create bridge
2015-06-18 16:25:50 -07:00
Jana Radhakrishnan 36bcacd1c6 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-06-18 16:04:06 -07:00
Jana Radhakrishnan 7b9631cd46 Updated Godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-18 16:04:06 -07:00
Madhu Venugopal b116b5c0d2 Merge pull request #303 from icecrime/cherry-picks-1.7.0
Cherry picks 1.7.0
v0.3
2015-06-16 11:28:50 -07:00
Madhu Venugopal 78fef19fc6 Fixed the tests.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-16 11:23:13 -07:00
Arnaud Porterie 6c07f504c3 Fix duplicated iptables rules
The `iptables.Exists` function is wrong in two ways:
1. The iptables -C call doesn't add `-j DOCKER` and fails to match
2. The long path takes ordering into account in comparison and fails to match

This patch fixes issue 1 by including `-j DOCKER` in the check.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-06-16 11:23:08 -07:00
Madhu Venugopal c32ef60c4b Cleaning up iptables nat table on driver bootup
This is required to have consistent behaviour as in 1.6.2.

Signed-off-by: Madhu Venugopal <madhu@docker.com>

Conflicts:
	drivers/bridge/bridge.go
2015-06-16 10:41:17 -07:00
Jana Radhakrishnan e578e95aa1 Merge pull request #281 from mavenugo/hairpin
enable hairpin mode on the bridge port & fix iptables rule
2015-06-11 17:25:09 -07:00
Madhu Venugopal 9548cbe674 enable hairpin mode on the bridge port & fix iptables rule
* When userland-proxy is disabled, enable hairpin mode on the host-side of the veth
* When userland-proxy is enabled, fix the iptable rules appropriately

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-11 17:06:07 -07:00
Jana Radhakrishnan 90638ec9cf Merge pull request #275 from mrjana/docker1.7.0_integ
Check GC loop is active/necessary before triggering GC
2015-06-10 15:05:51 -07:00
Phil Estes 22f8e6bbab Check GC loop is active/necessary before triggering GC
Calling GC() without ever creating a network namespace (sandbox on
Linux) will hang as the GC loop is not running (and therefore the
channel is not being listened to).

Tested via Docker that this corrects a daemon shutdown error if the
daemon is started and stopped without any containers or networks being
created while the daemon is up.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2015-06-10 14:54:08 -07:00
Madhu Venugopal 8b3374153e Merge pull request #274 from mrjana/docker1.7.0_integ
Generate container mac address based on IP
2015-06-10 14:43:19 -07:00
Jana Radhakrishnan 9c6e929b63 Generate container mac address based on IP
Currently we craete container mac address completely
randomly. But we probably need to generate based on
IP so that the mac address stays the same for a given
IP.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-10 14:21:24 -07:00
Madhu Venugopal ace6b57623 Merge pull request #263 from mrjana/docker1.7.0_integ
Add support to trigger immediate garbage collection
2015-06-05 14:57:53 -07:00
Jana Radhakrishnan 68d42b860c Add support to trigger immediate garbage collection
Right now the namespace paths are cleaned up every
garbage collection period. But if the daemon is restarted
before all the namespace paths of removed containers are
garbage collected they will remain there forever. The fix
is to provide a GC() api so that garbage collection can be
triggered immediately.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-05 14:46:46 -07:00
Madhu Venugopal c624d72ce9 Merge pull request #261 from mavenugo/docker1.7.0_integ
Update netns to include support for PowerPC LE (ppc64le) architecture
2015-06-05 14:22:36 -07:00
Pradipta Kr. Banerjee 6532b64a07 Update netns to include support for PowerPC LE (ppc64le) architecture
Current version of netns used in libnetwork do not have requisite syscall
entry for PowerPC (ppc64le) arch. Consequently docker which uses libnetwork fails
to create any network enabled containers on Power systems.

This patch updates netns to latest commit 5478c060110032f972e86a1f844fdb9a2f008f2c
to add ppc64le syscall entry.

Signed-off-by: Pradipta Kr. Banerjee <bpradip@in.ibm.com>
2015-06-05 13:09:25 -07:00
Jana Radhakrishnan f72ad20491 Merge pull request #254 from aboch/docker1.7.0_integ
Change in bridge EndpointOperInfo()
2015-06-03 21:09:44 -07:00
Alessandro Boch 2133cdc219 Change in bridge EndpointOperInfo()
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-03 20:52:23 -07:00
Jana Radhakrishnan 005bc475ee Merge pull request #247 from mrjana/docker1.7.0_integ
Do not warn in packages
2015-06-02 16:37:19 -07:00
Michael Crosby d1d67dca84 Do not warn in packages
Do not have log output in packages that applications consume because the
output can mess with logs, stdout/stderr of applications and such and
there is nothing that the consumer can do about it other than change the
package that they are using.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-02 16:28:36 -07:00
Jana Radhakrishnan 4ded6fe364 Merge pull request #231 from mavenugo/1.7.0
Fixes https://github.com/docker/docker/issues/13426
2015-05-29 12:49:47 -07:00
Madhu Venugopal effb423db7 Fixes https://github.com/docker/docker/issues/13426
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-29 11:22:52 -07:00
Madhu Venugopal a5ac79f562 Merge pull request #230 from mrjana/docker1.7.0_integ
Fix miscellaneous data races
2015-05-28 17:30:50 -07:00
Jana Radhakrishnan 694754890c Fix miscellaneaus data races
Fixed the remaining data races in the libnetwork code.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-28 23:29:21 +00:00
Madhu Venugopal 7c2a2c8a87 Merge pull request #229 from mrjana/docker1.7.0_integ
Modprobe bridge driver specific kernel modules
2015-05-28 14:30:29 -07:00
Jana Radhakrishnan 1ab46c7c4b Modprobe bridge driver r specific kernel modules
Try too modprobe bridge driverer specic modulein case
they are not loaded into the kernel.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-28 20:01:00 +00:00
Madhu Venugopal 2da2dc055d Merge pull request #226 from mrjana/docker1.7.0_integ
Remove the init time cleanup of namespace files
2015-05-27 16:59:45 -07:00
Jana Radhakrishnan 83799f7458 Removee the init time cleanup of namespace files
Removing this as this may cause problems when
multiple instances are e running.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-27 23:49:32 +00:00
Madhu Venugopal 60da50e183 Merge pull request #225 from mrjana/docker1.7.0_integ
Rework garbage collection code to use tick
2015-05-27 15:16:57 -07:00
Jana Radhakrishnan b028371e0a Reworkkgarbage collection code to use tick
Instead of sleeping reworked the code to use recurring ticks.
Also cleaned up unnecessary defers.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-27 21:52:21 +00:00
Madhu Venugopal fc2dfe5201 Merge pull request #224 from mrjana/docker1.7.0_integ
Loopback interface not  brought up
2015-05-27 13:44:37 -07:00
Jana Radhakrishnan 051f4ccdad Loopback interface not t brought up
Loopback interface was s not brought up when wemoved
to clone method of creating namespace. e. Adding it.
Also taking care of PR R comments.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-27 20:20:24 +00:00
Madhu Venugopal a4d595b6e7 Merge pull request #223 from mrjana/docker1.7.0_integ
Workaround kernel bugs s related to namespaces
2015-05-27 12:23:27 -07:00
Jana Radhakrishnan 05462c27b2 Workaround kernel bugs s related to namespaces
This PR attempts to work around bugs present in kernel
version 3.18-4.0.1 relating to namespace creation
and destruction. This fix attempts to avoid certain
systemmcalls to not get in the kkernel bug path as well
as lazily garbage collecting the name paths when they are removed.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-27 19:06:19 +00:00
Jana Radhakrishnan 6743808072 Merge pull request #206 from mavenugo/experimental
Moved all the service commands under experimental build tag
2015-05-23 18:02:57 -07:00
Jana Radhakrishnan 8b61195508 Merge pull request #205 from mavenugo/api_version
Added a catch-all root hierarchy for the API path
2015-05-23 18:02:10 -07:00
Madhu Venugopal 74c93b8c68 UI formatting applied on top of Experimental Service PR
Thanks to @nerdalert for the contribution via #203.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-23 16:00:42 -07:00
Madhu Venugopal ed7cba986e Moved all the service commands under experimental build tag
In order to support the docker experimental feature build, moving the
service commands under experimental tag. Please refer to :
https://github.com/docker/docker/pull/13338/ for more information

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-23 13:05:48 -07:00
Madhu Venugopal 377066c62c Added a catch-all root hierarchy for the API path
Though libnetwork api is supposed to handle the sub router, it is given
the entire URL to deal with. But the current api.go assumes the network/
to be in the root path.
We need this patch to make it work seamlessly with docker & dnet UI & API

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-23 12:20:30 -07:00
Madhu Venugopal ba22b50a6a Merge pull request #195 from LK4D4/dummyproxy
Add dummy proxy on port map
2015-05-22 13:53:15 -07:00
Alexander Morozov 198f0ef7cf Add dummy proxy on port map
It is needed in cases when mapped port is already bound, or another
application bind mapped port. All this will be undetected because we use
iptables and not net.Listen.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-22 12:38:28 -07:00
Jana Radhakrishnan 429678548b Merge pull request #196 from mavenugo/api-changes
Modified Client to make use of the corrected REST API & service endpoint support
2015-05-22 11:02:07 -07:00
Madhu Venugopal 3892c2db42 Service endpoint UI support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-22 09:53:24 -07:00
Madhu Venugopal 1f0f737948 Adding support for network/id/endpoints in api
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-22 09:53:19 -07:00
Madhu Venugopal 17bfe1f3f5 Modified Client to make use of the corrected REST API
Also supporting name, id & partial-id lookups for all the network
commands

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-21 17:38:40 -07:00
Jana Radhakrishnan 3253d89aed Merge pull request #194 from aboch/rest
REST API: Support query by partial id
2015-05-21 14:56:46 -07:00
Alessandro Boch 3dec1a68e0 REST API: Support query by partial id
- for networks and endpoints

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-21 14:37:21 -07:00
Madhu Venugopal bc56eb5053 Merge pull request #193 from mrjana/cnm
Modify driver Join api to only allow dst prefix
2015-05-21 13:58:22 -07:00