Commit graph

33984 commits

Author SHA1 Message Date
Victor Vieux
11e07e7da6
Merge pull request #35527 from thaJeztah/feature-detect-overlay2
Detect overlay2 support on pre-4.0 kernels
2017-11-29 13:51:26 -08:00
Yong Tang
c8441b186e
Merge pull request #35606 from cbirajdar/master
added more awesome and notable women to names-generator.go
2017-11-28 21:37:17 -08:00
Yong Tang
99e4eb103d
Merge pull request #35619 from Microsoft/jjh/testrunservicingcontainer
Disable TestRunServicingContainer on RS4+ builds
2017-11-28 21:34:15 -08:00
Yong Tang
235c105736
Merge pull request #35620 from fcrisciani/libnetwork-vendoring
Libnetwork vendoring
2017-11-28 21:11:14 -08:00
Yong Tang
29708da907
Merge pull request #35631 from Microsoft/jjh/heightwidth
Windows: Fix width/height swap
2017-11-28 21:02:46 -08:00
Akihiro Suda
09eb7bcc36
Merge pull request #34948 from euank/public-mounts
Fix EBUSY errors under overlayfs and v4.13+ kernels
2017-11-29 12:48:39 +09:00
Akihiro Suda
debc1fbee8
Merge pull request #35622 from asottile/update_integration_cli_docs
Change references from test-integration-cli to test-integration
2017-11-29 12:47:52 +09:00
Sebastiaan van Stijn
9243c28ba5
Merge pull request #35586 from ndeloof/patch-1
`memory` is an int64 (long)
2017-11-28 16:32:04 -08:00
Anusha Ragunathan
f943df7d48
Merge pull request #35632 from anusha-ragunathan/fix-panic
Fix potential panic during plugin set.
2017-11-28 15:50:12 -08:00
Sebastiaan van Stijn
955c1f881a
Detect overlay2 support on pre-4.0 kernels
The overlay2 storage-driver requires multiple lower dir
support for overlayFs. Support for this feature was added
in kernel 4.x, but some distros (RHEL 7.4, CentOS 7.4) ship with
an older kernel with this feature backported.

This patch adds feature-detection for multiple lower dirs,
and will perform this feature-detection on pre-4.x kernels
with overlayFS support.

