Commit Graph

2945 Commits

Author SHA1 Message Date
2ab9f176ff Merge pull request #19560 from aboch/mn
Reject multiple networks on container creation request
Upstream-commit: f7abff4f818847694f4a9beeeef63879d28e0e60
Component: engine
2016-01-25 14:57:51 -08:00
fc335b54af Reject multiple networks on container creation
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: cfa515fd9d1530bd84e98c6d6564e641dcb2d0fe
Component: engine
2016-01-25 12:50:01 -08:00
f06c5a3e4c Fix error message in container creation
Error message was different if image was specified with the full ID.

Fixes #19652

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8a68315c38d7e62b140e145766e842de07d0422d
Component: engine
2016-01-25 11:45:20 -08:00
6da2c320c6 Merge pull request #19216 from scaleoutsean/master
Add GPFS filesystem IDs
Upstream-commit: 67d86d10d890023eb6ceebfea2aaa8af937fd750
Component: engine
2016-01-22 21:27:03 -05:00
0fc7347e16 Merge pull request #19527 from aboch/epc
Move Unsupp Network & IP check to the new updateNetworkConfig() func
Upstream-commit: 422827fa92f9fc888271d02874ab950797ab16cb
Component: engine
2016-01-22 15:54:21 -08:00
6c368a5493 Merge pull request #19190 from srust/volume_driver_parity_again
Allow external volume drivers to host anonymous volumes again
Upstream-commit: 455a505749ff5db0d6f997b249234d0f1135fe5a
Component: engine
2016-01-22 15:53:06 -05:00
44fa01bbec Merge pull request #19517 from calavera/validate_config_keys
Verify that the configuration keys in the file are valid.
Upstream-commit: 34a83f9f2c0516b3c5e7024393487eee54309401
Component: engine
2016-01-22 15:01:29 -05:00
9aa26ba55a Make TLSOptions and LogConfig embedded structs.
That way the configuration file becomes flag, without extra keys.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 5e80ac0dd183874ab7cd320a8bd0f0378dbd1321
Component: engine
2016-01-22 13:20:17 -05:00
1136f541a5 Add GPFS
Signed-off-by: Sean Lee <seanlee@tw.ibm.com>
Upstream-commit: bdc8241da93fe13e1d451c37340ac9c9143bebe4
Component: engine
2016-01-22 21:12:47 +08:00
1344a300e6 Merge pull request #19558 from LK4D4/reduce_cgroup_parsing
Refactor sysinfo usage
Upstream-commit: c91045a78bf138aa32acd215fed4084d3b912bec
Component: engine
2016-01-22 11:18:53 +01:00
7141a04b13 Merge pull request #19263 from jfrazelle/update-aa-parser
refactor aaparser pkg, add unit tests
Upstream-commit: 3233f4560912fee87857f653a8bb32050dc04927
Component: engine
2016-01-21 19:40:53 -05:00
b3d838e7cb Merge pull request #19383 from calavera/container_store
Extract container store from the daemon.
Upstream-commit: 9ae51b3e0f01111b743c61d8d0811e7061b490df
Component: engine
2016-01-21 17:20:47 -05:00
a73130b07f Verify that the configuration keys in the file are valid.
- Return an error if any of the keys don't match valid flags.
- Fix an issue ignoring merged values as named values.
- Fix tlsverify configuration key.
- Fix bug in mflag to avoid panics when one of the flag set doesn't have any flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ed4038676f09d124180d634ec2cb341745f5fc79
Component: engine
2016-01-21 16:56:12 -05:00
3dfe6e550f Merge pull request #19524 from LK4D4/iocopy_writeto
Use bufio.Reader in io.Copy source for overlay.copyRegular
Upstream-commit: d2448a0c201592f93996a807a416016914efaccd
Component: engine
2016-01-21 15:37:12 -05:00
d88278ac45 Move ErrUnsupportedNetwork* checks to updateNetworkConfig() func
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 3b0d36dbc16d820c08ff1a2793eda2ef7048547d
Component: engine
2016-01-21 10:56:01 -08:00
091ca20c63 Use pools.Copy instead of io.Copy for overlay.copyRegular
That function is pretty heavy used on container start. Autoallocating
buffer can be painful.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3f5e1c69b345b25d9b1c57f5d492a0e3fd4432a0
Component: engine
2016-01-21 08:53:37 -08:00
0b47135998 Revert "Copy aufs hardlinks to top layer"
This reverts commit ef05b83417e32f269daf798307adcf07fe6ef13f.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 98d0997894153df8f9cfc0783390cc80f6b0274a
Component: engine
2016-01-21 07:52:50 -08:00
b0c0fb2b24 Merge pull request #19500 from cpuguy83/fix_loading_with_containerized_plugins
Fix loading with containerized plugins
Upstream-commit: 757d686700b02fa79f7c59edee656b7c35f956f3
Component: engine
2016-01-21 08:57:01 -05:00
8bb1758665 Merge pull request #19483 from coolljt0725/fix_19477
Fix #19477, clean up the ports when release network
Upstream-commit: 476edba01104b83f33873833e9386a98f1356383
Component: engine
2016-01-21 14:29:29 +01:00
2507868b1a Fix #19477, clean up the ports when release network
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 6025517b68301134614985121f99ccbf3f577d42
Component: engine
2016-01-20 20:09:11 -05:00
1e5e2cad46 Reuse *sysinfo.SysInfo instance in verification
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 22ebeede3010e30a0b74c58900f7ed08f7489f93
Component: engine
2016-01-20 17:08:10 -08:00
91470191b7 Merge pull request #19514 from cpuguy83/19444_fix_links_with_same_name
Don't error out when link name in use.
Upstream-commit: ee001d87a93a7da106fc052172cc3959ee457939
Component: engine
2016-01-20 15:21:58 -08:00
677299f50c Don't error out when link name in use.
This preserves old behavior from sqlite links/names.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 332d95fd0dd08c352f96e8755414e40007f6bda2
Component: engine
2016-01-20 16:40:56 -05:00
f35e915163 Merge pull request #19457 from calavera/post_config_verification
Fix post config verification without flags.
Upstream-commit: 2705fa573b10890b39295781b41dca6d69013e6b
Component: engine
2016-01-20 14:49:32 -05:00
55307d5648 Fix post config verification without flags.
- Set the daemon log level to what's set in the configuration.
- Enable TLS when TLSVerify is enabled.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: cd3446972e968639684f2b65bfc11c099a25f1b0
Component: engine
2016-01-20 13:01:07 -05:00
0a1bfb4731 Merge pull request #19044 from HackToday/18890-validate-volume
Fix volume filter validation
Upstream-commit: fd79462af3ebd5988a948f150bfbdcd2b04ca418
Component: engine
2016-01-20 09:56:30 -08:00
7568d41513 Fix loading of containerized plugins
During daemon startup, all containers are registered before any are
started.
During container registration it was calling out to initialize volumes.
If the volume uses a plugin that is running in a container, this will
cause the restart of that container to fail since the plugin is not yet
running.
This also slowed down daemon startup since volume initialization was
happening sequentially, which can be slow (and is flat out slow since
initialization would fail but take 8 seconds for each volume to do it).

