Commit Graph

381 Commits

Author SHA1 Message Date
Michael Bridgen d6db97f276 Add note on EndpointInfo semantics
The comments in the code don't explain enough, and this is arguably a
better place for such an explanation.
2015-06-08 17:06:31 +01:00
aboch 0d3a8c16fc Merge pull request #256 from mavenugo/dup_endpoint
duplicate endpoint error handling
2015-06-04 16:35:52 -07:00
Madhu Venugopal 014df6077b duplicate endpoint error handling
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-04 14:23:42 -07:00
Jana Radhakrishnan 9da326c854 Merge pull request #211 from mavenugo/bn
WIP : default configs for new network in bridge driver
2015-06-04 11:58:14 -07:00
Madhu Venugopal 64a0d66696 Copy default configs from default Bridge to new bridge if not user configured
Also fixed a minor bug in client to choose bridge as the default driver.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-04 11:48:31 -07:00
Jana Radhakrishnan d982a2dfeb Merge pull request #255 from mavenugo/dhd
Moving hostdiscovery under build tag
2015-06-04 11:33:43 -07:00
Madhu Venugopal 4e68dfb97a Merge pull request #239 from aboch/pmc
One port mapper per bridge network
2015-06-04 05:24:00 -07:00
Madhu Venugopal 29350c906c Including hostdiscovery conditionaly under a build tag
In order to vendor-in libnetwork to docker, we need to remove the swarm
dependency even though it is used as library. using this PR, a new build
flag libnetwork_discovery is introduced in order to avoid pulling in the
unused hostdiscovery functionality into docker.
We are working with the Swarm project to see if we can modularize the
discovery package to become independent so that we can include them as a
vendor-in package in docker.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-04 05:00:09 -07:00
Madhu Venugopal 4d06bbd2e6 Fixing a few go-vet issues
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-04 04:32:10 -07:00
Jana Radhakrishnan 4abd4bc1de Merge pull request #253 from aboch/ex
Change in bridge EndpointOperInfo()
2015-06-03 20:59:04 -07:00
Alessandro Boch 349def334c Change in bridge EndpointOperInfo()
- To also return the configured exposed ports, besides the
  port bindings; as now libnetwork/endpoint.go endpoint setters
  separate the exposed ports and port binding configs.
  Docker daemon will take care of aggregating the two sources
  for presentation.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-03 20:28:15 -07:00
Madhu Venugopal 0166bc708d Merge pull request #212 from mrjana/cnm_integ
Add endpoint priority during join and cleanup libnetwork test code
2015-06-03 17:59:10 -07:00
Jana Radhakrishnan d750d298d1 Add container join priority option to endpoint
When an endpoint is joined by a container it may
optionally pass a priority to resolve resource
conflicts inside the sandbox when more than one
endpoint provides the same kind of resource. If the
the priority is the same for two endpoints with
conflicting resources then the endpoint network names
are used to resolve the conflict.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-03 17:48:58 -07:00
Jana Radhakrishnan 842dbed31a Introduce UnsetGateway(IPv6) methods
Sandbox needs unset gateway methods to cleanup
gateway settings to enable smooth transition
of the sandbox between endpoints.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-03 17:48:53 -07:00
Jana Radhakrishnan 4450ba744c Cleanup libnetwork test code
- The libnetwork test code had some issues in not properly
  passing the network options. Fixed it.
- Made controller a global value so that every test uses the
  same controller instance.
- Cleaned up endpoint and network objects after every test.
- Extended the endpoint join test case to test the same container
  join two different networks using two different endpoints.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-03 17:48:38 -07:00
Jana Radhakrishnan 8af6c3b5d3 Remove only the endpoint owned interfaces
Only remove the interfaces owned by the endpoint from
the sandbox when the container leaves the endpoint.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-03 17:14:44 -07:00
aboch 5455132c59 Merge pull request #240 from Metaswitch/remote-driver-static-routes
Add static routes to the remote driver.
2015-06-03 16:51:56 -07:00
Tom Denham 54fe285107 Add static routes to the remote driver.
Signed-off-by: Tom Denham <tom.denham@metaswitch.com>
2015-06-03 16:31:21 -07:00
Jana Radhakrishnan 7c62535e76 Merge pull request #238 from WeiZhang555/clean
cleanup: remove unused variable
2015-06-03 14:45:59 -07:00
aboch 67c1ecb550 Merge pull request #241 from Metaswitch/remote-driver-dstprefix
Update remote driver to use destination prefix.
2015-06-03 14:40:36 -07:00
aboch 8aeffe231f Merge pull request #232 from Metaswitch/link-routes
Change scope to LINK when setting device routes
2015-06-03 14:27:44 -07:00
Tom Denham 9ecda9ae18 Change scope to LINK when setting device routes
Without this they don't have the desired effect.
The default when creating these types of routes with ip route add is link - the old setting of universe was just wrong.

