1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

244 commits

Author SHA1 Message Date
Madhu Venugopal
ae8643748d Libnetwork Host Discovery using Swarm Discovery pkg
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:40 -07:00
Madhu Venugopal
ef1293ce5a Updating Godep to pull in Set functionality
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:40 -07:00
Madhu Venugopal
481568035f TOML based Configuration support for libnetwork
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:40 -07:00
Madhu Venugopal
8324230320 Godeps for TOML parser - BurntSushi
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:40 -07:00
Madhu Venugopal
594361552e Avoid adding local reserved networks (bridge, none, host) to the datastore
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:39 -07:00
Madhu Venugopal
87161e8935 Added Network Watch support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:39 -07:00
Madhu Venugopal
9b952fc982 Initial kv store integration and datastore implementation
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:29:34 -07:00
Madhu Venugopal
c46a023902 Updating Godep to reuse Swarm discovery and store packages
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-25 16:03:33 -07:00
Jana Radhakrishnan
493aa86c66 Merge pull request from baoyonglei/bugfix
Fix createTestNetwork bug
2015-05-25 10:14:40 -07:00
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 from mavenugo/fixapi
Added API support for both /vx.x/networks & /networks
2015-05-24 21:37:41 -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
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
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
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 from codergr/orthographic-corrections2
Proofing design and bridge documentations
2015-05-23 18:04:51 -07:00
Jana Radhakrishnan
9c480e81be Merge pull request from mavenugo/experimental
Moved all the service commands under experimental build tag
2015-05-23 18:02:57 -07:00
Madhu Venugopal
a550562ad4 UI formatting applied on top of Experimental Service PR
Thanks to @nerdalert for the contribution via .

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 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
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 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
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
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
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
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 from aboch/eorr
Provide interface to categorize errors
2015-05-21 09:09:15 -07:00
Madhu Venugopal
03be965deb Merge pull request from aboch/rest
Changes in rest api
2015-05-21 03:51:51 -07:00
Madhu Venugopal
c4ce3ac5ce Merge pull request 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
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
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
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
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 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
Madhu Venugopal
977fcdd952 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
2d3758619b 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
Madhu Venugopal
ba2098c05c Merge pull request from aboch/ci
Fix Makefile
2015-05-19 11:19:03 -07:00
Alessandro Boch
a794fa07b7 Fix Makefile
- To report the godep test err code to CircleCI

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-05-19 11:06:56 -07:00
Jana Radhakrishnan
9d4b69df73 Fix panic on leave of host driver endpont leave
There is a panic when two containers joining a host
network leave one after another. The problem was that
in controller.go the sandboxData was not stored as a
pointer reference. So when we got the data from the map
it was the copy of the data and refcnt increment was done
on that. Changed it to hold a reference.  Also added a test
case to test it.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-19 17:14:00 +00:00