Commit Graph

370 Commits

Author SHA1 Message Date
59911bba39 Remove usage of listenbuffer package
It actually adds nothing to queuing requests.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ca5795cef810c85f101eb0aa3efe3ec8d756490b
Component: engine
2015-11-30 09:04:55 -08:00
c862a7ae5b Revert "Return listenbuffer behavior"
This reverts commit 281a48d092fa84500c63b984ad45c59a06f301c4.

Signed-off-by: Alex Crawford <alex.crawford@coreos.com>
Upstream-commit: a8b84cd8fb63d237b488f8b137b45187a6efaa5a
Component: engine
2015-11-24 18:32:57 -08:00
d1d856514e Fix "./docker" package name on freebsd
This fixes "can't load package: package ./docker: found packages client.go (main) and daemon_freebsd.go (docker)"

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: e54c4517a78ea87e6611784f9900e82f60a23303
Component: engine
2015-11-17 09:38:19 -08:00
2e538bcbf1 Remove deprecated cli flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 7929888214741c4ab194c44e0b14ac08aca06556
Component: engine
2015-11-15 10:40:01 +01:00
2f262fa249 Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again
Another try at dockerversion placeholder for library import
Upstream-commit: 58b270c338e831ac6668a29788c72d202f9fc251
Component: engine
2015-11-09 13:15:50 -08:00
48001c30bb dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8054a303870b81eebe05e38261c1b68197b68558
Component: engine
2015-11-09 19:32:46 +01:00
ef88e7ace2 Remove LXC support.
The LXC driver was deprecated in Docker 1.8.
Following the deprecation rules, we can remove a deprecated feature
after two major releases. LXC won't be supported anymore starting on Docker 1.10.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3b5fac462d21ca164b3778647420016315289034
Component: engine
2015-11-05 17:09:57 -05:00
cc55863497 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86617249eadd7142227c5355ba9164b4.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b78ca243d9fc25d81c1b50008ee69f3e71e940f6
Component: engine
2015-10-27 21:23:53 -04:00
4d261096ec dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d5cd032a86617249eadd7142227c5355ba9164b4
Component: engine
2015-10-27 20:36:07 +01:00
f833d205f0 Make default tls host work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: fbb01b816288c5cf3eb79358c035072766b6e0f0
Component: engine
2015-10-19 21:17:37 +08:00
0e3861a2d2 Merge pull request #16910 from mavenugo/ipam
Vendoring libnetwork for the pluggable IPAM driver support
Upstream-commit: 4ea3ff70618d28520d2ae787bd00206d05c9f1db
Component: engine
2015-10-13 14:41:19 -07:00
7a285e518e IPAM API & UX
introduced --subnet, --ip-range and --gateway options in docker network
command. Also, user can allocate driver specific ip-address if any using
the --aux-address option.
Supports multiple subnets per network and also sharing ip range
across networks if the network-driver and ipam-driver supports it.
Example, Bridge driver doesnt support sharing same ip range across
networks.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: cc6aece1fdefbc10638fe9e462a15608c6093115
Component: engine
2015-10-13 11:03:03 -07:00
7c902d7e22 Merge pull request #16928 from coolljt0725/fix_16927
Fix docker daemon exit immediately after starting without -H option closes #16927
Upstream-commit: 08c5f52d70e539ff168d570b60b0c5d6c1a847c2
Component: engine
2015-10-12 17:24:42 +02:00
eaf757b644 Fix docker daemon exit immediately after starting without -H option closes #16927
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: e38767e197a1456458cda53b4558f56f5b6f22fa
Component: engine
2015-10-12 04:49:25 -04:00
bb94a5ee85 Remove used param on ParseHost
The first param on opts.ParseHost() wasn't being used for anything.

