Commit Graph

2603 Commits

Author SHA1 Message Date
cf1f5d3461 Merge pull request #18350 from duglin/Issue9798a
Deprecate -f flag from docker tag
Upstream-commit: fcccf2dae4770bdb7781d57e20ae94b9565b67ac
Component: engine
2015-12-02 08:16:09 -08:00
cd57abf420 Merge pull request #18351 from LK4D4/fix_rm_race
Fix race between two ContainerRm
Upstream-commit: e07769bc5a50355d972cbc71d150dc2d339f7370
Component: engine
2015-12-02 08:13:52 -08:00
22eaa04494 Move defaultSHMSize in daemon pkg
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 2969abc6c55a9ab126b90d0af4b67860b4103f3f
Component: engine
2015-12-02 10:28:10 +01:00
e9c9b85f8b Fix race between two ContainerRm
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4d1007d75c24f4e9f1d8df18cb3faae53b183661
Component: engine
2015-12-01 20:13:18 -08:00
2603d9d05a Deprecate -f flag from docker tag
Closes #9798

@maintainers please note that this is a change to the UX. We no longer
require the -f flag on `docker tag` to move a tag from an existing image.
However, this does make us more consistent across our commands,
see https://github.com/docker/docker/issues/9798 for the history.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8d4fe141c4c3f456df9c2be75ffe5071d1665717
Component: engine
2015-12-01 19:53:49 -08:00
5ed9289ac6 Merge pull request #18308 from mountkin/delete-graphdb-later
fix 2 corner cases in container create cleanup and container removal
Upstream-commit: 5efb37616ffd4b848578424ebb7b290af9965eff
Component: engine
2015-12-01 13:19:59 -08:00
54b7c08e2c fix 2 corner cases in container create cleanup and container removal
- avoid empty Names in container list API when fails to remove
    a container
  - avoid dead containers when fails to create a container

Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 4953ea1eae211366c7214bfd2381a4a189d5466a
Component: engine
2015-12-02 01:37:50 +08:00
ec12c4920e fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: ef1d410b0270fa7309d76aded34113396def7fb2
Component: engine
2015-12-01 16:29:40 +01:00
142c1d2bdc Merge pull request #18310 from rhvgoyal/log-fs-creation
devmapper: Log start and end of filesystem creation
Upstream-commit: c8891158bd1499b060346f42f52be45484a3ac94
Component: engine
2015-12-01 09:49:13 -05:00
965af57894 Merge pull request #18331 from runcom/fix-typo
daemon: daemon_experimental.go: fix typo
Upstream-commit: c6a2bce9198efe21ae40213fed2e3c25df9de613
Component: engine
2015-12-01 15:48:10 +01:00
b17c4f91f6 devmapper: Log start and end of filesystem creation
ext4 filesystem creation can take a long time on 100G thin device and
systemd might time out and kill docker service. Often user is left thinking
why docker is taking so long and logs don't give any hint. Log an info
message in journal for start and end of filesystem creation. That way
a user can look at logs and figure out that filesystem creation is
taking long time.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: a489e685c0d17455463945316cfe366e4e65dca6
Component: engine
2015-12-01 13:05:46 +00:00
b48e8b7de2 daemon: daemon_experimental.go: fix typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 4c8088268ccef8652add808e3367faafe713f485
Component: engine
2015-12-01 12:03:50 +01:00
121cf6f1ca Make sure container start doesn't make the DNS fields nil.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d7117a1b713042096bd97815bbb9663a4a01c8af
Component: engine
2015-11-30 22:46:31 -05:00
d6e4b2d7b7 Merge pull request #18178 from jfrazelle/apparmor-we-meet-again
Fix docker-default profile handing signals
Upstream-commit: e852959fadf7ec77ffb57877806603b8c0bf523e
Component: engine
2015-11-30 11:34:34 -08:00
c21d72b21a Merge pull request #18204 from mavenugo/dhb
Configurable discovery ttl and heartbeat timer
Upstream-commit: 0f0cf267e898f9a84533855304d542f524c814c1
Component: engine
2015-11-30 11:00:53 -08:00
d3dbad3a43 check version for docker-default aa profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: f8db9a09e0ec9b1925839ffff4f1cc5fe3ace630
Component: engine
2015-11-30 10:18:12 -08:00
45a6d40e9f Merge pull request #18303 from runcom/lxc-leftover
daemon: remove sysInitPath, lxc leftover
Upstream-commit: 360a10651188fcf79b0110265c3f2723637e11b7
Component: engine
2015-11-30 09:37:05 -08:00
132ab17e74 Merge pull request #18239 from jfrazelle/17783-fix-regex
Fix parsing of apparmor pcre syntax
Upstream-commit: 377e1d75f93101acbff7cf06df2c05a2df3b6760
Component: engine
2015-11-30 09:15:25 -08:00
c116892cdb daemon: remove sysInitPath, lxc leftover
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1b726b29b21bbc1aebfe0f6b71dfd61145bdd6af
Component: engine
2015-11-30 10:04:13 +01:00
dfeea039e6 Fix kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: dd7b4fd651a6f9354efb991f6ce547a03729fa18
Component: engine
2015-11-28 09:47:25 +08:00
c3cf7195f6 Merge pull request #17108 from coolljt0725/fix_remove_image
Fix docker rmi trying to remove a being used parent
Upstream-commit: b8c21783f0c7915779de3fa487f233ebc145738d
Component: engine
2015-11-26 12:21:30 -08:00
72a5c00834 Merge pull request #18252 from aaronlehmann/tarstream-readcloser
Make TarStream return an io.ReadCloser
Upstream-commit: 9ebf7dfae324d8fad524c9578ed850bf3b116d32
Component: engine
2015-11-25 21:35:21 -05:00
2d14ff7cb5 Fix docker rmi trying to remove a being used parent
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0bbc9f1d2d0effcf33d82d24bbf97f30b90619de
Component: engine
2015-11-26 09:57:20 +08:00
c88fa0bb83 Make TarStream return an io.ReadCloser
Currently, the resources associated with the io.Reader returned by
TarStream are only freed when it is read until EOF. This means that
partial uploads or exports (for example, in the case of a full disk or
severed connection) can leak a goroutine and open file. This commit
changes TarStream to return an io.ReadCloser. Resources are freed when
Close is called.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 21278efaee563b356851a530b08b0537fee095d7
Component: engine
2015-11-25 16:39:54 -08:00
c91b830a96 Validate adding digests to tagstore with go types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 20e759ab56e9c17cfe0fbe839cdd4ac9ee6f0752
Component: engine
2015-11-25 15:06:51 -08:00
1fccc71442 Fix parsing of apparmor pcre syntax
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: c0f7fdc025da69283eb00d80bf47f4d47eeb0a65
Component: engine
2015-11-25 10:38:18 -08:00
73301b3d57 Make discovery ttl and heartbeat configurable
Docker daemon uses kv-store as the host-discovery backend.
Discovery module tracks the liveness of a node through a simple
keepalive mechanism.  The keepalive mechanism depends on every
node performing heartbeat by registering itself with the discovery
module (via KV-Store Put operation). And for every Put operation,
the discovery module in all other nodes will receive a Watch
notification. That keeps the node alive.
Any node that fails to register itself within the TTL timer is
considered dead and removed from the discovery database.

