Commit Graph

32767 Commits

Author SHA1 Message Date
e11a0c3a06 Merge pull request #36519 from stevvooe/resilient-cpu-sampling
daemon/stats: more resilient cpu sampling
Upstream-commit: 623b1a5c3c7d6b4d6d5943b64bd9ae6a7813786e
Component: engine
2018-03-09 14:34:45 -08:00
0d25ace2cb Merge pull request #36539 from tophj-ibm/skip-oom-tests-ppc64le
[integration] skip ppc64le oom tests temporarily
Upstream-commit: c8f9e14b500b1b2e23e79c52ded0aee05579d9bc
Component: engine
2018-03-09 09:53:00 +01:00
e31b1923c7 Merge pull request #36506 from kolyshkin/pkg-mount-slice
pkg/mount: use sort.Slice
Upstream-commit: a21d5bf669571ffc7ad31b8df3c0a632dc207b78
Component: engine
2018-03-09 09:46:53 +01:00
671826c75d [integration] skip ppc64le oom tests for now
These tests were enabled by changing a config option on the ci
machines, instead of from a patch, so let me disable them
for now on ppc64le and open up another patch to enable them, where I can find
out what the issues are with them.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 620ddc78a1437feaa42f40853ef586d268991620
Component: engine
2018-03-08 17:51:37 -06:00
d56f856549 Merge pull request #36518 from seemethere/fix_static_builds
Build containerd, runc, and proxy statically
Upstream-commit: 0c01629e17752749b32422e327d47764ce23baac
Component: engine
2018-03-08 13:59:34 +01:00
7856345e7b Merge pull request #36505 from kolyshkin/pkg-mount-tests
pkg/mount unit tests: skip some test under non-root
Upstream-commit: 4a1d35c546c4a5df3353f5984d86671f702a315a
Component: engine
2018-03-08 17:27:31 +09:00
3398cf7be9 buildmod => buildmode
There was a typo with the buildmode flag for containerd

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5e4885b9afb1de30133627ce751af2c0e7b72a4e
Component: engine
2018-03-07 21:36:23 +00:00
b6d64a77d2 Build containerd, runc, and proxy statically
These were originally static binaries in the first place, this changes
them back to that.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 63c7bb24637fdbfd905096ecc75b435ecefd31e9
Component: engine
2018-03-07 21:29:10 +00:00
aa0ca25049 daemon/stats: more resilient cpu sampling
To avoid noise in sampling CPU usage metrics, we now sample the system
usage closer to the actual response from the underlying runtime. Because
the response from the runtime may be delayed, this makes the sampling
more resilient in loaded conditions. In addition to this, we also
replace the tick with a sleep to avoid situations where ticks can backup
under loaded conditions.

The trade off here is slightly more load reading the system CPU usage
for each container. There may be an optimization required for large
amounts of containers but the cost is on the order of 15 ms per 1000
containers. If this becomes a problem, we can time slot the sampling,
but the complexity may not be worth it unless we can test further.