This fix holds off on volume initialization until after containers are
restarted and does the initialization in parallel.

The containers that are restarted will have thier volumes initialized
because they are being started. If any of these containers are using a
plugin they will just keep retrying to reach the plugin (up to the
timeout, which is 8seconds) until the container with the plugin is up
and running.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d85b9f858050dbfb2dde3d68517952958b8e38ee
Component: engine
2016-01-20 12:23:17 -05:00
818faba77e Fix race condition in execCommandGC
`daemon.execCommandGC`
The daemon object (grep execCommandGC) iterate over a map
(grep execCommands.Commands) in a goroutine.
Lock can't protect concurrency access in this case.
Exec command storage object should return a copy of commands instead.

Signed-off-by: Pei Su <sillyousu@gmail.com>
Upstream-commit: e5e62b96ce0d4eb3934a386b07203830f55e07ce
Component: engine
2016-01-20 12:52:05 +08:00
793bc88c21 Extract container store from the daemon.
- Generalize in an interface.
- Stop abusing of List for everything.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3c82fad44112dc73861f325bbecd68b9922b0ad3
Component: engine
2016-01-19 13:21:41 -05:00
66b0f4bcad Merge pull request #19432 from jfrazelle/fix-x32
add send, recv, and x32 so we can install i386 pkgs on amd64
Upstream-commit: 30e42a27991377e4b278dee089436bc57ee04a4d
Component: engine
2016-01-19 10:20:01 -05:00
6541731269 add send, recv, and x32 so we can install i386 pkgs on amd64
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 308eff99e8468be4e92951de0ac69b27042a833b
Component: engine
2016-01-18 19:24:01 -08:00
54242d411e nil ptr check for endpointsettings when used with older clients
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 35dbce109bc1128e4abb2bd726055c2daa4842af
Component: engine
2016-01-18 17:15:59 -08:00
88549196d4 Merge pull request #19414 from anusha-ragunathan/postBuild
Make daemonbuilder.Docker leaner.
Upstream-commit: a495c148a5948c372c626c6a4643d361f31374d0
Component: engine
2016-01-18 21:46:49 +01:00
980b654418 Merge pull request #19372 from cloudflare/fix-log-copier
only close LogDriver after LogCopier is done
Upstream-commit: 3044a08326de43617a3b1328b86ccc89ffe0641d
Component: engine
2016-01-18 14:38:34 -05:00
5ce70c9580 only close LogDriver after LogCopier is done
this prevents the copier from sending messages in the buffer to the closed
driver. If the copied took longer than the timeout to drain the buffer, this
aborts the copier read loop and return back so we can cleanup resources
properly.

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>
Upstream-commit: 84e14754e1ef3b089442398a31c5c5813fa9a1b6
Component: engine
2016-01-18 17:47:57 +00:00
bd1120dfd8 Make daemonbuilder.Docker leaner.
Currently builder.Backend is implemented by daemonbuilder.Docker{} for
the daemon. This registration happens in the API/server code. However,
this is too implementation specific. Ideally we should be able to specify
that docker daemon (or any other) is implementing the Backend and abstract
the implementation details. So we should remove package daemonbuilder
dependency in build_routes.go

