Commit Graph

93 Commits

Author SHA1 Message Date
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
a223caa9e6 + Runtime: mount volumes from a host directory with 'docker run -b'
Upstream-commit: 4fdf11b2e62bf7d785a958afd4fc5b8cfc32f621
Component: engine
2013-06-26 15:07:31 -07:00
51f8e07a39 Implement regression test for stdin attach
Upstream-commit: 5190f7f33a9e36f1f5991a385f4db198e9f1b3a6
Component: engine
2013-06-24 18:36:04 -07:00
38132ab186 Make NewDockerCli handle terminal
Upstream-commit: 873a5aa8e72102a31f34c62603a3f5976471e94a
Component: engine
2013-06-24 18:29:08 -07:00
40e51bbd8c Make DockerCli use its own stdin/out/err instead of the os.Std*
Upstream-commit: a749fb21309b147a1bb9da0838f591ba58f6d169
Component: engine
2013-06-24 18:27:57 -07:00
d6968c304b Remove dependency on 'os/user', which cannot be used with CGO_ENABLED=0. This allows running the tests without CGO.
Upstream-commit: ce9e50f4eeed9ec9d715d805ae6706ed6f28da3b
Component: engine
2013-06-21 19:40:42 -07:00
18c9c45d0a - Runtime: Forbid parralel push/pull for a single image/repo. Fixes #311
Upstream-commit: fe204e6f48eb47a1deb3553003eaf9863a66fd1a
Component: engine
2013-06-17 16:10:00 -07:00
4147a474f5 rebase master
Upstream-commit: c46382ba29c82eedab2b1601da5a81a047f078c2
Component: engine
2013-06-13 17:58:06 +00:00
fc1bee82c0 Merge branch 'master' into 691-run_id-feature
Upstream-commit: 9cdd39e0d76079206cc1befe222e2205128e5ed0
Component: engine
2013-06-13 13:18:43 +00:00
00bcb3e136 added test
Upstream-commit: 45a8945746a205ea513efc17bb242c63362c79a9
Component: engine
2013-06-13 13:17:56 +00:00
83d9b24a84 bump to master
Upstream-commit: c906239220c7ba06b8615f001fab2f42fb063aeb
Component: engine
2013-06-05 10:23:45 +00:00
4747c5b99f linted names
Upstream-commit: fd224ee590dc9f003f6507b529a9f47cceb02c44
Component: engine
2013-06-04 18:00:22 +00:00
5a833bafbe bump to master
Upstream-commit: 62c78696cda5660524dee596a07aac66d89437af
Component: engine
2013-06-03 11:06:13 +00:00
934fcbd514 Merge pull request #719 from dotcloud/json_stream-feature
* API: push, pull, import, insert -> Json Stream
Upstream-commit: 9bc71c101c8f1299427013bfb5503bf85173c28f
Component: engine
2013-05-31 16:05:15 -07:00
167d529e1c ensure progress downloader is well formated
Upstream-commit: cd002a4d162aa273cd9e646e6fd124ef2b6f6944
Component: engine
2013-05-30 17:00:42 +00:00
e8420b7464 move auth to the client WIP
Upstream-commit: 49e656839fb3d846dc65fec544f2984a9c72a2cf
Component: engine
2013-05-30 15:39:43 +00:00
654be8b3a8 if address already in use in unit tests, try a different port
Upstream-commit: 2a53717e8ff01df7c58485f89845bad31e50f497
Component: engine
2013-05-30 13:45:39 +00:00
f8799691fc Merge pull request #739 from dotcloud/push_issue-1
- Registry: Cereate a new registry object for each request (~session)
Upstream-commit: 08e5f1295487f2c06639bc8ac97be35f30359534
Component: engine
2013-05-29 09:22:12 -07:00
06534c45f7 bump to master
Upstream-commit: f339fc2eb921986749a628b92d2c9f2ecf47e3c2
Component: engine
2013-05-29 13:52:18 +00:00
f9738020b7 Update tests with new cookies for registry
Upstream-commit: b76d6120ac66a853d177f7e53318ab1ee75dca92
Component: engine
2013-05-28 17:35:10 -07:00
2c506017f0 Readd build tests
Upstream-commit: 5b33b2463a27aa3356a4b6200cf4b81dd83c26a0
Component: engine
2013-05-28 15:31:06 -07:00
d21f15c6b9 Merge master
Upstream-commit: dce82bc85615ca09c999bc2186c2c9caf348dc33
Component: engine
2013-05-28 13:42:50 -07:00
dda3557a3e Implement the CmdAdd instruction
Upstream-commit: 6ae3800151025ff73a97c40af578ee714164003b
Component: engine
2013-05-28 13:38:26 -07:00
04ca200a24 imporved error, push, import insert
Upstream-commit: c8c7094b2e8088210e2182e582264e09222c6e3d
Component: engine
2013-05-25 15:09:46 +00:00
0fb224b331 Fix a unit test broken by pull request #703
Upstream-commit: bb4b35a8920bcba8b60784297650ced5b2e01e47
Component: engine
2013-05-24 18:32:21 -07:00