Unfortunately, there aren't really any good tests for this condition.
Triggering this behavior is highly system dependent. As a matter of
course, we should qualify the fix with the users that are affected.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: fd0e24b7189374e0fe7c55b6d26ee916d3ee1655
Component: engine
2018-03-07 13:20:21 -08:00
1158d96fc9 Merge pull request #36307 from kolyshkin/dm-misc
devmapper cleanup improvements
Upstream-commit: bc7424b4434443b036604277bfcdee3fa34a268a
Component: engine
2018-03-07 12:57:21 -08:00
2c2dcf7989 Merge pull request #36451 from Microsoft/jjh/ubr
Windows: Report Version and UBR
Upstream-commit: 8cf8fe9cf80a07d4e68829f619ea2c71fbb5af0c
Component: engine
2018-03-07 06:27:01 -08:00
9e6eb16d6f Merge pull request #36502 from thaJeztah/remove-duplicate-test
Remove duplicate TestServiceUpdatePort
Upstream-commit: f3a3778808dae0da82f2acf300875b5da931c000
Component: engine
2018-03-06 15:18:30 -08:00
c617524866 pkg/mount: use sort.Slice
Sorting by mount point length can be implemented in a more
straightforward fashion since Go 1.8 introduced sort.Slice()
with an ability to provide a less() function in place.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a00310b54c0cdcafb402aeea92feca865da9fdf3
Component: engine
2018-03-06 12:46:58 -08:00
db90a864e8 pkg/mount unit tests: skip some test under non-root
This makes `go test .` to pass if run as non-root user, skipping
those tests that require superuser privileges (for `mount`).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 4aae77602a7540b4f977572f3fbdc0891ac57cab
Component: engine
2018-03-06 12:37:27 -08:00
18ad0fab61 Merge pull request #36494 from stevvooe/remove-unnecessary-types-file
daemon/stats: remove obnoxious types file
Upstream-commit: 4db41f1a69fc38337baaee9edb763a3672fa047c
Component: engine
2018-03-06 11:52:56 -08:00
f51e800a06 Remove duplicate TestServiceUpdatePort
The TestAPIServiceUpdatePort test performs exactly
the same steps.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 36e1646e4f010ea033643c6df3d9c3dccc166ed2
Component: engine
2018-03-06 16:17:13 +01:00
0aaffbe844 Merge pull request #36417 from NobodyOnSE/patch-2
Whitelist statx syscall
Upstream-commit: f0694e968fe600efdf24ab0d3a1b0e887267aea2
Component: engine
2018-03-06 14:33:56 +01:00
062463b48b Merge pull request #36316 from selansen/36247
Fix to address regression caused by PR 30897
Upstream-commit: 0b0af855ae28698f8e3dc97cdc2a46e714ce6b6a
Component: engine
2018-03-06 13:40:29 +01:00
46b936e807 Merge pull request #36493 from cpuguy83/add_plugin_timeout_test
Adds a unit test for plugin request timeout
Upstream-commit: 390b74cb6376e70f9376b96a8a82557124e67a9b
Component: engine
2018-03-06 12:45:17 +01:00
c527ffbfcc Whitelist statx syscall for libseccomp-2.3.3 onward
Older seccomp versions will ignore this.

