Commit Graph

316 Commits

Author SHA1 Message Date
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 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
Jana Radhakrishnan 647975a330 Modify driver Join api to only allow dst prefix
Currently the driver api allows the driver to specify the
full interface name for the interface inside the container.
This is not appropriate since the driver does not have the full
view of the sandbox to correcly allocate an unambiguous interface
name. Instead with this PR the driver will be allowed to specify
a prefix for the name and libnetwork and sandbox layers will
disambiguate it with an appropriate suffix.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-21 20:17:44 +00:00
Madhu Venugopal eb8273e466 Merge pull request #162 from squaremo/net-plugin
Implement remote driver
2015-05-21 12:10:56 -07:00
Michael Bridgen b18eff4940 Remote driver implementation
In essense, this just involves marshalling structs back and forth to a
remote process, via the plugin client. There are a couple of types
that don't JSONify well, notably `net.IPNet`, so there is some
translation to be done.

To conform to the driverapi interface, we must give the list of
endpoint interfaces to the remote process, and let it puzzle out what
it's supposed to do; including the possibility of returning an error.

The constraints on EndpointInfo are enforced by the remote driver
implementation; namely:

 * It can't be nil

 * If it's got non-empty Interfaces(), the remote process can't put
   more in

In the latter case, or if we fail to add an interface for some
(future) reason, we try to roll the endpoint creation back. Likewise
for join -- if we fail to set the fields of the JoinInfo, we roll the
join back by leaving.

Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
2015-05-21 19:32:41 +01:00
Jana Radhakrishnan 6a48128ebc Merge pull request #191 from mavenugo/master
Revert "Added more test coverage for portmapper package."
2015-05-21 10:57:21 -07:00
Madhu Venugopal 7c707bc574 Revert "Added more test coverage for portmapper package."
This reverts commit 1d34250950.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-21 10:39:14 -07:00
Jana Radhakrishnan 9909a379b9 Merge pull request #190 from aboch/rest
Fix test failure in api
2015-05-21 10:22:24 -07:00
Alessandro Boch 1bf2e96b08 Fix test failure in api
- Happened during merge

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-21 09:59:35 -07:00
Jana Radhakrishnan 4a6f3c2377 Merge pull request #163 from aboch/eorr
Provide interface to categorize errors
2015-05-21 09:09:15 -07:00
Madhu Venugopal fc02890e06 Merge pull request #179 from aboch/rest
Changes in rest api
2015-05-21 03:51:51 -07:00
Madhu Venugopal 9fa618958a Merge pull request #153 from nerdalert/brent-link-fix
fixing a link in design.md
2015-05-21 01:39:28 -07:00
Alessandro Boch 50964c9948 Provide interface to categorize errors
- Package types to define the interfaces libnetwork errors
  may implement, so that caller can categorize them.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-20 22:29:29 -07:00
Alessandro Boch 39888c3836 Changes in rest api
- Fix POST to collection
- Only resource ID in URI, search by name as query parameter
- Fix URLs, consistency and restrict regex

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-20 16:44:06 -07:00
Madhu Venugopal e2bdf92d6b Merge pull request #187 from mrjana/cross
Move network types to types package
2015-05-20 14:03:52 -07:00
Jana Radhakrishnan 7783fcd13f Move network types to types package
This is need to decouple types from netutils which has linux
dependencies. This way the client code which needs network types
can just pull in types package which makes client code platform
agnostic.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-20 20:28:46 +00:00
Madhu Venugopal b39597744b Merge pull request #182 from mrjana/cnm_integ
Fix /etc/resolv.conf permission issue
2015-05-19 22:57:58 -07:00
Jana Radhakrishnan a5ed1b5bd4 Fix /etc/resolv.conf permission issue
The container's /etc/resolv.conf permission was getting setup
as 0600 while it should be 0644 for every user inside the
container to be able to read it. The tempfile that we create
initially to populate the resolvconf content is getting created
with 0600 mode. Changed it to 0644 once it is created since there
is noway to pass mode option to ioutil.Tempfile

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-20 05:46:30 +00:00
Jana Radhakrishnan a02aac8e0b Merge pull request #178 from mavenugo/master
Porting https://github.com/docker/docker/pull/12437
v0.2
2015-05-19 15:35:30 -07:00
Madhu Venugopal 7308fd4489 Porting https://github.com/docker/docker/pull/12437
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 15:28:48 -07:00
Madhu Venugopal 47f8b25ffb Merge pull request #177 from mrjana/cnm_integ
Cleanup namespace files
2015-05-19 15:24:32 -07:00
Jana Radhakrishnan f88f4f01c4 Cleanup namespace files
It may happen that the application (docker) may exit ungracefully
exit without calling leaves on endpoint and may result in stale
namespace files. So if a sandbox is created with the same key
attempt to cleanup the file if it exists before creating the
sandbox.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-19 22:11:09 +00:00
Jana Radhakrishnan fb2c0dfbad Merge pull request #168 from mavenugo/dnet-integ
Client / API integration & dnet tool
2015-05-19 14:32:07 -07:00
Madhu Venugopal fa78a98fc6 Initial dnet tool to test and manage libnetwork end-to-end
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 14:10:30 -07:00
Madhu Venugopal 2b57d3f0ee Godep update to pull in parsers and term packages
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 14:10:30 -07:00
Madhu Venugopal 8644d00d3c Client to make use of REST API
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 14:10:30 -07:00
Madhu Venugopal 4ba1540409 Fixed some basic client UI issues for the "network" command
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-19 14:10:22 -07:00