Commit Graph

2166 Commits

Author SHA1 Message Date
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 044e4ac12c Merge pull request #1166 from dotcloud/networkless_tests-2
* Tests: Remove all network dependencies from the test suite
Upstream-commit: 0acdef45499a5e51dbc56b34090e395af8820fa7
Component: engine
2013-07-09 11:20:18 -07:00
Guillaume J. Charmes 3cfd5fdb16 Make sure container is not marked as ghost when it starts
Upstream-commit: 91520838fc72f4004d65844b8e57df85473808a1
Component: engine
2013-07-09 10:48:33 -07:00
Guillaume J. Charmes 44da1d38e6 Merge pull request #1049 from dotcloud/1040_ignore_stderr_tests-fix
- Tests: Ignore stderr while doing tests
Upstream-commit: ada0e1fb0817d2e609b46c260ef6ab0cfa510379
Component: engine
2013-07-09 10:32:24 -07:00
Victor Vieux 80e25aa274 fix typo
Upstream-commit: 05d7f85af9e5813ddb1c066e44c802dc33790547
Component: engine
2013-07-09 10:55:28 +00:00
Solomon Hykes f46f2cd5f6 * Hack: standardized docker's build environment in a Dockerfile
Upstream-commit: 9f1fc40a64fd6863dec5298099041493fee87db5
Component: engine
2013-07-08 21:30:29 -07:00
Guillaume J. Charmes 7664005559 Merge pull request #1157 from kstaken/1156-entrypoint-builder
Builder: Fix #1156 entrypoint override from base image
Upstream-commit: e14dd4d33e2bbdb54f2bac31eb8eae155f9b656a
Component: engine
2013-07-08 16:57:26 -07:00
Kimbro Staken f371bd9fe8 Override Entrypoint picked up from the base image that breaks run commands in builder
Upstream-commit: f64dbdbe3a147f58d04b6c39c6469fdd97427098
Component: engine
2013-07-08 16:04:39 -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
Victor Vieux 4770cb222d Merge pull request #1163 from dotcloud/1137-change_search_size-feature
* Client : uses the terminal size to display search output, add -notrunc 
Upstream-commit: 90f372af5c30fdefb7b579b5dc2f1ab743499909
Component: engine
2013-07-08 11:47:25 -07:00
Victor Vieux 20f80da2d4 Merge pull request #1066 from mhennings/fix-broken-streaming-result
* Server: Fix streaming status to the docker client while pushing images
Upstream-commit: 3ec29eb5dae98ce654bc18f5fada6c98f28872f5
Component: engine
2013-07-08 11:21:29 -07:00
Victor Vieux 92dc376485 add if to prevent crash
Upstream-commit: 3a20e4e15d27ab0061e5ffb427baf7162de9add9
Component: engine
2013-07-08 18:19:12 +00:00
Victor Vieux 5449f8eee9 uses the terminal size to display search output, add -notrunc and fix bug in resize
Upstream-commit: fd97190ee752c8de38be38a03f3cfdd4b4ce1460
Component: engine
2013-07-08 17:20:13 +00:00
Victor Vieux ed7082a0e1 Merge pull request #1030 from dotcloud/builder_display_err_log
*Builder : Display containers logs in case of build failure
Upstream-commit: 70480ce7bc6991efd7fa917981940a0c1321eb17
Component: engine
2013-07-08 07:26:46 -07:00
Victor Vieux db4a9e2ff1 add remote addr in debug
Upstream-commit: a0f5fb7394e6d1bf96865b8ec20796e682b4505b
Component: engine
2013-07-08 12:45:50 +00:00
Victor Vieux cacdb75159 Merge pull request #1138 from dotcloud/1123-rmi_conflict-fix
* Runtime: Fix error in rmi when conflict
Upstream-commit: ad33e9f38866fa4f5c62d9974d96ee1b324ea5dc
Component: engine
2013-07-08 05:19:05 -07:00
Sam Alba 203bc7383a Fixed runtime_test (ImagePull prototyped changed)
Upstream-commit: e2b8ee2723a4cf6a37cdb455011ec447f23f8f49
Component: engine
2013-07-05 16:03:22 -07:00
Sam Alba 7ec374d04b Code cleaning
Upstream-commit: d3125d8570de0f9c09de94c657f7e35755accdef
Component: engine
2013-07-05 15:26:08 -07:00
Sam Alba 76ecb3f5a4 fmt.Errorf instead of errors.New
Upstream-commit: 283ebf3ff92ef552ae9cdf23a17c1a375dac99bd
Component: engine
2013-07-05 14:56:56 -07:00
Sam Alba fba3efb6e1 Fixed ping URL
Upstream-commit: 4c174e0bfb4c6e6333f39fff3c70058eaed37e3a
Component: engine
2013-07-05 14:55:48 -07:00
Sam Alba 44c8a27b06 Allowing namespaces in standalone registry
Upstream-commit: 57a6c83547ba4671940c3134a3f68586db603048
Component: engine
2013-07-05 14:30:43 -07:00
Sam Alba 5ee43e9d28 Restoring old changeset lost by previous merge
Upstream-commit: cfc7684b7de542cfed9d8b90b654fe59c8aa4098
Component: engine
2013-07-05 12:37:07 -07:00
Sam Alba bf4fc24d05 Merging from master
Upstream-commit: be49f0a1182164d0d279484ec35931c1e3ef6d3c
Component: engine
2013-07-05 12:27:10 -07:00
Sam Alba 057f0a4b6f Adding support for nicer URLs to support standalone registry (+ some registry code cleaning)
Upstream-commit: 66a9d06d9fa7a382c6852cf047e1448e0d3e1782
Component: engine
2013-07-05 12:20:58 -07:00
Guillaume J. Charmes 00b3b197f8 Merge pull request #1127 from cespare/patch-1
Typo fix
Upstream-commit: 6940cf1ecd982e5087d614193e1e655383721c44
Component: engine
2013-07-05 10:48:59 -07:00
Guillaume J. Charmes 36c6877ea9 Revert #1126. Remove mount shm
Upstream-commit: 4e0cdc016a5eb7227d4b8d7daffba7335fcbe749
Component: engine
2013-07-05 10:47:00 -07:00
Guillaume J. Charmes c5f9d84a7d Merge pull request #1129 from cespare/style-fixes-2
Style fixes for fmt + err usage.
Upstream-commit: 8a8109648a7b99acf6aff9336a39150f2c6e05a4
Component: engine
2013-07-05 10:31:53 -07:00
Guillaume J. Charmes b40dc53b63 Merge pull request #1126 from karanlyons/patch-1
* Runtime: Mount /dev/shm as a tmpfs.
Upstream-commit: dc8b3593190625378c66a901fdcc1d962fc8fc87
Component: engine
2013-07-05 10:31:05 -07:00
Victor Vieux 5824d26e27 Fix error in rmi when conflict
Upstream-commit: dea29e7c999b7ef76a816867a2cb75c2da658fa2
Component: engine
2013-07-05 16:58:39 +00:00
Daniel Mizyrycki 0bad98719b testing, issue #775: Add automatic testing notifications to docker-ci
Upstream-commit: f7fed2ea5f811719bd8bd2e6111838ad50a53194
Component: engine
2013-07-04 21:43:46 -07:00
Daniel Mizyrycki 079055d521 testing, issue #776: Ensure docker-ci test docker code as it was at commit time
Upstream-commit: ab3893ff4d202549bf79e5671cc9e6f18376cbfd
Component: engine
2013-07-04 20:28:54 -07:00
Caleb Spare 2eb55531d3 Style fixes for fmt + err usage.
fmt.Printf and friends will automatically format using the error
interface (.Error()) preferentially; no need to do err.Error().
Upstream-commit: 1277dca3358874d0701685f7ebb52ce66be1b385
Component: engine
2013-07-04 14:33:17 -07:00
Caleb Spare 15bf500531 Typo fix
Error message grammar tweak
Upstream-commit: ba9aef6f2c529ccea571deacc46d2a61ca74a8bc
Component: engine
2013-07-04 12:40:14 -07:00
Karan Lyons a0d0d12548 Mount /dev/shm as a tmpfs.
Fixes #1122.
Upstream-commit: dd619d2bd6a3cf621106f2599fbf3bc903b5801a
Component: engine
2013-07-04 09:58:50 -07:00
Marco Hennings 553b7563ec Pushing an Image causes the docker client to give an error message instead of
writing out streamed status.