Signed-off-by: NobodyOnSE <ich@sektor.selfip.com>
Upstream-commit: b2a907c8cab64830c9e424eb1ec71e0429d326ff
Component: engine
2018-03-06 08:42:12 +01:00
cb84ae24c4 Merge pull request #36444 from yongtang/02142018-events-tests
Migrate events tests to api tests
Upstream-commit: 2f7a76a6a0959109e4438952c88c824078cea074
Component: engine
2018-03-06 08:36:30 +01:00
847ef0d3fb Merge pull request #36490 from yongtang/03052018-expected-actual
Address `expected` vs `actual` in integration tests
Upstream-commit: e02fa4a679c670d0745a1f828274297feb5a193c
Component: engine
2018-03-05 19:40:53 -08:00
ca48b9593b Merge pull request #36437 from kolyshkin/dm-unused
devmapper.Mounted: remove
Upstream-commit: a6b1d2ea297827d763de9e4b1940434e00a37883
Component: engine
2018-03-05 18:14:36 -08:00
0faba84bd7 Merge pull request #36474 from yongtang/03022018-rm-test
Migrate docker rm tests to api tests
Upstream-commit: da559d01d140978123c37f0f359c4aa5b022adb4
Component: engine
2018-03-05 17:15:26 -08:00
483e590861 Fix to address regression caused by PR 30897
With the inclusion of PR 30897, creating service for host network
    fails in 18.02. Modified IsPreDefinedNetwork check and return
    NetworkNameError instead of errdefs.Forbidden to address this issue

Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: 7cf8b20762cc9491f52ff3f3d94c880378183696
Component: engine
2018-03-05 19:10:39 -05:00
804775ddc9 daemon/stats: remove obnoxious types file
While a `types.go` file is handly when there are a lot of record types,
it is completely obnoxious when used for concrete, utility types with a
struct, new function and method set in the same file. This change
removes the `types.go` file in favor of the simpler approach.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 244e59e94f153af82e6c3bd8a6c200a48d3cea60
Component: engine
2018-03-05 15:59:04 -08:00
666369f138 Merge pull request #36327 from Microsoft/jjh/block-pulling-uplevel
Windows: Block pulling uplevel images
Upstream-commit: 3e1505e3e671d35636f7818dc1f41e4a4d429620
Component: engine
2018-03-05 15:12:52 -08:00
391894bb6c Address expected vs actual in integration tests
This fix addresses `expected` vs `actual` in integration tests
so that they match `assert.Equal(t, expected, actual)`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8a854e933b3dbb26cfce28b920cff61909412c6f
Component: engine
2018-03-05 20:39:42 +00:00
61babf754e Adds a unit test for plugin request timeout
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7ca971fb495e4de4aa4455964625974464d86920
Component: engine
2018-03-05 15:38:56 -05:00
02ba73152d Migrate docker rm tests to api tests
This fix migrates docker rm test in integration-cli
to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ed58ba99fb28ceac56063b7f003f38b597ddef80
Component: engine
2018-03-05 20:35:14 +00:00
fd6608a9da Merge pull request #36468 from vdemeester/e2e-container-run
Fixes some integration/container tests to run on remote daemon
Upstream-commit: 4b2fb7e394e8ee631394d6c12f8267065f39766b
Component: engine
2018-03-05 12:23:24 -08:00
8b5e7a334b devmapper.shutdown: optimize
Move the "unmount and deactivate" code into a separate method, and
optimize it a bit:

1. Do not use filepath.Walk() as there's no requirement to recursively
   go into every directory under home/mnt; a list of directories in mnt
   is sufficient. With filepath.Walk(), in case some container will fail
   to unmount, it'll go through the whole container filesystem which is
   excessive and useless.

2. Do not use GetMounts() and check if a directory is mounted; just
   unmount it and ignore "not mounted" error. Note the same error
   is returned in case of wrong flags set, but as flags are hardcoded
   we can safely ignore such case.

While at it, promote "can't unmount" log level from debug to warning.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: f1a459229724f5e8e440b49f058167c2eeeb2dc6
Component: engine
2018-03-05 10:08:56 -08:00
8f7dd9a1c4 devmapper cleanup: improve error msg
1. Make sure it's clear the error is from unmount.

2. Simplify the code a bit to make it more readable.

[v2: use errors.Wrap]
[v3: use errors.Wrapf]
[v4: lowercase the error message]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 9d00aedebc25507042c5afd4ab8fc6b333ca7c53
Component: engine
2018-03-05 10:08:56 -08:00
dec1b3c995 Merge pull request #36407 from agawish/36395-mount-print
36395 mount print
Upstream-commit: 8830ef804fec52f3087d9c24a8583ca9954e0967
Component: engine
2018-03-06 02:31:21 +09:00
b917c45482 Merge pull request #36471 from yongtang/03022018-improvement
Improvement in integration tests
Upstream-commit: 3af9b1d395615882dc64df68878139fd5e68712c
Component: engine
2018-03-05 17:54:09 +01:00
8a42f40f5e Windows: Report Version and UBR
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6de9f90417f1295fcdc2f1c977178bff7a735f99
Component: engine
2018-03-05 08:20:45 -08:00
bcdb133cb4 Migrate events tests to api tests
This fix migrates events tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3a749157d2c2b320fea49f7aa4d4eb634f52662f
Component: engine
2018-03-05 16:13:48 +00:00
85d9dcf398 Fixes some integration/container test to run on remote daemon
```
docker build -f Dockerfile.e2e -t moby-e2e .
docker run -v /var/run/docker.sock:/var/run/docker.sock \
           -e TEST_INTEGRATION_DIR=/tests/integration/container \
           -e DOCKER_API_VERSION=1.36 moby-e2e
```

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18dd1d9aba3c79d355abaa7f498b88ad816f7d04
Component: engine
2018-03-05 14:24:01 +01:00
bc39105891 Merge pull request #36449 from thaJeztah/bump-runc-1.0-rc5
Bump Runc to 1.0.0-rc5
Upstream-commit: 61cb026e7eba8ecd720b752244e14ce142b0c288
Component: engine
2018-03-05 11:44:21 +01:00
b0676c2968 Merge pull request #36476 from yongtang/03022018-kill_test
Remove unnecessary container.WithName in kill test
Upstream-commit: e3814ece2147b4a6c7f01e6611aa7c886ce26fed
Component: engine
2018-03-05 11:42:30 +01:00
e10e8cecdc Merge pull request #36475 from IRCody/logdriver-errors
daemon/logger/ring.go: log error not instance
Upstream-commit: 954e55b3745fe764df54e8fc19039b49bcd2f1a3
Component: engine
2018-03-03 15:51:35 -08:00
530cbde3fb daemon/logger/ring.go: log error not instance
Log the error returned from logdriver.Log() instead of the logdriver
itself.

