Commit Graph

117 Commits

Author SHA1 Message Date
5e4f415366 Refactor HostConfig and escape apparmor confinement
Upstream-commit: 31638ab2ad2a5380d447780f05f7aa078c9421f5
Component: engine
2013-11-01 13:55:19 -07:00
04226c60be Merge pull request #2494 from shykes/engine-links
Engine: Minimal, unintrusive implementation of a cleaner Job API.
Upstream-commit: e3c49843d70ea2856592a7af5e5d83e655898a70
Component: engine
2013-10-31 16:32:49 -07:00
d6b078e758 fix typos
Upstream-commit: 1c7ca51f3246baca6be75705ed932d26e20589e2
Component: engine
2013-10-30 13:18:48 -07:00
d2b1922a6b continue build on expose with :, but displays a warning
Upstream-commit: b2503a72f1f1db887fd11199036f05efe3d35992
Component: engine
2013-10-30 11:13:10 -07:00
81ae14e1e4 remove some logs from tests
Upstream-commit: 86970d00bbb9c5e3184fe4e3e7442fd0865c80ec
Component: engine
2013-10-29 14:42:34 -07:00
7ce1e20657 Add -name for docker run
Remove docker link
Do not add container id as default name
Create an auto generated container name if not
specified at runtime.
Upstream-commit: 0d2924408bad7aa797bfaf0610e836d82928296f
Component: engine
2013-10-28 18:09:08 -07:00
b6319ac31a Rename 'GraphPath' to the more logical 'Root'. This does not affect users except for a slight text change in the usage messge
Upstream-commit: 7e691e11b033f35fe823fbc6dcb40decd584696d
Component: engine
2013-10-26 14:24:13 -07:00
c25b5fa785 Ensure child containers are started before parents
Upstream-commit: 356af1540f9a43337571e0f3ad6038789b38478e
Component: engine
2013-10-25 15:13:26 -07:00
3f2eaa1c43 Use persistent connection for links database
Add close method to Runtime and Server to make sure
that any underlying connections are cleaned up
Upstream-commit: 7c08aeeba4ab94f77e221bfc01741cce0866d224
Component: engine
2013-10-25 15:13:25 -07:00
7f47a302d5 Add dynbinary and dyntest scripts for building/testing a separate static dockerinit binary
After a nice long brainstorming session with @shykes on IRC, we decided on using a SHA1 hash of dockerinit compiled into the dynamic docker binary to ensure that we always use the two in a perfect pair, and never mix and match.
Upstream-commit: 21161dbd515fb97cf9052a5980de6fc6180a89dc
Component: engine
2013-10-25 15:13:25 -07:00
22100af3d2 fix tests
Upstream-commit: dbe7d67c183d2fcea2748dd09751c79bc9810b88
Component: engine
2013-10-25 15:13:25 -07:00
5b0bbe7633 remove docker ls and add docker link in usage and switch to go1.2rc2
Upstream-commit: 6c863b49ef9de8f203c84f7e2e55f33deeb10bdb
Component: engine
2013-10-25 15:13:25 -07:00
1ea9ba1de7 fix merge issue and gofmt
Upstream-commit: 89fb51f6063467124c8883399fc293faae8d8ef5
Component: engine
2013-10-25 15:13:25 -07:00
69a28976c0 Move SysInit to a submodule
This allows docker-init to not import the main docker
module, which means it won't e.g. pick up any sqlite
dependencies.
Upstream-commit: db999667245926569b161747eed7e08b2ec1c34c
Component: engine
2013-10-25 15:13:24 -07:00
952ac8a789 Add links for container relationships and introspection
Upstream-commit: 1cbdaebaa1c2326e57945333420d25d6f77011d5
Component: engine
2013-10-25 15:13:24 -07:00
264d4e8059 remove log
Upstream-commit: acc2aec988450b117c183f35a4e743b882a55113
Component: engine
2013-10-24 15:13:47 -07:00
fbbaaa37c7 Fix attach race condition, improve unit tests, make sure the container is started before unblocking Start
Upstream-commit: 3e014aa6624bdc3411bb6f5bc2c297e45a47ad68
Component: engine
2013-10-18 16:26:16 -07:00
06ac81c4b1 Hack: don't run integration tests in /var/lib/docker/unit-tests; add missing cleanups in a few tests
Upstream-commit: 240d5b3fa1b66f099b71c20ff8dc4ed1ecffc1d3
Component: engine
2013-10-18 02:13:36 +00:00
c27a5b0233 add cleanupin tests to remove leftover containers
Upstream-commit: f854529ae8c9e0139e9ca0466c597b133e3bf41e
Component: engine
2013-10-16 18:06:37 +00:00
bedabb5a87 Merge pull request #1943 from dotcloud/1940-prevent_crash_parseNat_build-fix
Abort build if mergeConfig returns an error and fix duplicate error message
Upstream-commit: 4196c704f052687e8b9010f0e407f66417c55d04
Component: engine
2013-10-15 17:40:48 -07:00
4d7c2bfb0d Merge pull request #2133 from dotcloud/improve_tests
Make sure to close the network allocators
Upstream-commit: ded74b0bb37d328a8c1a69f1f9b9aca2bba58199
Component: engine
2013-10-09 15:45:16 -07:00
177e714a8f replace panic by log.Fatal in tests
Upstream-commit: 823174de4d1acb93613c1b5ba53873906f43f62c
Component: engine
2013-10-09 13:47:49 +00:00
921ffe0649 Make sure to close the network allocators
Upstream-commit: 9107565d0634ea3eed3290c6c4b6c0f006fdefe8
Component: engine
2013-10-08 15:42:02 -07:00
34abbb9020 Add test
Upstream-commit: 1328be7c299417aa8c8740ac4901a978724afa9b
Component: engine
2013-10-03 15:21:14 +00:00
0d8ea16762 Merge pull request #1759 from bdon/graph-map
Minor refactor of Graph; replace uses of Graph.All (slice) with Graph.Map (map)
Upstream-commit: ad152efbed6ddb74a352c39147bae9b0e8c87435
Component: engine
2013-09-10 08:49:11 -07:00
aa0ad01db6 Merge builder.go into runtime.go
Upstream-commit: 24e02043a2672320abebc3bd5fa6a592e2ebd082
Component: engine
2013-09-06 17:33:05 -07:00
c7e2ec175d Replace Graph.All with Graph.Map
Upstream-commit: 1fca99ad908c530fcd03158a56767b55500a8521
Component: engine
2013-08-31 20:44:42 -07:00
6b54138e54 use init function
Upstream-commit: 740a97f1a836be17ab39e8496b7372900782c20b
Component: engine
2013-08-29 22:55:29 +00:00
b2a84c3f0c Fixed: ImagePull in runtime test
Upstream-commit: 1c6af604e824d8fa2896c4906f05a0a3729c8e52
Component: engine
2013-08-23 04:32:09 +02:00
00a7cbd80b Merge pull request #1290 from dotcloud/parallel_pull
* Runtime: Parallel pull
Upstream-commit: e54e8fa9205409e741a64c7d7746e2e548c52fc0
Component: engine
2013-08-05 14:17:29 -07:00
0c11df3e01 Merge pull request #1267 from sridatta/new-clean-init
* Runtime: Fix to "Inject dockerinit at /.dockerinit"
Upstream-commit: f6fa353dd8be732aaed20f0c64a5ae8ccc9f1dbc
Component: engine
2013-08-05 13:23:22 -07:00
d2c440fbc7 add parallel pull to 1.4
Upstream-commit: 46f59dd9333baa578b184eb25b386ac2f41caf04
Component: engine
2013-07-30 12:15:33 +00:00
4350e3145d Fixes #505 - Make sure all output is send on the network before closing
Upstream-commit: fd9ad1a19469d07944ca9b417861d63ecec2ef42
Component: engine
2013-07-24 15:48:51 -07:00
f64e80d22b update AUTHORS
Upstream-commit: 7aba68cd548d69e10e710029ca143b32fd291585
Component: engine
2013-07-23 19:55:38 +00:00
7c7e6abf06 + Runtime: inject dockerinit at /.dockerinit instead of overwriting /sbin/init. This makes it possible to run /sbin/init inside a container.
Upstream-commit: 5d8efc107d2c7b7da61a6d22657190c6f13713d2
Component: engine
2013-07-17 17:13:34 -07:00
1aa0235482 Hack: use helper functions in tests for less copy-pasting
Upstream-commit: 080243f0407a90cdacf128dc3b53a802549d7797
Component: engine
2013-07-12 17:56:55 -07:00
6c9e32ae32 Simplify unit tests code with mkRuntime()
Upstream-commit: 6bdb6f226b13d5fdd47f3665c9fb753207bf473b
Component: engine
2013-07-11 17:59:25 -07:00
cafbcadc85 Make the TestAllocate{UDP,TCP}PortLocalhost more reliable
- For the TCP test try again if socat wasn't listening yet;
- For the UDP test raise the timeout to a minute to workaround what
  seems to be an issue with Linux.