This is caused by a Buffering message that is not in the correct json format:

[...]
{"status"
:"Pushing 6bba11a28f1ca247de9a47071355ce5923a45b8fea3182389f992f4
24b93edae"}Buffering to disk 244/? (n/a)..
{"status":"Pushing",[...]

The "Buffering to disk" message is originated in
srv.runtime.graph.TempLayerArchive

I am now using the StreamFormatter provided by the context from which the
method is called.
Upstream-commit: 1e2ef274cdaa76e79435df52cdc196739ba8b3b1
Component: engine
2013-07-04 10:50:37 +02: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 36eac88873 Simplify the NopWriter code.
Upstream-commit: 27ee261e6048c6fa0334bcce2116610dcd04aaed
Component: engine
2013-07-03 14:35:18 -07:00
Caleb Spare f4980e7dfe Gofmt -s (simplify)
Upstream-commit: da3962266a4103f2dbf019180585d206fb9e25ff
Component: engine
2013-07-03 14:35:18 -07:00
Caleb Spare e510808505 Use fmt.Errorf when appropriate.
Upstream-commit: e93afcdd2bd9578f98508aaad11b695dae29726e
Component: engine
2013-07-03 14:35:18 -07:00
Caleb Spare 03f2d7e4a6 Typo correction: Excepted -> Expected'
Upstream-commit: dd1b9e38e95dc719a7aeadbdee67a5f3a4873dec
Component: engine
2013-07-03 14:35:18 -07:00
Guillaume J. Charmes e37fa79f37 Merge pull request #1112 from cespare/mutex-style
Mutex style change.
Upstream-commit: 96bc9ea7c113127673e6e47a0366311e1edb8f1a
Component: engine
2013-07-03 10:34:32 -07:00
Guillaume J. Charmes ce8c962683 Merge pull request #1053 from dynport/do-not-copy-hostname-from-image
do not merge hostname from image
Upstream-commit: 16c8a10ef969fd9c87a96df69807b2928cd669de
Component: engine
2013-07-03 10:34:15 -07:00
Joffrey F 3022226088 Merge pull request #1109 from dynport/remote-lookup-fix
Fix remote lookup when pushing into registry
Upstream-commit: 5dcd11be16f732f68199b9ee96ce76190b64a9aa
Component: engine
2013-07-03 06:29:19 -07:00
Andy Rothfusz 7033d58dca Fix installation link from welcome page.
Upstream-commit: 11998ae7d62ee17856ead81ce49409dc63643d62
Component: engine
2013-07-02 16:48:57 -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
Tobias Schwab cad00c9d8a fix two obvious bugs???
Upstream-commit: 9632cf09bfd7b4a8513799bf19070ecabd55c446
Component: engine
2013-07-02 22:11:03 +00:00
Andy Rothfusz d5551edef2 Merge branch 'docs20130627' of github.com:metalivedev/docker into docs20130627
Conflicts:
	docs/sources/concepts/manifesto.rst
	docs/sources/index.rst
Upstream-commit: 96ab3c540d5f9f8509380f50e790b184beb2be6b
Component: engine
2013-07-02 15:10:07 -07:00
Andy Rothfusz 92fbe05ddb Cleaning up the welcome page, terminology, and images.
Upstream-commit: ff964d327d030221b4e65661cee0ee0826bcdb32
Component: engine
2013-07-02 15:03:29 -07:00
Andy Rothfusz 4deb63608f Fix broken quickstart link
Upstream-commit: 4b8688f1e5a5998e10bdc1d7b39458a611a25eef
Component: engine
2013-07-02 14:10:06 -07:00