Commit Graph

534 Commits

Author SHA1 Message Date
fa1db664e1 Invoke ReloadConfiguration on network controller
- It reverts fa163f5619bb01cabca1c21 plus a small change
  in order to allow passing the global scope datastore
  to libnetwork after damon boot.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: ed364b69df0432d0143e7661c4c0695377ceef7b
Component: engine
2016-02-18 12:14:14 -08:00
ea1de57ceb Don’t stop daemon on migration hard failure
Also changes missing storage layer for container
RWLayer to a soft failure.

Fixes #20147

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2798d7a6a681aee8995e87c9b68128e54876d2b5)
Upstream-commit: 55080fc03bed4dba85d5c5760363b92851ff728f
Component: engine
2016-02-17 14:26:30 -05:00
311dc4f8a6 Add progress bar to docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: fae09e25698006a190d14fe64f1576f68431fabf
Component: engine
2016-02-05 02:24:23 -05:00
4acd5eb7af Merge pull request #18362 from runcom/tunable-SetMaxThreads
daemon_unix: set golang runtime max threads
Upstream-commit: 4f37e14e9c1f57015d4a212bc48601eaef0fc733
Component: engine
2016-02-02 08:36:28 -08:00
fe296e65a0 Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c332b164f1aefa2407706adf59d50495d6e02cb
Component: engine
2016-02-01 09:57:38 -08:00
01cb29485d daemon_unix: set golang runtime max threads
SetMaxThreads from runtime/debug in Golang is called to set max threads
value to 90% of /proc/sys/kernel/threads-max

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 140a74347d7fde130598aeca028b72af99737239
Component: engine
2016-01-30 21:37:24 +01:00
76f6e45741 Merge pull request #19837 from cpuguy83/carry_19085
Carry 19085 -- Improve & cleanup documentation comments 
Upstream-commit: 46018c3cee3a6fb76373289306f81ede881c9ca6
Component: engine
2016-01-29 14:30:25 -08:00
b5c499b982 update doc string
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9c09a79ba54080873b435842fb2a4aaa3b701a9c
Component: engine
2016-01-29 15:25:25 -05:00
2fd968f843 daemon: don't prepare mountpoint for restart container
The restart container has already prepared the mountpoint, there is
no need to do that again. This can speed up the daemon start if
the restart container has a volume and the volume driver is not
available.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0feeab2e43a75bee3d5709248544b3078df96706
Component: engine
2016-01-27 02:43:40 -05:00
ee42d601b2 Merge pull request #19717 from coolljt0725/fix_load
Daemon: do GetRWLayer after checking if container support the current graph driver
Upstream-commit: 63f8429bf0152bf0e8903ab4def18295bd6d4e1d
Component: engine
2016-01-26 21:55:32 -08:00
c0b7e34886 Daemon: do GetRWLayer after checking if container use the current graph driver
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 899f1b18707d035a1dca73cae0dd7b3bfe65c046
Component: engine
2016-01-26 20:20:30 -05:00
a374e9a1d6 Merge pull request #19737 from calavera/fix_reload_docs
Remove cluster storage advertise from reload.
Upstream-commit: 7992b353c04b4214c28d5be6195b2703a52defb1
Component: engine
2016-01-26 17:04:46 -08:00
2a5a8c6749 Remove cluster storage advertise from reload.
Because libnetwork won't really send container information to the new
storage anyways.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: fa163f5619bb01cabca1c214b59e14518a797a7a
Component: engine
2016-01-26 18:19:30 -05:00
597af2a851 Merge pull request #19704 from cpuguy83/speedup_build_cache
Use imageStore.Children instead of whole the Map
Upstream-commit: b775efc9bc5a1dcbcd473150ecec4646af51e272
Component: engine
2016-01-26 16:59:55 -05:00
b200f85ceb Use imageStore.Children instead of whole the Map
daemon cache was getting the whole image map and then iterating through
it to find children. This information is already stored in the image
store.

