Commit graph

318 commits

Author SHA1 Message Date
Mingzhen Feng
9c9c79f1b0 fixed some typos
Signed-off-by: Mingzhen Feng <fmzhen@zju.edu.cn>
2015-05-25 21:08:53 +08:00
Jana Radhakrishnan
31404b26aa Merge pull request #209 from mavenugo/fixapi
Added API support for both /vx.x/networks & /networks
2015-05-24 21:37:41 -07:00
Jana Radhakrishnan
26588b476b Merge pull request #172 from junxu/master
Fix RemoveInterface in sandbox
2015-05-24 20:12:24 -07:00
junxu
820712cae6 Fix RemoveInterface in sandbox
The networkNamespace will record all interfaces joined into this sandbox.
While RremoveInterface func does't remove the leaved interfaces.

Signed-off-by: junxu <xujun@cmss.chinamobile.com>
2015-05-25 01:53:24 +00:00
Jana Radhakrishnan
38126e8e53 Merge pull request #210 from aboch/lb
In bridge, network config to be validated last
2015-05-24 16:40:34 -07:00
Madhu Venugopal
e20e7bbbfe Added API support for both /vx.x/networks & /networks
In one of the previous commit, we went to the extreme of supporting just
the /{version}/networks. Though that satisfied the requirements for UI
integration, it is not fully consistent with Docker APIs.
Docker API supports both /{version}/resource and /resource and hence we
must add the same support for networks resource.

Also fixed a silly bug in api.go

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-24 15:17:47 -07:00
Alessandro Boch
e244043eb3 In bridge, network config to be validated last
- Currently validation is run before the processing
  of well-known labels is completed.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-24 12:01:55 -07:00
Madhu Venugopal
03dc873478 Merge pull request #202 from aboch/mn
Bridge driver to support multiple networks
2015-05-24 08:21:19 -07:00
Alessandro Boch
35fab0aa6f Bridge driver to support multiple networks
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-24 07:59:34 -07:00
Jana Radhakrishnan
35672dacaf Merge pull request #199 from aboch/rest
Support network options in rest api
2015-05-23 22:06:21 -07:00
Alessandro Boch
5d9c59e523 Support network options in rest api
- Also unexporting configuration structures in bridge
- Changes in dnet/network.go to set bridge name = network name

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-23 20:12:29 -07:00
Jana Radhakrishnan
2ba2884981 Merge pull request #200 from codergr/orthographic-corrections2
Proofing design and bridge documentations
2015-05-23 18:04:51 -07:00
Jana Radhakrishnan
9c480e81be 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
1277b7c0b9 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
a550562ad4 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
f1712c0bf6 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
a1c3dce3e9 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
c14334bfc7 Merge pull request #195 from LK4D4/dummyproxy
Add dummy proxy on port map
2015-05-22 13:53:15 -07:00
Alexander Morozov
97adea5b77 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
Sotiris Salloumis
49f742eaff Orthographic corrections
Signed-off-by: Sotiris Salloumis <sotiris.salloumis@gmail.com>

Added notes from dave-tucker

Signed-off-by: Sotiris Salloumis <sotiris.salloumis@gmail.com>

Added Proofing design documentation input from dereckson

Signed-off-by: Sotiris Salloumis <sotiris.salloumis@gmail.com>
2015-05-22 20:19:34 +02:00
Jana Radhakrishnan
0d62997f3b 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
0653afc5f5 Service endpoint UI support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-22 09:53:24 -07:00
Madhu Venugopal
b5a6c849e3 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
5ee5e2452f 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
ef6ddb33f5 Merge pull request #194 from aboch/rest
REST API: Support query by partial id
2015-05-21 14:56:46 -07:00
Alessandro Boch
e97b1e05a8 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
9247a5bf68 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
89045ca381 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
5dc21d4a3e Merge pull request #162 from squaremo/net-plugin
Implement remote driver
2015-05-21 12:10:56 -07:00
Michael Bridgen
7934979f40 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
39fe941365 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
dbb71728f9 Revert "Added more test coverage for portmapper package."
This reverts commit 2fc4f3154f.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-21 10:39:14 -07:00
Jana Radhakrishnan
a82b6032d3 Merge pull request #190 from aboch/rest
Fix test failure in api
2015-05-21 10:22:24 -07:00
Alessandro Boch
8942de9410 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
956fd3f679 Merge pull request #163 from aboch/eorr
Provide interface to categorize errors
2015-05-21 09:09:15 -07:00
Madhu Venugopal
03be965deb Merge pull request #179 from aboch/rest
Changes in rest api
2015-05-21 03:51:51 -07:00
Madhu Venugopal
c4ce3ac5ce 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
c70cfcb150 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
7d80a5a84a 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
ad78050657 Merge pull request #187 from mrjana/cross
Move network types to types package
2015-05-20 14:03:52 -07:00
Jana Radhakrishnan
a9fa764cbb 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
36294e8253 Merge pull request #182 from mrjana/cnm_integ
Fix /etc/resolv.conf permission issue
2015-05-19 22:57:58 -07:00
Jana Radhakrishnan
407e41d394 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
9a4894193f Merge pull request #178 from mavenugo/master
Porting https://github.com/docker/docker/pull/12437
2015-05-19 15:35:30 -07:00
Madhu Venugopal
56375f3687 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
f38ad0c939 Merge pull request #177 from mrjana/cnm_integ
Cleanup namespace files
2015-05-19 15:24:32 -07:00
Jana Radhakrishnan
8c5750558a 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
fcc53363cf Merge pull request #168 from mavenugo/dnet-integ
Client / API integration & dnet tool
2015-05-19 14:32:07 -07:00
Madhu Venugopal
36a0f91b5d 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
57628535ba 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