With this patch applied, daemons running on a kernel
with multiple lower dir support will now select "overlay2"
as storage-driver, instead of falling back to "overlay".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-28 13:55:33 -08:00
Anusha Ragunathan
6572e27df7 Fix potential panic during plugin set.
Plugin config can have Mounts without a 'Source' field. In such cases,
performing a 'plugin set' on the mount source will panic the daemon. Its
the same case for device paths as well. This detects the case and
returns error.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2017-11-28 13:06:24 -08:00
John Howard
f11f351ae7 Windows: Fix width/height swap
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-11-28 12:19:46 -08:00
John Howard
1293303bda Disable TestRunServicingContainer on RS4+ builds
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-11-28 10:29:43 -08:00
Vincent Demeester
c307e0ce49
Merge pull request #35572 from arm64b/big-image-imp-test-aarch64
image: skip the import test on AArch64
2017-11-28 13:51:15 +01:00
Anthony Sottile
b6eed3dca2 Change references from test-integration-cli to test-integration
Signed-off-by: Anthony Sottile <asottile@umich.edu>
2017-11-27 19:01:14 -08:00
Dennis Chen
6395b8b3dc image: skip the import test on AArch64
The commit '0a13f827a10d3bf61744d9b3f7165c5885a39c5d' introduces an
import test for CVE-2017-14992, it uses a 8GB image to make sure we
don't revert CVE-2017-14992, but unfortunately this test can't finish
in 5-min on AArch64, as a fact, in most cases we have to crate a very
big image to make the test effective on AArch64, but this will result
in a test panic, so now we skip it order to avoid termination of others
tests followed.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-11-28 01:48:49 +00:00
Victor Vieux
9ae697167c
Merge pull request #35528 from thaJeztah/ignore-empty-graphdirs
Skip empty directories on prior graphdriver detection
2017-11-27 17:37:39 -08:00
Flavio Crisciani
2e5d5c1d32
Libnetwork vendoring
- removed support for Solaris
- networkdb fixed race on node management

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-11-27 14:57:45 -08:00
Victor Vieux
c75c45b188
Merge pull request #35612 from ikarpovich/35610-le-line-only
Logentries driver line-only=true []byte output fix
2017-11-27 14:33:02 -08:00
Victor Vieux
c672fbd69c
Merge pull request #33892 from thaJeztah/bump-golang-19
Bump Go to 1.9.2
2017-11-27 11:44:06 -08:00
Tõnis Tiigi
9fe48f081d
Merge pull request #35579 from dnephin/fix-layer-dne
Fix layer DNE with duplicate layers
2017-11-27 09:40:54 -08:00
Igor Karpovich
440e50b6c7 This fixes casting of log message []byte into string with --log-opt line-only=true
Signed-off-by: Igor Karpovich <igor@karpovich.me>
2017-11-27 14:26:53 +00:00
Chetan Birajdar
7c50d39480 added more awesome and notable women to names-generator.go
Signed-off-by: Chetan Birajdar <birajdar.chetan@gmail.com>
2017-11-26 21:40:02 -08:00
Yong Tang
dfe2c023a3
Merge pull request #33731 from runcom/rt-fix-update
container: update real-time resources
2017-11-23 18:30:22 -08:00
Yong Tang
1f3f111b45
Merge pull request #35563 from soccerGB/driveroptionpersist
Added support for persisting Windows network driver specific options …
2017-11-23 16:31:46 -08:00
Daniel Nephin
936ef0c4c9 Fix layer DNE with duplicate layers.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-11-23 15:41:59 -05:00
Nicolas De loof
5ad85b1d4d
memory is an int64 (long)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2017-11-23 14:24:43 +01:00
Yong Tang
fe8aac6f5a
Merge pull request #35576 from tophj-ibm/add-main-to-image-tests
[integration] add main_test for image test
2017-11-22 14:42:56 -08:00
Euan Kemp
af0d589623 graphdriver/overlay{,2}: remove 'merged' on umount
This removes and recreates the merged dir with each umount/mount
respectively.
This is done to make the impact of leaking mountpoints have less
user-visible impact.

It's fairly easy to accidentally leak mountpoints (even if moby doesn't,
other tools on linux like 'unshare' are quite able to incidentally do
so).

