Commit Graph

2430 Commits

Author SHA1 Message Date
c95eea80e2 Implement docker logs with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 087674264674eaf946d185691ea92eee16f16a4f
Component: engine
2015-12-09 12:04:55 -05:00
b3330dfcec Merge pull request #18479 from aaronlehmann/flaky-logs-test
Fix flaky test TestLogsSince
Upstream-commit: adb19755e1d0b6e2e7693ddb7932f26e63d1b0b5
Component: engine
2015-12-08 09:03:39 -08:00
86850a7309 Allow non-seccomp platforms to pass integration-cli tests
Since seccomp is still a configurable build-tag, add a requirements
entry for seccomp, as well as move seccomp tests to "_unix" given it
won't be applicable to other platforms at this time.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 0433e3891532a9783b77d6b02c041bab359b0d91
Component: engine
2015-12-07 20:14:52 -05:00
9fbd61f90d Fix flaky test TestLogsSince
This test can fail if it is run close to a second boundary:

    FAIL: docker_cli_logs_test.go:169: DockerSuite.TestLogsSince

    docker_cli_logs_test.go:183:
        c.Assert(out, checker.Not(checker.Contains), v,
    check.Commentf("unexpected log message returned, since=%v", since))
    ... obtained string = "" +
    ...     "2015-12-07T19:54:45.000551883Z 1449518084 log2\n" +
    ...     "2015-12-07T19:54:47.001310929Z 1449518086 log3\n"
    ... substring string = "log2"
    ... unexpected log message returned, since=1449518085

The problem is that it generates log lines using date +%s and uses that
timestamp as a reference for log filtering with (--since) later on in
the test. However, the timestamp that date +%s generates may not match
the log timestamp.

This commit changes the test to parse the log timestamp itself instead
of relying on a parallel timestamp.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 7ab0f9bf6142b828ac8972fae6cb8aabcaf1d742
Component: engine
2015-12-07 13:26:30 -08:00
1af1c81aab Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
Upstream-commit: 1f8efc687cdf8ba98a7332cf9d4401afb8108be6
Component: engine
2015-12-07 14:38:21 +01:00
c2790f1174 Merge pull request #18425 from wenchma/18424-ErrorCodeNoSuchContainer
Correct the message of ErrorCodeNoSuchContainer to "No such container"
Upstream-commit: 0bb4f82d2d9f3d741fea6251dc4b2925576a8d02
Component: engine
2015-12-07 07:48:04 -05:00
3247a95872 Fix DockerSuite.TestVolumeCliInspectMulti
Use dockerCmdWithError now that it actually returns an error code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d125ddaeda6b99d5c2c5920664a7e3baa9fb8d92
Component: engine
2015-12-07 08:34:18 +01:00
b461d8e9fc Merge pull request #18349 from mrfuxi/cli-specific-errors-in-api
Remove CLI specific information for API error messages. Issue #17147
Upstream-commit: 32f08e06e635adac43cd7113e8118394eeafc0b6
Component: engine
2015-12-06 16:02:40 +01:00
d6d57d5554 Merge pull request #17788 from haoshuwei/modify-volume-inspect-multi
Modify docker volume inspect to return existed volumes and the names of the unexsited volumes
Upstream-commit: 5b4734aaa543243ba076bf606286bbc46fed9e38
Component: engine
2015-12-06 14:03:46 +01:00
ab6c9709f6 Merge pull request #17989 from jfrazelle/initial-seccomp-support
Phase 1: Initial seccomp support
Upstream-commit: 87a614ed55f2a9076d8150f846b0d27fe60095a8
Component: engine
2015-12-05 08:33:58 -08:00
8c68850665 integration-cli: fix test name typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 09c4643ce1e9c0ae29e0489daefe0053aeed260f
Component: engine
2015-12-05 11:42:46 +01:00
aedf5127c5 Fix image deletion conflicts with search
Removed images were not cleaned up from the
digest-set that is used for the search index.

Fixes #18437

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fcb083c6ac0fdb71e8db7a58f07a561342d631d3
Component: engine
2015-12-04 13:15:54 -08:00
37ebaba7a1 Fix init layer chown of existing dir ownership
This solves a bug where /etc may have pre-existing permissions from
build time, but init layer setup (reworked for user namespaces) was
assuming root ownership.  Adds a test as well to catch this situation in
the future.