With this change, daemonbuilder.Docker is nothing more than the daemon.
A follow on change will remove the daemonbuilder package and move relevant
methods under daemon, so that API only knows about the backend.

Also cleanup code in api/client/build.go. docker cli always performs build
context tar download for remoteURLs and sends an empty remoteContext. So
remove relevant dead code.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 14215ed5a1900a88a3b17dd7cd566def50bfcbc9
Component: engine
2016-01-18 09:16:11 -08:00
05e11f88a9 Fix volume filter validation
Fixes: #18890
This fix add same filter validation logic as images. We should
add such check to make sure filters work make sense to end-users

Right now, we keep old use 1 as filter, but in long term, it should
be have same interface checking as images, it could be improved in
other patches.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 66c253cbf70f5dcf75d47be9558a18096a39bc58
Component: engine
2016-01-18 10:07:42 +00:00
addf165927 Fix panic on starting exec more than once
Issue was caused when exec is tarted, exits, then stated again.
In this case, `Close` is called twice, which closes a channel twice.

Changes execConfig.ExitCode to a pointer so we can test if the it has
been set or not.
This allows us to return early when the exec has already been run.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1a60a805bfabee729dbc833515cd0be439adb95b
Component: engine
2016-01-15 11:57:23 -05:00
25aab1428e Merge pull request #18587 from calavera/daemon_configuration_file
Allow to set daemon and server configurations in a file.
Upstream-commit: e44364eae90784b423eee8b2969bda9cd2429746
Component: engine
2016-01-14 16:44:58 -08:00
4a4ab3133f Merge pull request #19339 from cpuguy83/19335_revert_18736
Revert "Break big lock into some tiny locks"
Upstream-commit: 9365b301a821a95e36589c990a36ea4c619b9ba1
Component: engine
2016-01-14 16:53:39 -05:00
1a8f320266 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 677a6b3506107468ed8c00331991afd9176fa0b9
Component: engine
2016-01-14 16:44:37 -05:00
57bedb0b2d Merge pull request #17316 from rmb938/ipam_conf_options
Add IPAM Config Options to match libnetwork
Upstream-commit: e35f5a481ac5c982c4f97be5dc41206e21e19007
Component: engine
2016-01-14 16:30:03 -05:00
f8714c52f0 Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
Upstream-commit: 662cac08ef83ee105addb4d29f6e46188468306f
Component: engine
2016-01-14 14:32:25 -05:00
f2aa94a27b Merge pull request #19326 from HackToday/19153-filter-rethink
Fix image filter
Upstream-commit: 7cd6210a88006da21529aeccadea79c9ce720abb
Component: engine
2016-01-14 13:59:14 -05:00
082c746378 Merge pull request #19242 from mavenugo/nsalias
Network scoped alias support
Upstream-commit: 73a5393bf3530815a608725fe2546121ccadbfe4
Component: engine
2016-01-14 10:58:51 -08:00
49a1d12f12 Revert "Break big lock into some tiny locks"
This reverts commit 1326f0cba5f933674e23769de1385d3b0841e758.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f093e1273d7d030a24045d97a78fec8637f46bf8
Component: engine
2016-01-14 13:38:09 -05:00
af7fec7cd7 Merge pull request #19226 from coolljt0725/remove_dup_check
Remove duplication checking for the existence of endpoint to speed up container starting
Upstream-commit: f292e90b8dcca4fabf9d6aa6d889e9fae0eca6ba
Component: engine
2016-01-14 12:24:11 -05:00
980beea08a Merge pull request #19155 from coolljt0725/create_cwd_on_create
Create the working directory on container creation
Upstream-commit: a225e39667d7ddd2345326bc5cd3b1ce15fd0bad
Component: engine
2016-01-14 09:13:44 -08:00
8eb1087397 Network scoped alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: dda513ef651b42fcb9625e651f664554161c0a6a
Component: engine
2016-01-14 08:44:41 -08:00
cfd7c2432a Merge pull request #19291 from coolljt0725/fix_19100
Fix #19100 and fix a typo
Upstream-commit: 349d9700bd5e3bbf86ea2b7c0097b5f897e2fbc1
Component: engine
2016-01-14 11:40:29 -05:00