Commit graph

23836 commits

Author SHA1 Message Date
Alexander Morozov
d2851cc7e3 Merge pull request #22050 from tophj-ibm/increase-timeout-stdin-close-test
Fix flaky test TestRunExitOnStdinClose
2016-04-15 10:46:31 -07:00
David Calavera
a196861517 Merge pull request #22009 from rhvgoyal/docker-cp-fix
Mount volumes rprivate for archival and other use cases
2016-04-15 10:11:33 -07:00
Vincent Demeester
e40e5b97c1 Merge pull request #21006 from cpuguy83/volume_inspect_meta
Allow volume drivers to provide a `Status` field
2016-04-15 18:53:39 +02:00
Tibor Vass
c60c3045dd Merge pull request #21633 from tkopczynski/20784-builder-tarsum-tests
Builder/tarsum unit tests
2016-04-15 12:53:07 -04:00
Tõnis Tiigi
1a14bbc61e Merge pull request #21726 from aaronlehmann/tarsum-filename-normalization
Fix build cache false positives when build context tar contains unnormalized paths
2016-04-15 09:45:26 -07:00
Vincent Demeester
e9c231aea4 Merge pull request #22060 from hqhq/hq_remove_tmp_code
Remove template code for runc and containerd
2016-04-15 18:10:39 +02:00
Brian Goff
36a1c56cf5 Allow volume drivers to provide a Status field
The `Status` field is a `map[string]interface{}` which allows the driver to pass
back low-level details about the underlying volume.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-15 10:56:38 -04:00
Vivek Goyal
cacd400777 Mount volumes rprivate for archival and other use cases
People have reported following problem.

- docker run -ti --name=foo -v /dev/:/dev/ fedora bash
- docker cp foo:/bin/bash /tmp

Once the cp operation is complete, it unmounted /dev/pts on the host. /dev/pts
is a submount of /dev/. This is completely unexpected. Following is the
reson for this behavior.

containerArchivePath() call mountVolumes() which goes through all the mounts
points of a container and mounts them in daemon mount namespace in
/var/lib/docker/devicemapper/mnt/<containerid>/rootfs dir. And once we have
extracted the data required, these are unmounted using UnmountVolumes().

Mounts are done using recursive bind (rbind). And these are unmounted using
lazy mount option on top level mount. (detachMounted()). That means if there
are submounts under top level mounts, these mount events will propagate and
they were "shared" mounts with host, it will unmount the submount on host
as well.

For example, try following.

- Prepare a parent and child mount point.
  $ mkdir /root/foo
  $ mount --bind /root/foo /root/foo 
  $ mount --make-rshared /root/foo
  
- Prepare a child mount 

  $ mkdir /root/foo/foo1
  $ mount --bind /root/foo/foo1 /root/foo/foo1
 
- Bind mount foo at bar

  $ mkdir /root/bar
  $ mount --rbind /root/foo /root/bar
  
- Now lazy unmount /root/bar and it will unmount /root/foo/foo1 as well.

  $ umount -l /root/bar

This is not unintended. We just wanted to unmount /root/bar and anything
underneath but did not have intentions of unmounting anything on source.

So far this was not a problem as docker daemon was running in a seprate
mount namespace where all propagation was "slave". That means any unmounts
in docker daemon namespace did not propagate to host namespace. 

But now we are running docker daemon in host namespace so that it is possible
to mount some volumes "shared" with container. So that if container mounts
something it propagates to host namespace as well. 

