1
0
mirror of https://github.com/docker/cli.git synced 2026-01-25 03:42:05 +03:00
Commit Graph

104 Commits

Author SHA1 Message Date
Victor Vieux
715ce06407 go fmt and aufs support removed
Upstream-commit: ebfa24acb08504d8da3fcba8da897fed357f34b2
Component: engine
2013-09-26 15:40:13 +00:00
Victor Vieux
1812696aef Revert "add a -mount-method flag"
This reverts commit e52d756f40c9ccf8b37ca496cb72be057c909ed7.
Upstream-commit: 5e1d540209342fa2d6e2ab7117062a897ccf8fe8
Component: engine
2013-09-26 15:14:03 +00:00
Victor Vieux
4c426bcdc1 add a -mount-method flag
Upstream-commit: c1e25d7273f7f520a0dbac675db4e7e26c8a4a9b
Component: engine
2013-09-26 15:10:01 +00:00
Alexander Larsson
71899158fd Tests: Clean up any old devmapper leftovers before starting tests
Upstream-commit: 03320f0d1c5a687ec46cbf6d836cc91576b3b225
Component: engine
2013-09-26 15:09:33 +00:00
Alexander Larsson
f35010d2a6 runtime test: Ensure all containers are unmounted at nuke()
Otherwise we may leave around e.g. devmapper mounts
Upstream-commit: 67788723c99cda8b41e5a488b988e2a72732d684
Component: engine
2013-09-26 15:09:33 +00:00
Alexander Larsson
51abe008c8 deviceset: Cleanup device sets on test end
We unmount all mounts and deactivate all device mapper devices to
make sure we're left with no leftovers after the test.
Upstream-commit: c6e8813c979bbea8832f47dc6468e805a1a18c3e
Component: engine
2013-09-26 15:09:32 +00:00
Alexander Larsson
a4196242f7 Always start tests from a clean set of loopback images
This way we don't get any issues with leftovers
Upstream-commit: 261b0b01dffde42595d987b609d38c3b6d8368f7
Component: engine
2013-09-26 15:09:31 +00:00
Alexander Larsson
1c3fa571b9 tests: Store the loopback images for test outside unit-tests
This directory is copied to each test prefix which is really
slow with the large loopback mounts.
Upstream-commit: a7fd1fce5d6fb29a8c627022da7cbbf0f4b740c7
Component: engine
2013-09-26 15:09:31 +00:00
Alexander Larsson
1e89c8ec2f Reuse a single DeviceSetDM for all the tests
We wrap the "real" DeviceSet for each test so that we get only
a single device-mapper pool and loopback mounts, but still
separate out the IDs in the tests. This makes the test run
much faster.
Upstream-commit: d47c18c5fbe50a2ad6ec011704f86a3c27360ff9
Component: engine
2013-09-26 15:09:31 +00:00
Alexander Larsson
2a4e60c781 Delete corresponding Devices when deleting Images
If an image is deleted and there is a corresponding device
for that image we also delete the image.
Upstream-commit: 3f3f5f0bbaafc67d3f77b920194f8d7bfb7bf6ee
Component: engine
2013-09-26 15:09:31 +00:00
Alexander Larsson
19e1e13936 Runtime: Add DeviceSet singleton
This adds a DeviceSet singleton to the Runtime object which will be used for
any DeviceMapper dependent code.
Upstream-commit: f317a6b6fe31685445ac97a1475136c5ab7860b5
Component: engine
2013-09-26 15:08:54 +00:00
Michael Crosby
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
Solomon Hykes
aa0ad01db6 Merge builder.go into runtime.go
Upstream-commit: 24e02043a2672320abebc3bd5fa6a592e2ebd082
Component: engine
2013-09-06 17:33:05 -07:00
Brandon Liu
c7e2ec175d Replace Graph.All with Graph.Map
Upstream-commit: 1fca99ad908c530fcd03158a56767b55500a8521
Component: engine
2013-08-31 20:44:42 -07:00
Victor Vieux
6b54138e54 use init function
Upstream-commit: 740a97f1a836be17ab39e8496b7372900782c20b
Component: engine
2013-08-29 22:55:29 +00:00
shin-
b2a84c3f0c Fixed: ImagePull in runtime test
Upstream-commit: 1c6af604e824d8fa2896c4906f05a0a3729c8e52
Component: engine
2013-08-23 04:32:09 +02:00
Guillaume J. Charmes
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
Guillaume J. Charmes
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
Victor Vieux
d2c440fbc7 add parallel pull to 1.4
Upstream-commit: 46f59dd9333baa578b184eb25b386ac2f41caf04
Component: engine
2013-07-30 12:15:33 +00:00
Guillaume J. Charmes
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
Victor Vieux
f64e80d22b update AUTHORS
Upstream-commit: 7aba68cd548d69e10e710029ca143b32fd291585
Component: engine
2013-07-23 19:55:38 +00:00
Solomon Hykes
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
Solomon Hykes
1aa0235482 Hack: use helper functions in tests for less copy-pasting
Upstream-commit: 080243f0407a90cdacf128dc3b53a802549d7797
Component: engine
2013-07-12 17:56:55 -07:00
Solomon Hykes
6c9e32ae32 Simplify unit tests code with mkRuntime()
Upstream-commit: 6bdb6f226b13d5fdd47f3665c9fb753207bf473b
Component: engine
2013-07-11 17:59:25 -07:00
Louis Opter
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
Louis Opter
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
Louis Opter
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
Louis Opter
ea75ddf770 Fix a typo in runtime_test.go: Availalble -> Available
Upstream-commit: 1a1daca621233b4588c079e35851d0e542282124
Component: engine
2013-07-09 11:52:33 -07:00
Guillaume J. Charmes
32424f76bf Remove all network dependencies from the test suite
Upstream-commit: e43ef364cb99585d3285f51f7ab308f8a77fe09e
Component: engine
2013-07-08 15:23:04 -07:00
Sam Alba
203bc7383a Fixed runtime_test (ImagePull prototyped changed)
Upstream-commit: e2b8ee2723a4cf6a37cdb455011ec447f23f8f49
Component: engine
2013-07-05 16:03:22 -07:00
Caleb Spare
15bf500531 Typo fix
Error message grammar tweak
Upstream-commit: ba9aef6f2c529ccea571deacc46d2a61ca74a8bc
Component: engine
2013-07-04 12:40:14 -07:00
Caleb Spare
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
Caleb Spare
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
Victor Vieux
438fda3245 add sleep in tests and go fmt
Upstream-commit: ebba0a60245b487e6d3d242f47c8999321ec5d29
Component: engine
2013-07-02 10:47:37 +00:00
Guillaume J. Charmes
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
Solomon Hykes
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
Louis Opter
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
Gabriel Monroy
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
Guillaume J. Charmes
51f8e07a39 Implement regression test for stdin attach
Upstream-commit: 5190f7f33a9e36f1f5991a385f4db198e9f1b3a6
Component: engine
2013-06-24 18:36:04 -07:00
Guillaume J. Charmes
38132ab186 Make NewDockerCli handle terminal
Upstream-commit: 873a5aa8e72102a31f34c62603a3f5976471e94a
Component: engine
2013-06-24 18:29:08 -07:00
Guillaume J. Charmes
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
Solomon Hykes
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
Guillaume J. Charmes
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
Victor Vieux
4147a474f5 rebase master
Upstream-commit: c46382ba29c82eedab2b1601da5a81a047f078c2
Component: engine
2013-06-13 17:58:06 +00:00
Victor Vieux
fc1bee82c0 Merge branch 'master' into 691-run_id-feature
Upstream-commit: 9cdd39e0d76079206cc1befe222e2205128e5ed0
Component: engine
2013-06-13 13:18:43 +00:00
Victor Vieux
00bcb3e136 added test
Upstream-commit: 45a8945746a205ea513efc17bb242c63362c79a9
Component: engine
2013-06-13 13:17:56 +00:00
Victor Vieux
83d9b24a84 bump to master
Upstream-commit: c906239220c7ba06b8615f001fab2f42fb063aeb
Component: engine
2013-06-05 10:23:45 +00:00
Victor Vieux
4747c5b99f linted names
Upstream-commit: fd224ee590dc9f003f6507b529a9f47cceb02c44
Component: engine
2013-06-04 18:00:22 +00:00
Victor Vieux
5a833bafbe bump to master
Upstream-commit: 62c78696cda5660524dee596a07aac66d89437af
Component: engine
2013-06-03 11:06:13 +00:00
Guillaume J. Charmes
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