82ddfc6a07
Put back panic for go1.0.3 compatibility
...
Upstream-commit: 7ef9833dbb299ebf796092a6921127ea77d38337
Component: engine
2013-06-04 14:26:40 -07:00
4747c5b99f
linted names
...
Upstream-commit: fd224ee590dc9f003f6507b529a9f47cceb02c44
Component: engine
2013-06-04 18:00:22 +00:00
9c0086fb7d
drop/omit
...
Upstream-commit: 86ada2fa5d00820288df8a59eca3deef83f4aeb6
Component: engine
2013-06-04 13:51:12 +00:00
51d3c4635e
go vet
...
Upstream-commit: b515a5a9ec5792c67be5fe8476df96903f43df71
Component: engine
2013-06-04 13:24:58 +00:00
bc6fad489c
Create a subpackage for utils
...
Upstream-commit: 2e69e1727b4d5698a90c24c5800eecd5401dc319
Component: engine
2013-05-14 22:37:35 +00:00
2d0d73c6f3
Shutdown loopback-to-loopback proxy when unmapping a port
...
Upstream-commit: 7f1a32b9ff31bd931e9495acc1d5ccdef4bd51b6
Component: engine
2013-04-19 20:44:25 -07:00
1cb0701d9b
Emulate DNAT in userland for loopback-to-loopback connections. This makes container ports available from localhost.
...
Upstream-commit: 930e9a7e430a3d78e09a95bb32d9fb6052e7dae1
Component: engine
2013-04-19 19:35:44 -07:00
66366b4f1d
Exclude loopback-to-loopback connections from DNAT rules, to allow userland proxying
...
Upstream-commit: 61259ab4b4bfe3404e75dd811a2da7c88e7c7133
Component: engine
2013-04-19 19:32:32 -07:00
ebb6835d20
Go fmt
...
Upstream-commit: 22893429ed29dbb7a01eed7a90a4d1fbecfd5d90
Component: engine
2013-04-12 07:37:24 -07:00
03ac5529c3
Make it more clear when Docker fails to allocate a free IP range for its bridge
...
Upstream-commit: 1601366cb6bfb9671ec28ced0bf88d11049264d3
Component: engine
2013-04-08 18:16:58 -07:00
329e4c0143
Changed default bridge interface do 'docker0'
...
Upstream-commit: 8cf30395a1a338c7c34adda0ae59ba8b2f9370cd
Component: engine
2013-04-05 14:16:19 -07:00
3bb1012d01
Merge remote-tracking branch 'origin/219-default-bridge-2'
...
Upstream-commit: 793c1ad9909701a8b89ac6731ac266048e48ec46
Component: engine
2013-04-05 14:02:16 -07:00
f49bdcbf33
Add tests of tcp port allocator
...
Upstream-commit: febaeebfb8848265267213b2f6a6fc3a40ad90f1
Component: engine
2013-04-05 13:03:24 -07:00
4e013b9e8e
Fix a race condition when running the port allocator
...
Upstream-commit: d32f184696519f909d1db56a060b39f0a08b41c5
Component: engine
2013-04-05 13:03:04 -07:00
e9f0c90d6d
Choose which TCP frontend port to allocate with '-p :PORT'
...
Upstream-commit: 2aad4a34785a1b0d02d910a14dbb9b0d6d3edc17
Component: engine
2013-04-04 22:58:01 -07:00
c15214a816
Refactored PortAllocator to allow for same-frontend constraint
...
Upstream-commit: a5fb1d6c0105bb6d93c6b6890aa33bd99115973a
Component: engine
2013-04-04 22:56:12 -07:00
cee3dd3980
Renamed PortAllocator.populate() to run()
...
Upstream-commit: f344212b93cc1de672a6a09906b719c2e287d558
Component: engine
2013-04-04 19:49:32 -07:00
6b2f94ee3c
Print a less confusing error message when lxcbr0 doesn't exist
...
Upstream-commit: 0424998f3885b715ad0fae074170a9be19c95680
Component: engine
2013-04-04 19:14:10 -07:00
b7d6bc48b8
Merge remote-tracking branch 'dominikh/minor-code-touchups'
...
Upstream-commit: 586a79cca0c0b7f432e31807e3b8ca79d565c27e
Component: engine
2013-04-04 16:20:37 -07:00
7286773837
Continue cleaning up iptables rules from previous version, to avoid crashing after an upgrade
...
Upstream-commit: ebc837957fb45c4ba4768a2344ea7b551bbb86e5
Component: engine
2013-04-04 15:16:42 -07:00
f74f70aea0
stop looping remote:port from host to containers
...
Upstream-commit: 32f58114766886fc38b66949bc3c0625dc225ade
Component: engine
2013-04-04 23:07:10 +03:00
5140fcb35f
Move the default bridge name to a constant
...
Upstream-commit: 1b370f9d8dbd1c476db766e8587617e795570d97
Component: engine
2013-04-04 05:33:28 -07:00
ad744d80e7
If bridge does not exists, try to create it
...
Upstream-commit: aa4bf4284b4d18874544368349cb9575d8412de8
Component: engine
2013-04-03 16:17:03 -07:00
d25d9d9cff
Add an helper function to check if two network overlaps. Also add unit tests for this function
...
Upstream-commit: 90a6e310fe4c70b99f9fa5c8d8615e2382edba0b
Component: engine
2013-04-03 16:15:43 -07:00
ae8058f403
Put the bridge interface name in the command line
...
Upstream-commit: f39af7e05da437d6ac95b19ccfa401598d1fb5d9
Component: engine
2013-04-03 16:15:43 -07:00
0e99b6b989
Fix NAT problem with ports looping back to containers
...
Upstream-commit: 3b65be9127865fd894edea4d0b7de0ab92421018
Component: engine
2013-04-04 01:32:46 +03:00
d6aac87dba
replace unreachable returns with panics
...
Not only is this a more common idiom, it'll make finding bugs easier,
and it'll make porting to Go 1.1 easier.
Go 1.1 will not require the final return or panic because it has a
notion of terminating statements.
Upstream-commit: 22f1cc955dbf25132e69d126f8db0e5498bffbd2
Component: engine
2013-04-03 11:18:23 +02:00
8a40ce58f3
Make IP allocator lazy
...
Instead of allocating all possible IPs in advance, generate them as
needed.
A loop will cycle through all possible IPs in sequential order,
allocating them as needed and marking them as in use. Once the loop
exhausts all IPs, it will wrap back to the beginning. IPs that are
already in use will be skipped. When an IP is released, it will be
cleared and be available for allocation again.
Two decisions went into this design:
1) Minimize memory footprint by only allocating IPs that are actually
in use
2) Minimize reuse of released IP addresses to avoid sending traffic to
the wrong containers
As a side effect, the functions for IP/Mask<->int conversion have been
rewritten to never be able to fail in order to reduce the amount of
error returns.
Fixes gh-231
Upstream-commit: 6f9a67a7c7cb717ad1a575df3e4c0fd2ec8bc651
Component: engine
2013-04-01 06:02:44 +02:00
46acd15bd1
Handling iptables() errors more usefully during portmapper setup
...
Upstream-commit: 523803d633e3bf7e4076ad41e73daba491da5d40
Component: engine
2013-03-28 14:44:54 -05:00
de000293fa
Return error when iptables is not found
...
Upstream-commit: c66d2b6a532c657b554ffa3c80b2cf15e218ee8e
Component: engine
2013-03-28 14:30:56 -05:00
ef4aab72d7
Looking for iptables in PATH
...
Upstream-commit: dfc3904f778996a449ef5199e36fce6cabfb803a
Component: engine
2013-03-28 14:02:50 -05:00
b293dc1722
Merge pull request #138 from srid/handle-port-mapper-error
...
handle errors during the creation of port mapper
Upstream-commit: 51455b1ee0f120d20d511e3f76786b9d688ceeff
Component: engine
2013-03-24 10:27:03 -07:00
450d1a6d33
handle errors during the creation of port mapper
...
example:
2013/03/22 21:42:55 Unable to setup port networking: Failed to create DOCKER chain
(which was possibly introduced by commit 3c6b8bb88)
Upstream-commit: 371225520fc86fa58fadd182730b958a0f7ef9ab
Component: engine
2013-03-22 21:44:01 -07:00
8664639f32
Properly cleanup iptables rules inserted in OUTPUT (introduced in 3c6b8bb8882fcd2083d1c489df3cc40062b4896c)
...
Upstream-commit: 301a8afff578a8467e98f1081aa96323c458e1f1
Component: engine
2013-03-22 22:31:20 -07:00
2b380dac90
Fixing Issue #98 : Adding DOCKER to output chain during iptables setup
...
Upstream-commit: 3c6b8bb8882fcd2083d1c489df3cc40062b4896c
Component: engine
2013-03-22 11:28:15 -05:00
64ae26627e
When lxcbr0 has several associated IPs, default to first one found
...
Upstream-commit: 3aefed2dc250bd41502bdaa11624f1f974ed80b6
Component: engine
2013-03-21 09:19:22 -07:00
21dbee3159
Complete pull request #121 , init TCPAddr with named field
...
Upstream-commit: ab99e9252d1d3872b2e04234338ce028b9eb091c
Component: engine
2013-03-20 06:02:25 -07:00
2de0bdf328
Fix issue #120 , initialize TCPAddr w/ field names
...
Current Go tip (+74e65f07a0c8) and likely Go 1.1 does not build docker since net.TCPAddr struct has an additional field now for IPv6:
type TCPAddr struct {
IP IP
Port int
Zone string // IPv6 scoped addressing zone
}
Initializing the struct with named fields resolves this problem.
Upstream-commit: fac32cda5af7adcf0400f1fd8763764a498149f3
Component: engine
2013-03-21 00:11:16 -03:00
3cddff121d
Network: Port mapping support.
...
Implemented a port allocator and a port mapper that is able to forward TCP ports
from the host to the container.
Upstream-commit: 799ffa176399877e610ff2049dbf84610037a2be
Component: engine
2013-02-28 11:50:02 -08:00
6bc8a20d54
Integrated the network allocator into Docker. A networking environment
...
is assigned to each container upon Start and released whenever the
container exits.
Upstream-commit: c08f5b2b8460f13f2094bae2a496bf308f7645bb
Component: engine
2013-02-25 14:06:22 -08:00
550e796b18
Network allocator
...
Upstream-commit: 797bb6e75b8f33fe44932bf90145cf069f342e44
Component: engine
2013-02-25 10:45:23 -08:00
98683195b2
Network: Do not assume that we are using a class C. Instead, compute the
...
IP addresses range and network size in order to allocate an IP address.
Upstream-commit: e0e49b9a2259d779b31055339e67b054c8dffc3b
Component: engine
2013-02-21 18:33:23 -08:00
a99e747427
Network: Simple random IP allocation on the bridge network.
...
Upstream-commit: 6124c5eb31ab8f9db4db288002388554d6181c86
Component: engine
2013-02-21 10:47:57 -08:00
8326daf37d
Network: Automatically figure out the gateway and netmask by inspecting
...
the lxc bridge interface
Upstream-commit: 5039d4a2804561885e32f2a93cb2a51cbaa8e847
Component: engine
2013-02-21 10:47:57 -08:00
d2dc806098
Basic networking support with hardcoded addresses. Work in progress.
...
Upstream-commit: 5cecd548cd48cec8967f7ad0b0b42b30fa3ec7a0
Component: engine
2013-02-21 10:47:57 -08:00