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

2435 commits

Author SHA1 Message Date
Tibor Vass
375f754f49 Merge pull request from calavera/api_client_lib
Api client lib
2015-12-09 19:17:11 +01:00
David Calavera
57b6796304 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>
2015-12-09 12:05:01 -05:00
David Calavera
0876742646 Implement docker logs with standalone client lib.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-09 12:04:55 -05:00
Qiang Huang
2347f98003 Check minimum kernel memory limit to be 4M
Fixes: 

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-09 14:26:41 +08:00
Derek McGowan
e8a0e126f7 Merge pull request from aaronlehmann/test-pull-all-tags
Fix flaky test TestPullAllTagsFromCentralRegistry
2015-12-08 14:15:55 -08:00
Aaron Lehmann
d17669999f 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>
2015-12-08 11:23:04 -08:00
Alexander Morozov
adb19755e1 Merge pull request from aaronlehmann/flaky-logs-test
Fix flaky test TestLogsSince
2015-12-08 09:03:39 -08:00
Phil Estes
0433e38915 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)
2015-12-07 20:14:52 -05:00
Aaron Lehmann
7ab0f9bf61 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>
2015-12-07 13:26:30 -08:00
Tibor Vass
1f8efc687c Merge pull request from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
2015-12-07 14:38:21 +01:00
Doug Davis
0bb4f82d2d Merge pull request from wenchma/18424-ErrorCodeNoSuchContainer
Correct the message of ErrorCodeNoSuchContainer to "No such container"
2015-12-07 07:48:04 -05:00
Vincent Demeester
d125ddaeda Fix DockerSuite.TestVolumeCliInspectMulti
Use dockerCmdWithError now that it actually returns an error code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-07 08:34:18 +01:00
Vincent Demeester
32f08e06e6 Merge pull request from mrfuxi/cli-specific-errors-in-api
Remove CLI specific information for API error messages. Issue 
2015-12-06 16:02:40 +01:00
Sebastiaan van Stijn
5b4734aaa5 Merge pull request from haoshuwei/modify-volume-inspect-multi
Modify docker volume inspect to return existed volumes and the names of the unexsited volumes
2015-12-06 14:03:46 +01:00
Jess Frazelle
87a614ed55 Merge pull request from jfrazelle/initial-seccomp-support
Phase 1: Initial seccomp support
2015-12-05 08:33:58 -08:00
Antonio Murdaca
09c4643ce1 integration-cli: fix test name typo
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-05 11:42:46 +01:00
Tonis Tiigi
fcb083c6ac Fix image deletion conflicts with search
Removed images were not cleaned up from the
digest-set that is used for the search index.

Fixes 

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-04 13:15:54 -08:00
Phil Estes
23b771782a 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)
2015-12-04 12:18:05 -05:00
Sebastiaan van Stijn
cb6a1a6042 Merge pull request from Mashimiao/add-support-blkio_throtte_bps
Add support for blkio read/write bps device
2015-12-04 12:29:58 +01:00
Wen Cheng Ma
c424c8c32c Correct the message of ErrorCodeNoSuchContainer to "No such container"
Fixes issue 

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-04 15:00:08 +08:00
Doug Davis
c80d03db77 Merge pull request from tonistiigi/fix-sha-prefix-inspect
Vendor distribution and fix inspect by sha256 prefix
2015-12-03 20:59:47 -05:00
Ma Shimiao
3f15a055e5 Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-04 09:26:03 +08:00
Jessica Frazelle
6707f4b9b6
inital seccomp support
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-03 16:30:44 -08:00
Tonis Tiigi
61d6240069 Add test for inspect with a sha256 prefix
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-03 14:06:30 -08:00
David Calavera
29c69ce2a9 Merge pull request from calavera/volume_inspect_exit
Return error code when `volume inspect` fails with a template.
2015-12-03 13:31:47 -08:00
Phil Estes
4d849619d4 Merge pull request from vdemeester/17446-network-inspect-format
Add format flag to network inspect
2015-12-03 16:16:04 -05:00
David Calavera
b9d30280f6 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>
2015-12-03 13:22:55 -05:00
Tibor Vass
33ab2bb52c Merge pull request from calavera/events_pub_sub
Event PubSub topics + linear filtering.
2015-12-03 17:11:40 +01:00
Karol Duleba
74900edbf8 Remove CLI specific information for API error messages. Issue
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-12-03 15:23:07 +00:00
David Calavera
434d2e8745 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>
2015-12-02 16:43:49 -05:00
Vincent Demeester
295c27388d 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>
2015-12-02 22:32:10 +01:00
Jessica Frazelle
4354b348ad
fix default shm size in test
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-02 12:43:51 -08:00
David Calavera
aa2ca5d93c Merge pull request from sallyom/dontReturnNonError
don't return error if can't delete non-existing container
2015-12-02 11:59:50 -08:00
Arnaud Porterie
8f1f53f735 Merge pull request from runcom/add-oom-score-adj
Add OomScoreAdj
2015-12-02 11:49:51 -08:00
Brian Goff
f411b101ac Merge pull request from hqhq/hq_fix_swappiness
Set default MemorySwappiness when adapt
2015-12-02 14:25:08 -05:00
David Calavera
d4be46def4 Merge pull request from rhatdan/volume-tmpfs
Add tmpfs as a valid volume source command.
2015-12-02 11:16:49 -08:00
Sally O'Malley
bfa5027e96 don't return error if can't delete non-existing container
Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-12-02 13:48:59 -05:00
Jess Frazelle
fcccf2dae4 Merge pull request from duglin/Issue9798a
Deprecate -f flag from docker tag
2015-12-02 08:16:09 -08:00
David Calavera
93d1dd8036 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>
2015-12-02 11:12:42 -05:00
Phil Estes
3241b564a5 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)
2015-12-02 10:25:00 -05:00
Dan Walsh
b3e527dfd2 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>
2015-12-02 10:06:59 -05:00
Antonio Murdaca
2969abc6c5 Move defaultSHMSize in daemon pkg
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-02 10:28:10 +01:00
Doug Davis
8d4fe141c4 Deprecate -f flag from docker tag
Closes 

@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>
2015-12-01 19:53:49 -08:00
Qiang Huang
4089b4e440 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>
2015-12-02 10:53:52 +08:00
Phil Estes
da0c9286a9 Merge pull request from jfrazelle/change-frozen-image-v2
update download-frozen-image.sh to v2 registry
2015-12-01 17:12:00 -05:00
Jessica Frazelle
359d0c247f
update download-frozen-image.sh to v2 registry
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-01 13:16:42 -08:00
Antonio Murdaca
ef1d410b02 fix shm size handling
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-01 16:29:40 +01:00
Tibor Vass
c247b3d104 Merge pull request from calavera/fix_dns_setting_on_hostconfig_start
Make sure container start doesn't make the DNS fields nil.
2015-12-01 12:43:16 +01:00
Vincent Demeester
657085dfdb Merge pull request from aditirajagopal/16756-docker_api_inspect_test
Checkers on docker_api_inspect_test.go
2015-12-01 09:56:01 +01:00
David Calavera
d7117a1b71 Make sure container start doesn't make the DNS fields nil.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-30 22:46:31 -05:00