The default timer (heartbeat = 20 seconds & ttl = 60 seconds)
works fine for small clusters.  But for large clusters, these
default timers are extremely aggressive and that causes high CPU
& most of the processing is spent managing the node discovery
and that impacts normal daemon operation.

Hence we need a way to make the discovery ttl and heartbeat
configurable.  As the cluster size grows, the user can change
these timers to make sure the daemon scales.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 2efdb8cbf519f55836b0703e47c907e24a20eff6
Component: engine
2015-11-25 06:51:55 -08:00
b1098ef990 Move versioned references of inspect functions to the daemon.
Leaving only one versioned main function that a backend must implement.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 38abba9e2c8f7ac27bd26bf98685b51585922317
Component: engine
2015-11-24 14:03:39 -05:00
e105a29374 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4352da7803d182a6013a5238ce20a7c749db979a
Component: engine
2015-11-24 09:40:25 -08:00
9a375b7073 Adjust docker-default profile when docker daemon is confined
Adjust the docker-default profile for when the docker daemon is running in
AppArmor confinement. To enable 'docker kill' we need to allow the container
to receive kill signals from the daemon.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Upstream-commit: 5cd6b3eca236df06e66777b15932b1a7fbb2e954
Component: engine
2015-11-23 15:20:01 -08:00
8f5a861b89 prevent journald from being built on ARM
Signed-off-by: Govinda Fichtner <govinda.fichtner@googlemail.com>
Upstream-commit: 6f6f10a75f8b447637e8a89d685452871899e9c0
Component: engine
2015-11-21 15:17:31 +01:00
4c65875314 Move exec store to its own package inside the daemon.
Remove double reference between containers and exec configurations by
keeping only the container id.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9ca2e4e81cdb950f2b5958a7712153d1a6dd6e4c
Component: engine
2015-11-20 17:40:16 -05:00
2b61f40d62 Merge pull request #18051 from calavera/extract_streams
Extract StreamConfig struct out of the daemon package.
Upstream-commit: b5c507750f2c7f616ed94ad502f5f6904cad4eac
Component: engine
2015-11-20 13:45:13 -08:00
a043562f2a Extract StreamConfig struct out of the daemon package.
This is a small configuration struct used in two scenarios:

1. To attach I/O pipes to a running containers.
2. To attach to execution processes inside running containers.