Signed-off-by: Cody Roseborough <crrosebo@amazon.com>
Upstream-commit: a1956b5623fad186ad39ae8aca998284003b0cd3
Component: engine
2018-03-03 16:29:57 +00:00
c04142001c Merge pull request #36438 from kolyshkin/dm-rm
devmapper/Remove(): use Rmdir, ignore errors
Upstream-commit: 6fe8384939b867409a5021d97afe5d2a606d0f0c
Component: engine
2018-03-03 15:10:08 +01:00
ff4f20efc2 Merge pull request #36459 from yongtang/02282018-export-test
Migrate export tests to api tests
Upstream-commit: e734e8f51597bba3d7c097144d981b85b30dde99
Component: engine
2018-03-03 12:29:53 +09:00
ce4da0689b devmapper/Remove(): use Rmdir, ignore errors
1. Replace EnsureRemoveAll() with Rmdir(), as here we are removing
   the container's mount point, which is already properly unmounted
   and is therefore an empty directory.

2. Ignore the Rmdir() error (but log it unless it's ENOENT). This
   is a mount point, currently unmounted (i.e. an empty directory),
   and an older kernel can return EBUSY if e.g. the mount was
   leaked to other mount namespaces.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 732dd9b848bec70a2ecb5b4998918886a0cec497
Component: engine
2018-03-02 18:10:57 -08:00
9781623852 Remove unnecessary container.WithName in kill test
This fix removes several unnecessary `container.WithName`
usage in docker kill integration test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1778719d6ac166250acfaebe5dd99b5e9d151c3e
Component: engine
2018-03-03 01:06:49 +00:00
49ec29b887 Improvement in integration tests
This fix adds several improvement:
1. No need for explicit ContainerRemove as it has been handled in setupTest()
2. Added `container.WithImage` helper function and used it in commit tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6ab465804b0b8cec6c5ac278a21151d49e34885d
Component: engine
2018-03-02 19:03:59 +00:00
f51e63d406 Migrate export tests to api tests
This fix migrates export tests in integration-cli to api tests.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4e702cf70d50ee5b0737270f27d9973fd3084c66
Component: engine
2018-03-02 00:44:03 +00:00
59d8a525c8 Add missing canonical import comment to files in integration tests
The  canonical import comment was added some time ago, though several
newly added files do not have the comment. This fix adds the missing
canonical import comment to files in integration tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9045406144413920da49629a181bb787c670197e
Component: engine
2018-03-01 22:51:11 +00:00
c17eb54e99 Merge pull request #36455 from thaJeztah/flip-asserts
Fix "expected" and "actual" being reversed
Upstream-commit: 7459e4cd4fc71dec134e0a90bb317142dcd4270d
Component: engine
2018-03-01 21:31:46 +01:00