Upstream-commit: 5a411fa38e49e5d79602f01fa9aaf058c12e5627
Component: engine
2013-07-10 18:25:53 -07:00
26ac911253 Raise the timeouts for the TCP/UDP localhost proxy tests
Sometimes these tests fail, let's see if that improves the situation.
Upstream-commit: 8f36467107d623e94638e2dd4c625e34f670384d
Component: engine
2013-07-10 16:05:14 -07:00
c69035fce1 Add support for UDP (closes #33)
API Changes
-----------

The port notation is extended to support "/udp" or "/tcp" at the *end*
of the specifier string (and defaults to tcp if "/tcp" or "/udp" are
missing)

`docker ps` now shows UDP ports as "frontend->backend/udp". Nothing
changes for TCP ports.

`docker inspect` now displays two sub-dictionaries: "Tcp" and "Udp",
under "PortMapping" in "NetworkSettings".

Theses changes stand true for the values returned by the HTTP API too.

This changeset will definitely break tools built upon the API (or upon
`docker inspect`). A less intrusive way to add UDP ports in `docker
inspect` would be to simply add "/udp" for UDP ports but it will still
break existing applications which tries to convert the whole field to an
integer. I believe that having two TCP/UDP sub-dictionaries is better
because it makes the whole thing more clear and more easy to parse right
away (i.e: you don't have to check the format of the string, split it
and convert the right part to an integer)

Code Changes
------------

Significant changes in network.go:

- A second PortAllocator is instantiated for the UDP range;
- PortMapper maintains separate mapping for TCP and UDP;
- The extPorts array in NetworkInterface is now an array of Nat objects
  (so we can know on which protocol a given port was mapped when
  NetworkInterface.Release() is called);
- TCP proxying on localhost has been moved away in network_proxy.go.

localhost proxy code rewrite in network_proxy.go:

We have to proxy the traffic between localhost:frontend-port and
container:backend-port because Netfilter doesn't work properly on the
loopback interface and DNAT iptable rules aren't applied there.

- Goroutines in the TCP proxying code are now explicitly stopped when
  the proxy is stopped;
- UDP connection tracking using a map (more infos in [1]);
- Support for IPv6 (to be more accurate, the code is transparent to the
  Go net package, so you can use, tcp/tcp4/tcp6/udp/udp4/udp6);
- Single Proxy interface for both UDP and TCP proxying;
- Full test suite.

[1] https://github.com/dotcloud/docker/issues/33#issuecomment-20010400
Upstream-commit: fac0d87d00ada08309ea3b82cae69beeef637c89
Component: engine
2013-07-09 17:42:35 -07:00
ea75ddf770 Fix a typo in runtime_test.go: Availalble -> Available
Upstream-commit: 1a1daca621233b4588c079e35851d0e542282124
Component: engine
2013-07-09 11:52:33 -07:00
32424f76bf Remove all network dependencies from the test suite
Upstream-commit: e43ef364cb99585d3285f51f7ab308f8a77fe09e
Component: engine
2013-07-08 15:23:04 -07:00
203bc7383a Fixed runtime_test (ImagePull prototyped changed)
Upstream-commit: e2b8ee2723a4cf6a37cdb455011ec447f23f8f49
Component: engine
2013-07-05 16:03:22 -07:00
15bf500531 Typo fix
Error message grammar tweak
Upstream-commit: ba9aef6f2c529ccea571deacc46d2a61ca74a8bc
Component: engine
2013-07-04 12:40:14 -07:00
1c71d0a65e Implement several golint suggestions, including:
* Removing type declarations where they're inferred
* Changing Url -> URL, Id -> ID in names
* Fixing snake-case names
Upstream-commit: 19121c16d9514b391ce8f15aeff3c47c1ea5a841
Component: engine
2013-07-03 14:36:04 -07:00
8f5746f4d9 Mutex style change.
For structs protected by a single mutex, embed the mutex for more
concise usage.

Also use a sync.Mutex directly, rather than a pointer, to avoid the
need for initialization (because a Mutex's zero-value is valid and
ready to be used).
Upstream-commit: 1cf9c80e976fb60b4d5d489cd1c4c9959bcc4f7f
Component: engine
2013-07-02 15:53:08 -07:00
438fda3245 add sleep in tests and go fmt
Upstream-commit: ebba0a60245b487e6d3d242f47c8999321ec5d29
Component: engine
2013-07-02 10:47:37 +00:00
4fd8f2839f Fix unit tests when there is more than one tag within the test image
Upstream-commit: b6f288a1cedbbff7dd24362f2fc2bce0040bfe10
Component: engine
2013-07-01 11:45:45 -07:00
f44918dcc7 * Hack: move unit tests to a different source image, to work around issues when docker-ut has more than 1 tag.
Upstream-commit: b7226316c716daf7648b2dc4de829f866a4377b5
Component: engine
2013-06-28 19:43:55 -07:00
e4d371fd60 Always return the correct test image.
And not a *random* one from its history.
Upstream-commit: fe014a8e6cfe4d2a338736e4c685bcf1b7685200
Component: engine
2013-06-27 18:01:20 -07:00