Once we get rid of that param we can then also clean-up some code
that calls ParseHost() because the param that was passed in wasn't
being used for anything else.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ba973f2d74c150154390aed1a5aed8fb5d0673b8
Component: engine
2015-10-11 20:45:17 -07:00
b34ed2cbab Merge pull request #15753 from SvenDowideit/make-windows-default-to-use-2376
Default the tcp port to 2376 if tls is on, and 2375 if not
Upstream-commit: c45ad0b02d1cc1f88aaabab18aed27aeb20b9e7a
Component: engine
2015-10-11 15:35:04 -07:00
4e6b402919 Default the tcp port to 2376 if tls is on, and 2375 if not
Refactor so that the Host flag validation doesn't destroy the user's input,
and then post process the flags when we know the TLS options

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 50f0906007bdec83dd23b6ae5216769ab65bbf59
Component: engine
2015-10-09 17:48:03 -07:00
2c93131473 Merge pull request #16644 from dhiltgen/discovery_tls
Add TLS support for discovery backend
Upstream-commit: b50a88cfd78498e5cd943ee3964585a73067e3e4
Component: engine
2015-10-08 14:21:06 -07:00
885627be00 Merge pull request #16674 from coolljt0725/use_consistent_command_description
Use consistent command description
Upstream-commit: b5d914188efa55e6cf1fcd14334b2c1b61181eea
Component: engine
2015-10-08 12:01:16 -07:00
262c5c28a2 Use consistent command description
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2b0927c9ac23b66d8a05761801d1c5f882ba8dfb
Component: engine
2015-10-08 08:46:21 -04:00
47fa2052c1 Add TLS support for discovery backend
This leverages recent additions to libkv enabling client
authentication via TLS so the discovery back-end can be locked
down with mutual TLS.  Example usage:

    docker daemon [other args] \
        --cluster-advertise 192.168.122.168:2376 \
        --cluster-store etcd://192.168.122.168:2379 \
        --cluster-store-opt kv.cacertfile=/path/to/ca.pem \
        --cluster-store-opt kv.certfile=/path/to/cert.pem \
        --cluster-store-opt kv.keyfile=/path/to/key.pem

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 124792a8714425283226c599ee69cbeac2e4d650
Component: engine
2015-10-07 16:01:00 -07:00
b0a8b96c68 Return listenbuffer behavior
Now we're start to serve early, but all Accept calls are intercepted by
listenbuffer or systemd socket.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 281a48d092fa84500c63b984ad45c59a06f301c4
Component: engine
2015-10-07 14:18:42 -07:00
0eed66fc40 Merge pull request #16769 from LK4D4/fix_volume_socket
Allocate resources for server API before daemon creation
Upstream-commit: 80f2e3f0c6d8c439ba0d4b53162dcf1610ad2d46
Component: engine
2015-10-05 20:48:41 +02:00
c12ca2de3a Allocate resources for server API before daemon creation
It prevents occupying of those resources (ports, unix-sockets) by
containers.
Also fixed false-positive test for that case.