Given mountVolumes() seems to be doing only temporary mounts to read some
data, there does not seem to be a need to mount these shared/slave. Just
mount these private so that on unmount, nothing propagates and does not
have unintended consequences. 

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2016-04-15 14:03:11 +00:00
Christopher Jones
f84cabd3b8 Fix flaky test TestRunExitOnStdinClose
This test was flaky on ppc64le, where the average time to close was
around 1 second. This bumps that timeout to 60 seconds which should be
plently.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2016-04-15 09:33:51 -04:00
Vincent Demeester
1d9a6833d3 Merge pull request #22063 from graingert/patch-1
Fix security documentation, XSS -> CSRF
2016-04-15 14:43:18 +02:00
Sebastiaan van Stijn
51b23d8842
Produce fatal error when running on kernel < 3.10.0
Running on kernel versions older than 3.10 has not been
supported for a while (as it's known to be unstable).

With the containerd integration, this has become more
apparent, because kernels < 3.4 don't support PR_SET_CHILD_SUBREAPER,
which is required for containerd-shim to run.

Change the previous "warning" to a "fatal" error, so
that we refuse to start.

There's still an escape-hatch for users by setting
"DOCKER_NOWARN_KERNEL_VERSION=1" so that they can
run "at their own risk".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-15 14:33:56 +02:00
Sebastiaan van Stijn
1d02ad2a51
Remove deprecation warning
Auto-creation of non-existing host directories
is no longer deprecated (9d5c26bed2),
so this warning is no longer relevant.

This removes the deprecation warning.

Also removes the "system" package here, because it's only used
on non-Windows, so basically just called os.MkdirAll()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-15 13:57:19 +02:00
Vincent Demeester
b9c94b70bf
Update client code with api changes
Using new methods from engine-api, that make it clearer which element is
required when consuming the API.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-04-15 12:48:01 +02:00
Thomas Grainger
ea8f9c9723
Fix security documentation, XSS -> CSRF
Signed-off-by: Thomas Grainger <tagrain@gmail.com>
2016-04-15 11:29:37 +01:00
Vincent Demeester
9802d7d10f Vendor engine-api with required arguments
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-04-15 10:11:05 +02:00
Vincent Demeester
172ca1ca8c Merge pull request #20924 from Microsoft/10662-CPUResourceControls
Add CPU count and maximum resource controls for Windows
2016-04-15 08:14:59 +02:00
Zhang Wei
5548966c37 Remove start/die event when fail to start container
If contaner start fail of (say) "command not found", the container
actually didn't start at all, we shouldn't log start and die event for
it, because that doesnt actually happen.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-15 13:02:34 +08:00
Qiang Huang
e67c758ec3 Remove template code for runc and containerd
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-15 12:45:35 +08:00
Lei Jitang
494297baf8 Don't throw "restartmanager canceled" error for no restart policy container
Don't throw "restartmanager canceled" error for no restart policy container
and add the container id to the warning message if a container has restart policy
and has been canceled.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-14 21:40:20 -04:00
Aaron Lehmann
8691a77e44 Fix build cache false positives when build context tar contains unnormalized paths
If a build context tar has path names of the form 'x/./y', they will be
stored in this unnormalized form internally by tarsum. When the builder
walks the untarred directory tree and queries hashes for each relative
path, it will query paths of the form 'x/y', and they will not be found.

To correct this, have tarsum normalize path names by calling Clean.

Add a test to detect this caching false positive.

Fixes #21715

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-04-14 17:57:45 -07:00
Vincent Demeester
bc0c8828e9 Merge pull request #21172 from yongtang/20909-seccomp-in-docker-info
Show "seccomp" in docker info (#20909).
2016-04-15 01:24:54 +02:00
David Calavera
55053d3537
Get events until a time in the past.
This change allow to filter events that happened in the past
without waiting for future events. Example:

docker events --since -1h --until -30m

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-04-14 16:22:16 -07:00
Darren Stahl
ea8c690886 Add CPU count and maximum resource controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-04-14 15:40:25 -07:00
Vincent Demeester
8011228b53 Merge pull request #21634 from cpuguy83/add_beter_logging_for_TestDaemonNoSpaceleftOnDeviceError
More logs for `TestDaemonNoSpaceleftOnDeviceError`
2016-04-14 22:06:49 +02:00
Sebastiaan van Stijn
1a87a21053 Merge pull request #21861 from jfrazelle/apparmor-examples-for-the-apparmor-gods
Add example to apparmor docs
2016-04-14 21:48:02 +02:00
Tibor Vass
18c3869831 Merge pull request #22040 from thaJeztah/bump-version-to-v1.12.0-dev
Bump version to v1.12.0-dev
2016-04-14 15:29:07 -04:00
David Calavera
9e4b5e06f0 Merge pull request #22022 from AkihiroSuda/fixunused
Clean up unused code
2016-04-14 12:21:47 -07:00
Jess Frazelle
80d63e2e11
Add example to apparmor docs
Signed-off-by: Jess Frazelle <jess@mesosphere.com>
2016-04-14 10:59:47 -07:00
David Calavera
6472a6d9e5 Merge pull request #22047 from ncopa/fix-build-from-tarball
Fix detection of git commit during build from tarball
2016-04-14 10:42:45 -07:00
Brian Goff
51be6c4f18 Merge pull request #22038 from thaJeztah/cherry-pick-changelog
Update changelog in master
2016-04-14 12:04:40 -04:00
Vincent Demeester
d4b5abaf62 Merge pull request #22044 from thaJeztah/move-filter-options-to-right-api-version
Move volume filters to API 1.24 docs
2016-04-14 17:52:08 +02:00
Natanael Copa
355ad33087 Fix detection of git commit during build from tarball
Distro packagers will often use the tarball to build a package and have
the build script for the package in git. To avoid that the docker build
script picks up the git commit from the distro repo we also check for a
directory named .git before check for -unsupported builds.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-04-14 17:30:18 +02:00
Sebastiaan van Stijn
8ef76f779d
Move volume filters to API 1.24 docs
This feature was added after the 1.11 code-freeze,
so will be part of the 1.12 release. Moving it to the
right API version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 17:12:28 +02:00
Vincent Demeester
900f06ae3a Merge pull request #22039 from senk/remove-cfengine-docs
Remove docs for cfengine
2016-04-14 16:00:09 +02:00
Sebastiaan van Stijn
7429a740cd
Bump version to v1.12.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:22:18 +02:00
Robin Naundorf
297d6c04a3 closes #11703 closes #11560
Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
2016-04-14 15:21:07 +02:00
Tibor Vass
6cc2bad7f4
Fix some CHANGELOG entries
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 2535db8678)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:15:23 +02:00
Santhosh Manohar
17bce424d6
Update Networking changelog for 1.11
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
(cherry picked from commit 2153d9ec9d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:15:09 +02:00
Sebastiaan van Stijn
d53e136a2b
Minor fixes to changelog
Some fixes in the changelog were not regressions
since 1.10.x, but only present in 1.11 release candidates
so don't need to be mentioned for the release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 99589731ac)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:53 +02:00
Kenfe-Mickael Laventure
bcb7649c3c
Update CHANGELOG.md
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c774c390b1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:40 +02:00
Sebastiaan van Stijn
b7f9856a36
Update CHANGELOG.md
hardware signing was put back to experimental due to packaging issues
(https://github.com/docker/docker/pull/21499)

add missing "--quiet" option for docker load

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 32a5308237)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:23 +02:00
John Howard
932e586314
Verify binaries in changelog
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 76489af40f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:05 +02:00
Kenfe-Mickael Laventure
9f3f96220d
Add initial changelog for 1.11.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit e651c1b2b9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:13:47 +02:00
Thomas Leonard
1aa9369499 Build: pass through DOCKER_GITCOMMIT
This is useful if you want to build Docker when the .git directory is
not present.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
2016-04-14 12:16:16 +01:00
Akihiro Suda
d231260868 Clean up unused code
Signed-off-by: Akihiro Suda <suda.kyoto@gmail.com>
2016-04-14 07:04:10 +00:00
Alexander Morozov
cb87b6eb6a Merge pull request #21879 from WeiZhang555/fix-kill-nonexist
Fix bug that can't kill an restarting container
2016-04-13 22:50:19 -07:00
Alexander Morozov
7cd420d63a Merge pull request #21970 from cpuguy83/use_cached_path_on_ls
Fix N+1 calling `Path()` on `volume ls`
2016-04-13 22:47:53 -07:00
Alexander Morozov
37f5caf8c5 Merge pull request #22013 from tonistiigi/fix-go16-panic
Fix panic on winsize syscall
2016-04-13 22:11:13 -07:00
Tonis Tiigi
4d4ef98326 Fix panic on winsize syscall
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-13 17:08:00 -07:00
Brian Goff
ff08036cc0 Do not remove containers from stats list on err
Before this patch, containers are silently removed from the stats list
on error. This patch instead will display `--` for all fields for the
container that had the error, allowing it to recover from errors.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-04-13 16:36:34 -04:00