Minor fix to wrong ordering of chown/close on files created during the
same initlayer setup.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 23b771782ab7236ce5024ac5773a6ded9a2af753
Component: engine
2015-12-04 12:18:05 -05:00
9e539c7be0 Merge pull request #14466 from Mashimiao/add-support-blkio_throtte_bps
Add support for blkio read/write bps device
Upstream-commit: cb6a1a6042fc30e0beeaa79a2f8def4b53019483
Component: engine
2015-12-04 12:29:58 +01:00
cae2a5b6ac Correct the message of ErrorCodeNoSuchContainer to "No such container"
Fixes issue #18424

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: c424c8c32c86d5e02964ad84802e9f9fa4e55522
Component: engine
2015-12-04 15:00:08 +08:00
448be2245f Merge pull request #18409 from tonistiigi/fix-sha-prefix-inspect
Vendor distribution and fix inspect by sha256 prefix
Upstream-commit: c80d03db77d1bb70f85b3d765221bf7206714344
Component: engine
2015-12-03 20:59:47 -05:00
7be0f9667b Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 3f15a055e5c50d0f08d4c3e7cd9618d537b84f29
Component: engine
2015-12-04 09:26:03 +08:00
4f88ba8722 inital seccomp support
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 6707f4b9b638b367a1dde6f8684a5b9817a882f0
Component: engine
2015-12-03 16:30:44 -08:00
1c47f9b984 Add test for inspect with a sha256 prefix
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 61d6240069cda31559523b98cecb6b340a9d45fd
Component: engine
2015-12-03 14:06:30 -08:00
0b8eb4aacf Merge pull request #18374 from calavera/volume_inspect_exit
Return error code when `volume inspect` fails with a template.
Upstream-commit: 29c69ce2a9158899257aa3e015b4db098f662bdd
Component: engine
2015-12-03 13:31:47 -08:00
9f99937185 Merge pull request #17481 from vdemeester/17446-network-inspect-format
Add format flag to network inspect
Upstream-commit: 4d849619d48f9ad9ad7b8c7d5bc1481dae3230e4
Component: engine
2015-12-03 16:16:04 -05:00
33e1a90c6b Return error code when volume inspect fails with a template.
Following `docker inspect` conventions:

- Keep partial info in a buffer to not print incomplete template outputs.
- Break execution when template parsing or decoding fail.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: b9d30280f6eb2f817b1315c22953a133f1b66e69
Component: engine
2015-12-03 13:22:55 -05:00
0082efd193 Merge pull request #18266 from calavera/events_pub_sub
Event PubSub topics + linear filtering.
Upstream-commit: 33ab2bb52c130380e038013d68fdd8ad3c663360
Component: engine
2015-12-03 17:11:40 +01:00
c9f2f55bc6 Remove CLI specific information for API error messages. Issue #17147
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
Upstream-commit: 74900edbf867e6ffe4e824a8c6383eb34a658341
Component: engine
2015-12-03 15:23:07 +00:00
d555e15f77 Add PubSub topics.
A TopicFunc is an interface to let the pubisher decide whether it needs
to send a message to a subscriber or not. It returns true if the
publisher must send the message and false otherwise.

Users of the pubsub package can create a subscriber with a topic
function by calling `pubsub.SubscribeTopic`.

Message delivery has also been modified to use concurrent channels per
subscriber. That way, topic verification and message delivery is not
o(N+M) anymore, based on the number of subscribers and topic verification
complexity.