Fix #15912

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5eda566f937dddef9d4267dd8b8b1d8c3e47b290
Component: engine
2015-10-05 09:32:08 -07:00
b51b5af287 Fix man and commandline docs
- missing help option in `docs/reference/commandline/*.md` (some files
  have it, the other I fixed didn't)
- missing `[OPTIONS]` in Usage description
- missing options
- formatting
- start/stop idempotence

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 14e8898648909379f37049828e103ba1c97f253b
Component: engine
2015-10-04 21:22:27 +02:00
1fb74bb17c Separate API router from server.
Implement basic interfaces to write custom routers that can be plugged
to the server. Remove server coupling with the daemon.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: da982cf5511814b6897244ecaa9c016f8800340a
Component: engine
2015-09-29 19:43:03 -04:00
69db6279aa Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de4164043546d2b9ee3bf323dbc41f4979c84480, reversing
changes made to 7daeecd42d7bb112bfe01532c8c9a962bb0c7967.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
Upstream-commit: b08f071e18043abe8ce15f56826d38dd26bedb78
Component: engine
2015-09-29 14:26:51 -04:00
fef14476a9 Revert "Merge pull request #16567 from calavera/context_per_request"
This reverts commit ff92f45be49146cd7ac7716c36d89de989cb262e, reversing
changes made to 80e31df3b6fdf6c1fbd6a5d0aceb0a148066508c.

Reverting to make the next revert easier.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 79c31f4b13d331d4011b2975a96dcdeab2036865
Component: engine
2015-09-29 13:40:46 -04:00
8cec2a263a Define a context per request.
Avoid creating a global context object that will be used while the daemon is running.

Not only this object won't ever be garbage collected, but it won't ever be used for anything else than creating other contexts in each request. I think it's a bad practive to have something like this sprawling aroud the code.

This change removes that global object and initializes a context in the cases we don't have already one, like shutting down the server.
This also removes a bunch of context arguments from functions that did nothing with it.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 27c76522dea91ec585f0b5f0ae1fec8c255b7b22
Component: engine
2015-09-24 18:44:53 -04:00
bf44c732da Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 26b1064967d9fcefd4c35f60e96bf6d7c9a3b5f8
Component: engine
2015-09-24 11:56:37 -07:00
abf8c0902a Merge pull request #16517 from coolljt0725/show_help_all_the_time
Clean up: show usage when global --help present
Upstream-commit: 01670bec48e3302c3571e7369e57fa0f092bbdf2
Component: engine
2015-09-23 18:58:19 -04:00
55f78714ca Clean up: show usage when global --help present
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 4d55877e278ea62b98927c6b9fb23b4b935431c1
Component: engine
2015-09-23 05:17:03 -04:00
4168ba7ed4 docker restarts running OR stopped containers, docs edit rm "running"
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: e41753678d5ffd6c505f1984943bc36d34e134bb
Component: engine
2015-09-20 09:16:27 -04:00
3f59f642d4 Docs: correct the description of docker cp
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ee6b81faf2a6d49a53cc79571f5c96be4bdb8db0
Component: engine
2015-09-20 18:02:28 +08:00
b8b3d17b1b "docker network" missing from docker --help
Fixed issues related to network subcommand tests
- "network" in exempted list of short help check
- Condition for exact test modified to meet experimental commands
- Sorting of commands done in flags_experimental

Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Upstream-commit: 44da5c3de2c763c4bc42a74051ad7a37adf1f553
Component: engine
2015-09-04 15:34:17 +09:00
bfe1bbc7d2 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b3b7eb2723461b1eb4be692f4bced0ae8ea9cb58
Component: engine
2015-08-26 13:37:52 -04:00
ad05d1ea8d Merge pull request #15125 from WeiZhang555/golint-stdcopy-system
fix golint warnings/errors on pkg/system and pkg/stdcopy
Upstream-commit: ecff4badcd98f749e5bd8511fbf4ca2c605db96c
Component: engine
2015-08-21 14:27:59 -07:00
a78072668a Initialize LogConfig in daemon mode
Signed-off-by: Marius Sturm <marius@graylog.com>
Upstream-commit: e904cbec03654765d65a29d6709d84ee43c7bde8
Component: engine
2015-08-15 18:06:03 +02:00
5e176c5f47 fix golint warnings/errors on pkg/system and pkg/stdcopy
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7e420ad8502089e66ce0ade92bf70574f894f287
Component: engine
2015-08-13 18:47:13 +08:00
f68b6c3486 Remove -h flag from completion and daemon reference
All docker subcommands support `-h` as an alias for `--help`
unless they have `-h` aliased to something else like `docker run`,
which uses `-h` for `--hostname`.

`-h` is not included in the help messages of the commands, though.

It ist visible in
* reference: only in `docker daemon` reference,
  see output of `grep -Rse --help=false docs`
* man pages: only in `docker` man page
  see output of `grep -RF '**-h**' man`

For consistency reasons, this commit removes `-h` as an alias for
`--help` from the reference page, man page and the bash completion.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: ceb11d966034f4b4308abf4fc2826b4c840b6e99
Component: engine
2015-08-11 07:30:58 -07:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
508816d55a Add test to check if subcommands are sorted
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 4d212f7853912a2826e1cc725d831515553fde9c
Component: engine
2015-08-07 01:34:21 -07:00
f99b218f2a Remove key file when migration fails.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 07c45e499d5dc04b009d522ebbdcbfebe7e7aba9
Component: engine
2015-08-03 15:29:54 -07:00
af1a68305d Merge pull request #15168 from Microsoft/10662-daemonconfiglocation
Windows: [TP3] Move daemon config directory
Upstream-commit: 75c082c4b208fbba6608e7a5ea4959885d122f5a
Component: engine
2015-07-30 12:56:52 -07:00
76d46c7e63 Windows: Move daemon config directory
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9ed4400baf21528644c608eeda24fda081dfc4f2
Component: engine
2015-07-30 12:39:19 -07:00
3f75e1a44a tlsconfig: better format for error message in tlsconfig
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c7a04fda2ad804601385f054c19b69cf43fcfe46
Component: engine
2015-07-30 14:15:41 -04:00
18ba2e91f3 Merge pull request #15139 from tiborvass/fix-uuid-loggerf
Set uuid.Loggerf to nop on client and to logrus.Warnf on daemon
Upstream-commit: 28ac78c02f502858a243982fa84995bb389427a3
Component: engine
2015-07-29 18:17:54 -04:00
74a4e76af0 Set uuid.Loggerf to nop on client and to logrus.Warnf on daemon
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7841d6ab9a58aff1d607eea7303c665c159ceaec
Component: engine
2015-07-29 17:49:59 -04:00
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
dcda9483a8 api/server fix golint errors/warnings.
Addresses #14756
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 351f6b8ec011983d894951769c2116c9feaf81d2
Component: engine
2015-07-28 22:44:39 +00:00