Prior to this change building the docker repo with a full cache took 30
seconds.
After it takes between 15 seconds or less (As low as 9 seconds).
This is an improvement on docker 1.9.1 which hovered around 17 seconds.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1350e8b7b8025d73056b800963c001fb9619a85c
Component: engine
2016-01-26 14:12:56 -05:00
dda7a5fe00 Merge pull request #19154 from hqhq/hq_verify_cgroupparent
Verify cgroup-parent name for systemd cgroup
Upstream-commit: 141a301dca9ff00259157116f479e1c8405a9c14
Component: engine
2016-01-26 11:44:31 +01:00
25849c48bc Merge pull request #19057 from dnephin/remove_version_from_registry_pkg
Remove dockerversion from registry package
Upstream-commit: 07e2dedecb3a0b7381ebf0f8fb4d08d082754cd0
Component: engine
2016-01-25 22:45:06 -08:00
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
06b6f08b9c Verify cgroup-parent name for systemd cgroup
Fixes: #17126

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 5ce5a8e966ea41b7f40922dab3fbaf1ac85971bd
Component: engine
2016-01-22 21:17:23 -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
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
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
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
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
a208c4a74e Remove the use of dockerversion from the registry package
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 61a49bb6ba2c0f17a31a64ee6336b4fc40c37f71
Component: engine
2016-01-15 12:43:54 -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
ebf645cab0 Merge pull request #19245 from jfrazelle/seccomp-kernel-check
check seccomp is configured in the kernel
Upstream-commit: 293b3767c8453ee7ccabe53c357965241d7afbf6
Component: engine
2016-01-12 11:33:27 -08:00
cb5c9d856b check seccomp is configured in the kernel
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 40d5ced9d00113744555ff13f4e62617dda5f1e2
Component: engine
2016-01-12 09:45:21 -08:00
e70fdfac3a Add migration from sqlite links back to hostConfig
Before #16032, once links were setup
in the sqlite db, hostConfig.Links was cleared out.
This means that we need to migrate data back out of the sqlite db and
put it back into hostConfig.Links so that links specified on older
daemons can be used.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2600777469b18f7133fc4d6c6c99698d6aa700fe
Component: engine
2016-01-11 11:31:29 -05:00
caddcbad3d Improve docs for Daemon.TagImage and dockerfile.BuildFromConfig.
Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
Upstream-commit: a4ce361ac8dc8c1a8d83b51c787986de256e2f69
Component: engine
2016-01-08 14:51:09 +01:00
20a5900d4d Build names and links at runtime
Don't rely on sqlite db for name registration and linking.
Instead register names and links when the daemon starts to an in-memory
store.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0f9f99500c40f2a46682967ca358cd2346fd5e13
Component: engine
2016-01-07 14:10:42 -05:00
4ec2693c9e Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 907407d0b2e5863f0e1b40b93a356bbf03c7b9fb
Component: engine
2016-01-06 19:48:59 -05:00
17e194f6b9 Merge pull request #16534 from cpuguy83/make_volume_drivers_responsible
Move responsibility of ls/inspect to volume driver
Upstream-commit: 55137c19f4333e22de7a1ce121298942021b5251
Component: engine
2016-01-05 17:29:51 -05:00
71c14b2632 Merge pull request #18752 from cpuguy83/fix_broken_pipe_error_on_download_abrt
Don't log EPIPE errors on client download abort
Upstream-commit: b4e26a96dad3381fb2757172ecc6e04ac375cd6f
Component: engine
2016-01-05 13:34:57 -08:00
db1910a30c Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3eca4451d264aac564594fe46b8c097bd85a5cc
Component: engine
2016-01-05 16:28:38 -05:00
d1e813dc31 Merge pull request #19092 from anusha-ragunathan/builder-rm-merge
Remove runconfig.Merge
Upstream-commit: df9a3d100574a7f6176b8ca544dad352493686b2
Component: engine
2016-01-05 15:21:24 -05:00
510a74def2 Remove runconfig.Merge
Merge was used by builder and daemon. With this commit, the builder
call has been inlined and the function moved to the daemon package,
which is the only other caller.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: eb4ae8e28aa0baf28d6cde1079a5f9c618d475b2
Component: engine
2016-01-05 11:28:55 -08:00
966533e9d7 Merge pull request #18399 from tonistiigi/migration-optimization
Migration optimizations
Upstream-commit: 5aae5a5fae39cff15f5e92cfe1f80c1c5ef019d9
Component: engine
2016-01-05 10:11:56 -08:00
89d18d78c9 Merge pull request #18208 from cpuguy83/restart_links
Daemon Restart: attempt to wait for container deps
Upstream-commit: 04234bd16a463af3b5e093ef180351d7b54b6a35
Component: engine
2016-01-04 14:36:00 -08:00
58e545b6bf Merge pull request #18888 from calavera/event_types
Event all the things!
Upstream-commit: 723be0a3325799fd6b2a6b689af54f5a07edf992
Component: engine
2016-01-04 13:07:33 -08:00
b5e71315d4 Parallel migration and optimizations
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a8f88ef4036d22aa1feb1de8e86d92371bcd5b67
Component: engine
2016-01-04 09:48:52 -08:00
3580481051 Add event types.
- Stop serializing JSONMessage in favor of events.Message.
- Keep backwards compatibility with JSONMessage for container events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 72f1881df102fce9ad31e98045b91c204dd44513
Component: engine
2015-12-30 17:39:33 -05:00
9cbaaf7f9f Fix missing comment in docker inspect
Fixes #18571

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d32f43013bf4c3aaa90c9ea409fbb9ade4105200
Component: engine
2015-12-30 11:52:53 -08:00
c64119dd87 Fix daemon failed to start with error "layer does not exist"
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 72d3d1ef856e2b3af78cccf463be5a9be823997b
Component: engine
2015-12-30 14:19:31 +08:00
6e4bd4dbf1 Move graph driver registration out of the daemon package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 91154e9235c71bc120b93d2e16632970e0f0ce0e
Component: engine
2015-12-28 13:02:24 -05:00
2526161bde Remove the graph driver from the daemon, move it into the layer store.
Support restoreCustomImage for windows with a new interface to extract
the graph driver from the LayerStore.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f5916b10ae02c7db83052a97205ac345a3d96300
Component: engine
2015-12-28 12:55:48 -05:00
661c845f7b Don't log EPIPE errors on client download abort
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 79c23fdbf4ab5aea2170c7bc6762e24c44eb84e0
Component: engine
2015-12-28 11:04:02 -05:00
524c469eb3 Daemon Restart: attempt to wait for container deps
This provides a best effort on daemon restarts to restart containers
which have linked containers that are not up yet instead of failing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 19762da67e40879be77b1b55c21a9754235fbb78
Component: engine
2015-12-28 11:00:16 -05:00