Using pubsub topics, the API stops controlling the message delivery,
delegating that function to a topic generated with the filtering
provided by the user. The publisher sends every message to the
subscriber if there is no filter, but the api doesn't have to select
messages to return anymore.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 434d2e8745696255a204d9eefc6a2854ff74e5c2
Component: engine
2015-12-02 16:43:49 -05:00
f437e2a3c8 Add format flag to network inspect
…for consistency as docker inspect and docker volume inspect supports it too

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 295c27388dd1e7cc4196fbb8ffe0646b33bacb5b
Component: engine
2015-12-02 22:32:10 +01:00
d7c300489b fix default shm size in test
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 4354b348ad6f9a585c57d37147c2a893a2d873da
Component: engine
2015-12-02 12:43:51 -08:00
01641ba275 Merge pull request #18371 from sallyom/dontReturnNonError
don't return error if can't delete non-existing container
Upstream-commit: aa2ca5d93c2b30ba13ff67820a49d6f570323576
Component: engine
2015-12-02 11:59:50 -08:00
a7b1157339 Merge pull request #16277 from runcom/add-oom-score-adj
Add OomScoreAdj
Upstream-commit: 8f1f53f735e278bb23bb41d9387a75786d7ec1dc
Component: engine
2015-12-02 11:49:51 -08:00
96c08be56e Merge pull request #18285 from hqhq/hq_fix_swappiness
Set default MemorySwappiness when adapt
Upstream-commit: f411b101acdeefa731dc9e03dc75fbbd6ba816c6
Component: engine
2015-12-02 14:25:08 -05:00
9a973af9b7 Merge pull request #13587 from rhatdan/volume-tmpfs
Add tmpfs as a valid volume source command.
Upstream-commit: d4be46def4660f2dea090646f8d768f38c6fd520
Component: engine
2015-12-02 11:16:49 -08:00
df1c14dfd2 don't return error if can't delete non-existing container
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Upstream-commit: bfa5027e96a6a5532c7cc89bd00be219082833fa
Component: engine
2015-12-02 13:48:59 -05:00
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
79750c94df Make filtering a linear operation.
Improves the current filtering implementation complixity.
Currently, the best case is O(N) and worst case O(N^2) for key-value filtering.
In the new implementation, the best case is O(1) and worst case O(N), again for key-value filtering.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 93d1dd8036d57f5cf1e5cbbbad875ae9a6fa6180
Component: engine
2015-12-02 11:12:42 -05:00
21abdff772 Differentiate integration test error messages
Makes it easier to debug in the future given three different docker run
executions were all outputting the same error string.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 3241b564a5c2799cac9836101b9e208b216a9ff5
Component: engine
2015-12-02 10:25:00 -05:00
71b21cf347 This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over

This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: b3e527dfd242ad30c0297c8b257862116cf2c50e
Component: engine
2015-12-02 10:06:59 -05: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
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
b52058194c Set default MemorySwappiness when adapt
It makes the inspect result consistent between cli and REST api
when MemorySwappiness is not set.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 4089b4e4400d44f7c0a5b15065c70228f10ebf0c
Component: engine
2015-12-02 10:53:52 +08:00
d5614b1f4a Merge pull request #18315 from jfrazelle/change-frozen-image-v2
update download-frozen-image.sh to v2 registry
Upstream-commit: da0c9286a9e82a88e75eb9298e96426978fba4bc
Component: engine
2015-12-01 17:12:00 -05:00
a29b07bf59 update download-frozen-image.sh to v2 registry
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 359d0c247fe523ef82676f9ae4046b79e6854fe1
Component: engine
2015-12-01 13:16:42 -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
935eda07b8 Merge pull request #18318 from calavera/fix_dns_setting_on_hostconfig_start
Make sure container start doesn't make the DNS fields nil.
Upstream-commit: c247b3d104ad7e768e2540fccb3861c36eb2e60f
Component: engine
2015-12-01 12:43:16 +01:00
4f7a986f9e Merge pull request #18198 from aditirajagopal/16756-docker_api_inspect_test
Checkers on docker_api_inspect_test.go
Upstream-commit: 657085dfdb5ef789d07d0a3985aedbdeb4a1b4d9
Component: engine
2015-12-01 09:56:01 +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
bd71e2ab92 Modify docker volume inspect to return existed volumes
Signed-off-by: Shuwei Hao <haoshuwei24@gmail.com>
Upstream-commit: 6295345005b5c251b465f18fd6e77edad50a50b7
Component: engine
2015-12-01 01:43:02 +00:00
94a444216d Checkers on docker_api_inspect_test.go
Applying #16756 to integration-cli/docker_api_inspect_test.go

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
Upstream-commit: 85e5b05018a5b8095dc7390644829845794a56f7
Component: engine
2015-11-30 16:23:46 -06:00
1003fb6c11 Merge pull request #18216 from aditirajagopal/16756-docker_api_containers_test
Checkers on docker_api_containers_test
Upstream-commit: dc9f9d9445afe9dff091ff49259a622745a2f457
Component: engine
2015-11-30 14:04:54 -08:00
b034893275 Checkers on docker_api_containers_test
Applying #16756 to integration-cli/docker_api_containers_test.go

Signed-off-by: Aditi Rajagopal <arajagopal@us.ibm.com>
Upstream-commit: 4bdf957c26559d659af604dc6814a5cd2225a0f3
Component: engine
2015-11-30 14:31:48 -06:00
a6173bfeee Merge pull request #18148 from aditirajagopal/16756-docker_api_info_test
Checkers on integration-cli/docker_api_info_test
Upstream-commit: 54733abba337134b4de439182175a9ec51331c60
Component: engine
2015-11-30 11:06:15 -08:00