As of recently, overlayfs reacts to these mounts being leaked (see

One trick to force an unmount is to remove the mounted directory and
recreate it. Devicemapper now does this, overlay can follow suit.

Signed-off-by: Euan Kemp <euan.kemp@coreos.com>
2017-11-22 14:32:30 -08:00
Euan Kemp
1e214c0952 graphdriver/overlay: minor doc comment cleanup
Signed-off-by: Euan Kemp <euan.kemp@coreos.com>
2017-11-22 14:17:08 -08:00
Antonio Murdaca
dca82b9e5c
container: update real-time resources
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-22 22:21:40 +01:00
Christopher Jones
be83f42612
[integration] add main_test for image test
Adds a main_test for the image integration test, so we can download
frozen images, and clean up after the image test is ran

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-11-22 11:13:32 -05:00
Sebastiaan van Stijn
d032264e13
Merge pull request #35467 from kolyshkin/dup-mnt
Fix "duplicate mount point" when --tmpfs /dev/shm is used
2017-11-22 12:13:06 +01:00
Akihiro Suda
84b1f813a4
Merge pull request #35541 from thaJeztah/remove-deprecated-mkdirallas
Remove uses of deprecated MkdirAllAs(), MkdirAs()
2017-11-22 17:49:37 +09:00
Cheng-mean Liu
cef1578ac4 Added support for persisting Windows network driver specific options over reboot or service restart
Signed-off-by: Cheng-mean Liu <soccerl@microsoft.com>
2017-11-21 14:11:12 -08:00
Sebastiaan van Stijn
ce452fb72f
Merge pull request #35559 from thaJeztah/remove-testutil
Remove unused "testutil" package
2017-11-21 21:00:04 +01:00
Sebastiaan van Stijn
d6e1cc32d3
Bump Go to 1.9.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 20:57:02 +01:00
Sebastiaan van Stijn
fb89afb689
Merge pull request #35554 from darrenstahlmsft/RevendorHcsshim
Update hcsshim to v0.6.7 for go1.9 support
2017-11-21 20:55:40 +01:00
Sebastiaan van Stijn
1262c57714
Skip empty directories on prior graphdriver detection
When starting the daemon, the `/var/lib/docker` directory
is scanned for existing directories, so that the previously
selected graphdriver will automatically be used.

In some situations, empty directories are present (those
directories can be created during feature detection of
graph-drivers), in which case the daemon refuses to start.

This patch improves detection, and skips empty directories,
so that leftover directories don't cause the daemon to
fail.

Before this change:

    $ mkdir /var/lib/docker /var/lib/docker/aufs /var/lib/docker/overlay2
    $ dockerd
    ...
    Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, aufs; Please cleanup or explicitly choose storage driver (-s <DRIVER>)

With this patch applied:

    $ mkdir /var/lib/docker /var/lib/docker/aufs /var/lib/docker/overlay2
    $ dockerd
    ...
    INFO[2017-11-16T17:26:43.207739140Z] Docker daemon                                 commit=ab90bc296 graphdriver(s)=overlay2 version=dev
    INFO[2017-11-16T17:26:43.208033095Z] Daemon has completed initialization

And on restart (prior graphdriver is still picked up):

    $ dockerd
    ...
    INFO[2017-11-16T17:27:52.260361465Z] [graphdriver] using prior storage driver: overlay2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 15:42:04 +01:00
Sebastiaan van Stijn
47af9f625d
Remove unused "testutil" package
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 15:09:23 +01:00
Sebastiaan van Stijn
38b3af567f
Remove deprecated MkdirAllAs(), MkdirAs()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 13:53:54 +01:00
Sebastiaan van Stijn
ce66470f54
Minor refactor in idtools
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 13:49:58 +01:00
Sebastiaan van Stijn
9aba019b72
Update idtools tests to test non-deprecated functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-21 13:47:17 +01:00
Vincent Demeester
dc7ba2ca3b
Merge pull request #35547 from thaJeztah/fix-make-test
Fix "make test" failing on missing "test-unit"
2017-11-21 10:49:38 +01:00
Kir Kolyshkin
1861abdc4a Fix "duplicate mount point" when --tmpfs /dev/shm is used
This is a fix to the following issue:

$ docker run --tmpfs /dev/shm busybox sh
docker: Error response from daemon: linux mounts: Duplicate mount point '/dev/shm'.

In current code (daemon.createSpec()), tmpfs mount from --tmpfs is added
to list of mounts (`ms`), when the mount from IpcMounts() is added.
While IpcMounts() is checking for existing mounts first, it does that
by using container.HasMountFor() function which only checks container.Mounts
but not container.Tmpfs.

Ultimately, the solution is to get rid of container.Tmpfs (moving its
data to container.Mounts). Current workaround is to add checking
of container.Tmpfs into container.HasMountFor().

A unit test case is included.

Unfortunately we can't call daemon.createSpec() from a unit test,
as the code relies a lot on various daemon structures to be initialized
properly, and it is hard to achieve. Therefore, we minimally mimick
the code flow of daemon.createSpec() -- barely enough to reproduce
the issue.

https://github.com/moby/moby/issues/35455

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-20 18:48:27 -08:00
Kir Kolyshkin
eab3ac3e70 container.NetworkMounts(): don't lookup mounts twice
The code in question looks up mounts two times: first by using
HasMountFor(), and then directly by looking in container.MountPoints.
There is no need to do it twice.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-20 18:48:27 -08:00
Darren Stahl
0bee8049c7 Update hcsshim to v0.6.7 for go1.9 support
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-11-20 16:29:01 -08:00
Sebastiaan van Stijn
9de84a78d7
Merge pull request #35517 from stevvooe/protect-the-health-status
container: protect the health status with mutex
2017-11-20 21:51:47 +01:00
John Stephens
a9aeb18a09
Merge pull request #35495 from simonferquel/isolation-validation
Added validation of isolation settings on daemon.verifyContainerSettings
2017-11-20 12:09:40 -08:00
Sebastiaan van Stijn
a17071e88f
Fix "make test" failing on missing "test-unit"
Commit dbf580be57 removed
this helper script because it's no longer used in CI.

However, the "make test" target in the Makefile still
called this helper, resulting it to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-20 19:12:25 +01:00