Commit Graph

2452 Commits

Author SHA1 Message Date
61bb408463 Merge pull request #18531 from coolljt0725/update_container_networking_on_create
fix docker inspect return unconsistent network settings  of created container and stopped container
Upstream-commit: 812a7c204a2396700ca1e95d949659b16302a120
Component: engine
2015-12-15 08:47:54 -08:00
19f8a4f8fb Merge pull request #18486 from aboch/vnd
Vendoring libnetwork bbd6e6d8ca1e7c9b42f6f53277b0bde72847ff90
Upstream-commit: 260cbb19c93ba1dc5aa0f4065cd5c95241bbd59d
Component: engine
2015-12-14 13:32:01 -08:00
df9b4bd431 Change TestRunNonRootUserResolvName Fail log.
Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: ba6b69adc2a790331701f021ac798ee23e059151
Component: engine
2015-12-13 19:59:51 -07:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
941029f664 update network settings on container creating
To make docker inspect return a consistent result of networksettings
for created container and stopped container, it's bettew to update
the network settings on container creating.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: c427131c94369d5c49a4f14d78e6ab9c678e12df
Component: engine
2015-12-13 02:34:44 -05:00
1d681e5873 Merge pull request #15365 from twistlock/14674-docker-authz
Docker authorization plug-in infrastructure
Upstream-commit: 1fffc0270ffb56d99a8440a10a0effdb3acd934d
Component: engine
2015-12-12 12:30:33 +01:00
aa7be52b1d Log events stream when TestEventStreaming fails.
Let the tag event some more time to be emitted.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: a3056f9f72baf71655a47ac5b891c892d0174ac4
Component: engine
2015-12-11 17:20:40 -05:00
f09e1890f6 Change authz plugin argument name
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: de4ffdfe488494c9c300a785ad4f2263c6182988
Component: engine
2015-12-11 20:59:15 +02:00
87797addd5 Merge pull request #18580 from tophj-ibm/fix-typo-blkio-invalid-device
Fix typo in named test and docs.
Upstream-commit: b89676beadce5a078dd8fc8b37ce00729e6e7232
Component: engine
2015-12-10 15:19:41 -08:00
9847131043 Merge pull request #18353 from aaronlehmann/transfer-manager
Improved push and pull with upload manager and download manager
Upstream-commit: ac453a310bac6bdd7cd9d780a63d4168064570d1
Component: engine
2015-12-10 14:52:48 -08:00
1aaaffc214 Fixed typo change deivce to device.
This changes deivce to device in daemon, test and docs.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 7c077c2c3443fdb9b13b7790bc96cdaa287cf381
Component: engine
2015-12-10 15:23:05 -06:00
44d9263f75 Probably fix flaky test TestExecTTY
sleep 2 seconds before exec exit to make sure
the output of `cat /foo` will be read

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 0e16eacad44f1485d6857a61e2e7690e0a37ddec
Component: engine
2015-12-10 04:13:58 -05:00
547342d777 Improved push and pull with upload manager and download manager
This commit adds a transfer manager which deduplicates and schedules
transfers, and also an upload manager and download manager that build on
top of the transfer manager to provide high-level interfaces for uploads
and downloads. The push and pull code is modified to use these building
blocks.

Some benefits of the changes:

- Simplification of push/pull code
- Pushes can upload layers concurrently
- Failed downloads and uploads are retried after backoff delays
- Cancellation is supported, but individual transfers will only be
  cancelled if all pushes or pulls using them are cancelled.
- The distribution code is decoupled from Docker Engine packages and API
  conventions (i.e. streamformatter), which will make it easier to split
  out.

This commit also includes unit tests for the new distribution/xfer
package. The tests cover 87.8% of the statements in the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 572ce802306a4e919802e5b77cbeca94acda7c0a
Component: engine
2015-12-09 19:13:35 -08:00
1c526ceb5c Move networking api types to the api/types/networking package.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: efda9618db07152ce6a94e0ac391ba58d1463fcd
Component: engine
2015-12-09 13:55:59 -08:00
3bcd3dfc58 Vendoring libnetwork bbd6e6d8ca1e7c9b42f6f53277b0bde72847ff90
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 8fe6b3835c87abf0c48d60f9c1f70bdcb496566c
Component: engine
2015-12-09 13:48:24 -08:00
ae9abb18b8 Merge pull request #18472 from calavera/api_client_lib
Api client lib
Upstream-commit: 375f754f49ee6e9de942816a47a21a715fe3bacb
Component: engine
2015-12-09 19:17:11 +01:00
cb6bc1b323 Implement all inspect commands with the new inspector interface.
It makes the behavior completely consistent across commands.
It adds tests to check that execution stops when an element is not
found.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 57b6796304880331d0d4e9cbefab7b139e718915
Component: engine
2015-12-09 12:05:01 -05:00
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
8a7da51391 Check minimum kernel memory limit to be 4M
Fixes: #18405

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 2347f98003af34dd1cfd290bf0f2cc7e6ae07b03
Component: engine
2015-12-09 14:26:41 +08:00
e937f06e2d Merge pull request #18503 from aaronlehmann/test-pull-all-tags
Fix flaky test TestPullAllTagsFromCentralRegistry
Upstream-commit: e8a0e126f73ec8773fd880b9eff54dba8eaf1dac
Component: engine
2015-12-08 14:15:55 -08:00
7d8daf7bad Fix flaky test TestPullAllTagsFromCentralRegistry
This test was directly comparing lines of output from "docker images".
Sometimes, when busybox had been pushed to the hub recently, the
relative creation times would differ like this:

... obtained []string = []string{"busybox", "latest", "d9551b4026f0", "27", "minutes", "ago", "1.113", "MB"}
... expected []string = []string{"busybox", "latest", "d9551b4026f0", "26", "minutes", "ago", "1.113", "MB"}

Fixing by removing the time-since-creation fields from the comparison.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d17669999fff55219f5ed236f00fdf8a08d09304
Component: engine
2015-12-08 11:23:04 -08:00
be83c5ad37 Rebase from master
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: f28230d35c19befe5d6799667f37c1362dd1b782
Component: engine
2015-12-08 19:45:22 +02: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
2491643ccf Docker authorization plug-in infrastructure enables extending the functionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted.
Each plug-in operates as a separate service, and registers with Docker
through general (plug-ins API)
[https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No
Docker daemon recompilation is required in order to add / remove an
authentication plug-in. Each plug-in is notified twice for each
operation: 1) before the operation is performed and, 2) before the
response is returned to the client. The plug-ins can modify the response
that is returned to the client.

The authorization depends on the authorization effort that takes place
in parallel [https://github.com/docker/docker/issues/13697].

This is the official issue of the authorization effort:
https://github.com/docker/docker/issues/14674

(Here)[https://github.com/rhatdan/docker-rbac] you can find an open
document that discusses a default RBAC plug-in for Docker.

Signed-off-by: Liron Levin <liron@twistlock.com>
Added container create flow test and extended the verification for ps
Upstream-commit: 75c353f0ad73bd83ed18e92857dd99a103bb47e3
Component: engine
2015-12-08 17:34:15 +02: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