Although they are similar, keeping the struct in the same package
than exec and container can generate cycled dependencies if we
move any of them outside the daemon, like we want to do
with the container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3f5b8f712d693188b41b3d9b55e5e5213be48ef5
Component: engine
2015-11-20 15:04:27 -05:00
4d4420c373 Merge pull request #18073 from runcom/hostconfig-resources
runconfig: split resources into a struct
Upstream-commit: f064b9941c0c6070740339971a0bb59b4fe6195f
Component: engine
2015-11-20 20:29:44 +01:00
9479751884 Merge pull request #17718 from wenchma/17716_before_filter_doc
Re-implement --before and --since as options for --filter
Upstream-commit: 8fa09749fb7b5560ffc7f0a73005302f99d89d01
Component: engine
2015-11-20 11:24:19 -08:00
012bc4d1d4 runconfig: split resources into a struct
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1a0b483e02aff72c16871fb2f74644e091bda93c
Component: engine
2015-11-20 19:40:01 +01:00
9380772bfb Re-implement --before and --since as options for --filter
* This commit will mark --before and --since as deprecated, but leave their behavior
  unchanged until they are removed, then re-implement them as options for --filter.

* And update the related docs.

* Update the integration tests.

Fixes issue #17716

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 1921c629381d25ebff7b8b8c8348a0a81525f264
Component: engine
2015-11-20 13:10:13 +08:00
4581692a0e Addition of "--shm-size" to which size of /dev/shm is changed.
- Optional "--shm-size=" was added to the sub-command(run, create,and build).
- The size of /dev/shm in the container can be changed
  when container is made.
- Being able to specify is a numerical value that applies number,
  b, k, m, and g.
- The default value is 64MB, when this option is not set.
- It deals with both native and lxc drivers.

Signed-off-by: NIWA Hideyuki <niwa.hiedyuki@jp.fujitsu.com>
Upstream-commit: 5aeaf2a0c4236711e0981515d8627b30e22a1637
Component: engine
2015-11-20 09:24:18 +09:00
3221274c6e Merge pull request #18084 from wenchma/18054_exec_start_fix
Update docs and test of exec create api return codes
Upstream-commit: 8e6e38990cb09eca2575263240d45a2a55db292e
Component: engine
2015-11-19 13:51:46 -08:00
27b2c588e8 Merge pull request #18076 from rhvgoyal/unmount-recursive
Unmount recursively to unmount volumes
Upstream-commit: 24fb3659dfe1b4f4dfa4592699fb53d0868a95fe
Component: engine
2015-11-19 13:46:48 -08:00
fd8d0f506e Merge pull request #17908 from calavera/carry_17059
[Carry 17059] allow filtering containers by any status
Upstream-commit: 37f64ded44249fb174ba1797d6f6183575375300
Component: engine
2015-11-19 13:24:43 -08:00
712fdcff89 Use lazy unmount to unmount volumes
Volumes can have more mount points beneath them and unmount will fail. This
is the case when a bind mounted directory on host already had a mount point
underneath it. So use lazy unmount instead.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: b9e701b203ff49966aac00e058feb5d46bbb97f0
Component: engine
2015-11-19 20:46:07 +00:00
1d7fc30a8e allow filtering containers by any status
Signed-off-by: Kamil Domański <kamil@domanski.co>
(cherry picked from commit 9ada6a06c57ce4ed4bfad50f603962b7b9ce6fb1)
Upstream-commit: f30364c5835452598e58781f360681f2d77fa16c
Component: engine
2015-11-19 14:11:41 -05:00
9f741a440b Windows: [TP4] docker info crashes
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 37d2a7003864f8bdb5d8f6e3d9dcb4367fc94a6a
Component: engine
2015-11-19 11:02:25 -08:00
7d68517eab Update docs and test of exec create api return codes
Fixes issue #18054

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 01b86d612cba22602509b436aad36d41135f14ce
Component: engine
2015-11-19 22:22:27 +08:00
12f51add56 Merge pull request #17704 from LK4D4/default_cgroupfs
Use fs cgroups by default
Upstream-commit: c32f8bb36a5f1b2fe0586a1e080c14d8a6b68610
Component: engine
2015-11-19 14:01:13 +01:00
92c9b9e9d4 Use fs cgroups by default
Our implementation of systemd cgroups is mixture of systemd api and
plain filesystem api. It's hard to keep it up to date with systemd and
it already contains some nasty bugs with new versions. Ideally it should
be replaced with some daemon flag which will allow to set parent systemd
slice.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 419fd7449fe1a984f582731fcd4d9455000846b0
Component: engine
2015-11-18 16:16:13 -08:00
1ec73033b7 Merge pull request #18065 from calavera/one_container_constructor_to_rule_them_all
Remove the container initializers per platform.
Upstream-commit: 877fe61f7538a36c5fe312221356f13b83abbf64
Component: engine
2015-11-18 14:06:47 -08:00
b104ad8df6 Remove the container initializers per platform.
By removing deprecated volume structures, now that windows mount volumes we don't need a initializer per platform.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 060f4ae6179b10aeafa883670826159fdae8204a
Component: engine
2015-11-18 08:41:46 -05:00