Signed-off-by: Tom Denham <tom.denham@metaswitch.com>
2015-06-03 13:34:00 -07:00
aboch 65f51631c5 Merge pull request #237 from kunalkushwaha/json-tagged-struct
API struct tagged to produce proper output when marshalled #217
2015-06-02 16:44:27 -07:00
Madhu Venugopal a09a60a123 Merge pull request #236 from mrjana/cnm
Remove container data return value from Join
2015-06-02 16:12:22 -07:00
Madhu Venugopal 038e7efd83 Merge pull request #220 from jhowardmsft/10662-compile
Windows: Enable compile
2015-06-02 16:06:50 -07:00
Jana Radhakrishnan 0adf4baf54 Merge pull request #246 from mavenugo/rb
Cherry-picking commits from docker_1.7.0_integ into master
2015-06-02 16:03:49 -07:00
Jana Radhakrishnan a122db4a76 Merge pull request #245 from crosbymichael/no_log
Do not warn in packages
2015-06-02 15:58:04 -07:00
Madhu Venugopal 9669dbaf0b Fixes https://github.com/docker/docker/issues/13426
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-06-02 15:50:38 -07:00
Jana Radhakrishnan a031640ea0 Fix miscellaneaus data races
Fixed the remaining data races in the libnetwork code.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-06-02 15:50:00 -07:00
Jana Radhakrishnan 0a81ebd745 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-06-02 15:49:45 -07:00
Jana Radhakrishnan 8738bf5fb2 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-06-02 15:49:05 -07:00
Jana Radhakrishnan eeafdab8a1 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-06-02 15:48:56 -07:00
Jana Radhakrishnan 3a5abeb1c6 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-06-02 15:48:48 -07:00
Jana Radhakrishnan 90dab0c1b7 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-06-02 15:46:03 -07:00
Michael Crosby a46b6fb270 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 15:11:32 -07:00
Jana Radhakrishnan c40f833cba Merge pull request #244 from aboch/sc
Fix dnet service cli help o/p
2015-06-02 15:10:54 -07:00
Alessandro Boch c4bcd5a624 Fix dnet service cli help o/p
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-02 14:25:47 -07:00
Jana Radhakrishnan e265d1aa7c Merge pull request #243 from dave-tucker/cleanup
Remove dead code
2015-06-02 13:46:53 -07:00
Dave Tucker e3e4a5610c Remove dead code
Sir Codus Cleanupus vs. system.go

"This code doth offend me so" uttered Sir Codus Cleanupus
"and thus it must be cleft swiftly in twain". With one hefty
stroke of his broadsword he carved the old, unfunctioning
code in half and thus it ceased to be.

Signed-off-by: Dave Tucker <dt@docker.com>
2015-06-02 18:21:04 +01:00
Tom Denham 3613483222 Update remote driver to use destiantion prefix.
Required since #193

Signedeoff-by: Tom Denham <tom.denham@metaswitch.com>
2015-06-01 15:35:57 -07:00
Alessandro Boch ba0a84f5d0 One port mapper per bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-06-01 13:14:29 -07:00
Zhang Wei 811ae20796 cleanup: remove unused variable
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-06-01 18:50:20 +08:00
Madhu Venugopal bcbc5f5f50 Merge pull request #235 from mrjana/maintainer
Add Alessandro as a libnetwork maintainer
2015-06-01 02:17:10 -07:00
Madhu Venugopal f4b45d5335 Merge pull request #233 from WeiZhang555/typo
fix typo
2015-05-30 14:36:24 -07:00
Kunal Kushwaha 2c47a84ac3 json friendly struct field in API structure
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
2015-05-30 07:28:50 +09:00
Jana Radhakrishnan 39cf9597d0 Remove container data return value from Join
Now that Endpoint interface has the Info method there is no
need to return container data as a return value in the Join
method. Removed the return value and fixed all the callers.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-29 20:11:02 +00:00
Jana Radhakrishnan 2cf76e8dff Add Alessandro as a libnetwork maintainer
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-05-29 18:46:33 +00:00
Zhang Wei 3b3b4c60de fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-05-29 16:31:12 +08:00
Madhu Venugopal a2f46f9996 Merge pull request #180 from Metaswitch/driver-routes
Add ability for drivers to set static routes
2015-05-27 11:19:18 -07:00
John Howard 1910fd5f93 Windows: Enable compile
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-26 10:46:21 -07:00