1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

33965 commits

Author SHA1 Message Date
Vincent Demeester
c307e0ce49
Merge pull request from arm64b/big-image-imp-test-aarch64
image: skip the import test on AArch64
2017-11-28 13:51:15 +01: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 from thaJeztah/ignore-empty-graphdirs
Skip empty directories on prior graphdriver detection
2017-11-27 17:37:39 -08:00
Victor Vieux
c75c45b188
Merge pull request 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 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 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
Yong Tang
dfe2c023a3
Merge pull request from runcom/rt-fix-update
container: update real-time resources
2017-11-23 18:30:22 -08:00
Yong Tang
1f3f111b45
Merge pull request 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
Yong Tang
fe8aac6f5a
Merge pull request from tophj-ibm/add-main-to-image-tests
[integration] add main_test for image test
2017-11-22 14:42:56 -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 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 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 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 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 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 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 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
Sebastiaan van Stijn
4f4a027908
Merge pull request from masaeedu/patch-1
Fix consumes MIME type for NetworkConnect
2017-11-20 18:13:26 +01:00
Simon Ferquel
e6bfe9cdcb Added validation of isolation settings on daemon.verifyContainerSettings
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-11-20 10:34:20 +01:00
Asad Saeeduddin
876b328617 Fix consumes MIME type for NetworkConnect
This route expects `application/json`. Sending a content type header of `application/octet-stream` results in an error.

Signed-off-by: Asad Saeeduddin <masaeedu@gmail.com>
2017-11-18 22:34:23 -05:00
Victor Vieux
edc204b1ff
Merge pull request from kolyshkin/gd-custom
graphdriver: custom build-time priority list
2017-11-17 15:48:26 -08:00
Phil Estes
8124d21d2a
Merge pull request from brauner/2017-11-16/docker_xfs_quota_userns
skip xfs quota tests when running in user namespace
2017-11-17 13:41:58 -05:00
Christian Brauner
7e35df0e04
Skip further checks for quota in user namespaces
Commit 7a1618ced3 regresses running Docker
in user namespaces. The new check for whether quota are supported calls
NewControl() which in turn calls makeBackingFsDev() which tries to
mknod(). Skip quota tests when we detect that we are running in a user
namespace and return ErrQuotaNotSupported to the caller. This just
restores the status quo.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2017-11-17 12:57:27 +01:00
Kir Kolyshkin
17708e72a7 graphdriver: custom build-time priority list
Add a way to specify a custom graphdriver priority list
during build. This can be done with something like

  go build -ldflags "-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper"

As ldflags are already used by the engine build process, and it seems
that only one (last) `-ldflags` argument is taken into account by go,
an envoronment variable `DOCKER_LDFLAGS` is introduced in order to
be able to append some text to `-ldflags`. With this in place,
using the feature becomes

  make DOCKER_LDFLAGS="-X github.com/docker/docker/daemon/graphdriver.priority=overlay2,devicemapper" dynbinary

The idea behind this is, the priority list might be different
for different distros, so vendors are now able to change it
without patching the source code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-16 19:43:34 -08:00
Stephen J Day
7db30ab0cd
container: protect the health status with mutex
Adds a mutex to protect the status, as well. When running the race
detector with the unit test, we can see that the Status field is written
without holding this lock. Adding a mutex to read and set status
addresses the issue.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-16 15:04:01 -08:00
Vincent Demeester
ab90bc2961
Merge pull request from cpuguy83/replace_plugun_integration_with_unit
Replace vol plugin integration test w/ unit test
2017-11-16 17:35:23 +01:00
Brian Goff
00d801dd85 Replace vol plugin integration test w/ unit test
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-15 13:13:22 -05:00
Sebastiaan van Stijn
7c53e73253
Merge pull request from dnephin/build-fails-on-long-label
Fix dockerfile parser failing silently on long tokens
2017-11-15 18:48:50 +01:00
Yong Tang
a5c679baf6
Merge pull request from thaJeztah/bump-docker-py
Bump docker-py to 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a
2017-11-15 07:31:14 -08:00
Brian Goff
fa1054843f
Merge pull request from kolyshkin/sep-o2
daemon/graphdriver/register: separate overlay2
2017-11-15 09:21:08 -05:00
Sebastiaan van Stijn
7c16e4d417
Merge pull request from cpuguy83/erroneous_errors
Cancelation errors should not be logged
2017-11-15 11:34:28 +01:00
Kir Kolyshkin
d014be5426 daemon/graphdriver/register: separate overlay2
Make it possible to disable overlay and overlay2 separately.

With this commit, we now have `exclude_graphdriver_overlay` and
`exclude_graphdriver_overlay2` build tags for the engine, which
is in line with any other graph driver.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-15 00:06:00 -08:00
Brian Goff
b86746d60d Cancelation errors should not be logged
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-11-14 20:32:20 -05:00
Victor Vieux
f62aeae977
Merge pull request from cpuguy83/store_labels_when_exists
Create labels when volume exists only remotely
2017-11-14 17:05:40 -08:00
Yong Tang
e4d0fe84f9
Merge pull request from stevvooe/protect-health-monitor-channel
container: protect health monitor channel
2017-11-14 11:25:14 -08:00
Justin Cormack
0defc69813
Merge pull request from sargun/add-vfs-quota-support
Add vfs quota support
2017-11-14 15:05:02 +00:00