Commit graph

33324 commits

Author SHA1 Message Date
Sebastiaan van Stijn
8d703b98b5 Merge pull request #34194 from abhinandanpb/opt
Fixing issue with driver opt not passed to drivers
2017-07-20 20:02:05 +02:00
Brian Goff
d42dbdd3d4 Fix error handling with not-exist errors on remove
Specifically, none of the graphdrivers are supposed to return a
not-exist type of error on remove (or at least that's how they are
currently handled).

Found that AUFS still had one case where a not-exist error could escape,
when checking if the directory is mounted we call a `Statfs` on the
path.

This fixes AUFS to not return an error in this case, but also
double-checks at the daemon level on layer remove that the error is not
a `not-exist` type of error.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-20 12:26:27 -04:00
Jérôme Petazzoni
84aefe8697 Add a log message when the storage driver is overriden through the environment
Signed-off-by: Jérôme Petazzoni <jerome.petazzoni@gmail.com>
2017-07-20 17:38:34 +02:00
Daniel J Walsh
bfdb0f3cb8 /dev should be constrained in size
There really is no reason why anyone should create content in /dev
other then device nodes.  Limiting it size to the 64 k size limit.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-07-20 08:59:56 -04:00
Sebastiaan van Stijn
a14f06a865 Merge pull request #34186 from thaJeztah/api-update-example-data
Improve API docs for UsageData
2017-07-20 09:38:28 +02:00
Abhinandan Prativadi
bcb55c6202 Fixing issue with driver opt not passed to drivers
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2017-07-19 17:44:53 -07:00
Sebastiaan van Stijn
8299f17278 Merge pull request #34183 from thaJeztah/api-changelog-add-volume-created-at
Update API history and example response for volume CreatedAt
2017-07-19 22:13:34 +02:00
Sebastiaan van Stijn
86b77bd9dd Merge pull request #34172 from aaronlehmann/swagger-configs
api: Update swagger.yaml for configs
2017-07-19 22:09:31 +02:00
Aaron Lehmann
ea1d14a189 api: Update swagger.yaml for configs
Also fix bad reference to ServiceSpec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-07-19 09:52:25 -07:00
Sebastiaan van Stijn
4309075610 Merge pull request #34071 from FengtuWang/pause
Keep pause state when restoring container's status
2017-07-19 17:49:38 +02:00
Sebastiaan van Stijn
194f635ce7
Improve API docs for UsageData
The docs did not mention when this information
was set, and what the `-1` value indicated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 16:25:38 +02:00
Sebastiaan van Stijn
48a83a3a18
Update API history and example response for volume CreatedAt
This adds the new `CreatedAt` field to the API version history
and updates some examples to show this information.

The `CreatedAt` field was implemented in a46f757c40

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 16:18:08 +02:00
Sebastiaan van Stijn
eb9e5cd14b Merge pull request #32453 from cpuguy83/default_enable_pprof
Enable pprof/debug endpoints by default
2017-07-19 16:13:12 +02:00
Vincent Demeester
24bb61145c Merge pull request #34168 from Microsoft/jjh/dodgytest
Windows: Disable TestAttachTTYWithoutStdin
2017-07-19 10:19:15 +02:00
Vincent Demeester
a2202d5d5d Merge pull request #34171 from thaJeztah/fix-secrets-api-docs
Fix API docs for GET /secrets/{id}, GET /secrets
2017-07-19 10:18:09 +02:00
Bernhard M. Wiedemann
760763e995 Allow to override build date
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2017-07-19 06:20:18 +02:00
Aaron Lehmann
b642b3f21f Avoid using a map for log attributes
Having a map per log entry seemed heavier than necessary. These
attributes end up being sorted and serialized, so storing them in a map
doesn't add anything (there's no random access element). In SwarmKit,
they originate as a slice, so there's an unnecessary conversion to a map
and back.

This also fixes the sort comparator, which used to inefficiently split
the string on each comparison.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-07-18 19:01:20 -07:00
Tonis Tiigi
b60c5819bb Add builder dev report for 2017-07-17
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-18 18:31:42 -07:00
Sebastiaan van Stijn
f6954bea9f
Fix API docs for GET /secrets/{id}, GET /secrets
The swagger.yml defined these endpoints to return
a "ServiceSpec" instead of a "SecretSpec".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 00:22:05 +02:00
John Howard
e4ec9195fe Windows: Disable TestAttachTTYWithoutStdin
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-07-18 14:23:23 -07:00
Victor Vieux
fa7db52e26 Merge pull request #34135 from tklauser/more-unix-fns
Replace manually written wrappers by functions from x/sys/unix
2017-07-18 20:43:13 +02:00
Brian Goff
72959fc216 Merge pull request #34146 from kolyshkin/vasprintf
devmapper_wrapper.go: fix gcc warning
2017-07-18 12:46:23 -04:00
Sebastiaan van Stijn
0304c98d85 Merge pull request #34157 from twistlock/plugable_secrets_backend
plugable secret backend
2017-07-18 18:07:27 +02:00
Sebastiaan van Stijn
32ada4dcf1 Merge pull request #34002 from thaJeztah/carry-32483
Service privileges: API docs
2017-07-18 13:09:08 +02:00
Liron Levin
e3f920d2f1 pluggable secret backend
Fixing secret driver serialization issue from
08f7cf0526

Signed-off-by: Liron Levin <liron@twistlock.com>
2017-07-18 12:45:44 +03:00
Sebastiaan van Stijn
c6fe39728f Merge pull request #34155 from thaJeztah/update-authors
Update authors and mailmap
2017-07-18 11:05:42 +02:00
Vincent Demeester
f909119582 Merge pull request #34085 from cpuguy83/tests_use_locally_built_plugin
Use local plugins, not from hub for tests
2017-07-18 10:47:58 +02:00
Sebastiaan van Stijn
6be41f3858
Update authors and mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-18 10:36:11 +02:00
Yuanhong Peng
600ad5c1b7 Remove links when remove container
Steps to reproduce:
```
    # docker run -tid --name aaa ubuntu
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    # docker run -tid --name bbb --link aaa ubuntu
    23ad18362950f39b638206ab4d1885fd4f50cbd1d16aac9cab8e97e0c8363471
    # docker ps --no-trunc
    CONTAINER ID                                                       IMAGE
    COMMAND             CREATED             STATUS              PORTS
    NAMES
    23ad18362950f39b638206ab4d1885fd4f50cbd1d16aac9cab8e97e0c8363471
    ubuntu              "/bin/bash"         4 seconds ago       Up 3 seconds
    bbb
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    ubuntu              "/bin/bash"         14 seconds ago      Up 14
    seconds                           aaa,bbb/aaa
    # docker rm -f bbb
    bbb
    # docker ps --no-trunc
    CONTAINER ID                                                       IMAGE
    COMMAND             CREATED             STATUS              PORTS
    NAMES
    57bfd00ac5559f72eec8c1b32a01fe38427d66687940f74611e65137414f0ada
    ubuntu              "/bin/bash"         29 seconds ago      Up 28
    seconds                           aaa,bbb/aaa
    # docker rm --link bbb/aaa
    Error response from daemon: Cannot get parent /bbb for name /bbb/aaa
```

When we rm container `bbb`, we can still see `bbb/aaa` in `docker ps
--no-trunc`. And this link cannot be deleted since container `bbb` has
already been removed.

We should remove links of a container when it is deleted.

Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
2017-07-18 12:09:26 +08:00
Kir Kolyshkin
7da12bcfa9 devmapper_wrapper.go: fix gcc warning
I am getting the following warning from gcc when compiling the daemon:

> # github.com/docker/docker/pkg/devicemapper
> pkg/devicemapper/devmapper_wrapper.go: In function ‘log_cb’:
> pkg/devicemapper/devmapper_wrapper.go:20:2: warning: ignoring return
> value of ‘vasprintf’, declared with attribute warn_unused_result
> [-Wunused-result]
>  vasprintf(&buffer, f, ap);
>  ^

vasprintf(3) man page says if the function returns -1, the buffer is
undefined, so we should not use it. In practice, I assume, this never
happens so we just return.

Introduced by https://github.com/moby/moby/pull/33845 that resulted in
commit 63328c6 ("devicemapper: remove 256 character limit of libdm logs")

Cc: Aleksa Sarai <asarai@suse.de>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-07-17 17:46:44 -07:00
Brian Goff
08f7cf0526 Merge pull request #34123 from twistlock/plugable_secrets_backend
pluggable secret backend
2017-07-17 19:00:30 -04:00
Brian Goff
408c7ade70 Enable pprof/debug endpoints by default
Makes sure that debug endpoints are always available, which will aid in
debugging demon issues.

Wraps debug endpoints in the middleware chain so the can be blocked by
authz.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-17 15:01:30 -04:00
Evan Hazlett
458f6712d4 Merge pull request #33886 from aaronlehmann/names-in-memdb
Store container names in memdb
2017-07-17 14:16:41 -04:00
Daniel Nephin
1fb615599a Remove test-unit from hack/make
Also remove the test flag from pkg/term and jsut checkuid directly.
Fixed a problem with a pkg/term test that was leaving the terminal in a bad
state.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-17 11:39:33 -04:00
Daniel Nephin
ece4520bf8 More helper hack helper functions to a more appropriate place.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-07-17 11:38:59 -04:00
Brian Goff
d9b785cf2e Merge pull request #34134 from pims/use-const-key
Replaces fluentd-address string by constant
2017-07-17 11:13:54 -04:00
Tobias Klauser
bedf09363c loopback: use IoctlGetInt/IoctlSetInt from x/sys/unix
Use IoctlGetInt/IoctlSetInt from golang.org/x/sys/unix (where
applicable) instead of manually reimplementing them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-07-17 10:37:42 +02:00
Tobias Klauser
6476504695 [pkg/term] use IoctlGetTermios/IoctlSetTermios from x/sys/unix
Use IoctlGetTermios/IoctlSetTermios from golang.org/x/sys/unix instead
of manually reimplementing them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-07-17 10:37:42 +02:00
Tobias Klauser
6c9d715a8c sysinfo: use Prctl() from x/sys/unix
Use unix.Prctl() instead of manually reimplementing it using
unix.RawSyscall. Also use unix.SECCOMP_MODE_FILTER instead of locally
defining it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-07-17 10:37:42 +02:00
Vincent Demeester
97e730ae57 Merge pull request #34106 from tonistiigi/fix-tar-prefix-header
Fix tar prefix header
2017-07-17 09:40:39 +02:00
tim
cb972b1515 Replaces fluentd-address string by constant
Signed-off-by: tim <tim@fewagainstmany.com>
2017-07-16 23:06:57 -07:00
Liron Levin
7d45cafd57 pluggable secret backend
This commit extends SwarmKit secret management with pluggable secret
backends support.

Updating the work in
[swarmkit](docker/swarmkit@eebac27434) for
pluggable secret backend and adding the
driver parameter to `SecretSpec`.

Remaining work:
- [ ] CLI support (docker/cli)
- [ ] api in [plugin helpers](docker/go-plugins-helpers))
- [ ] Reference plugin
- [ ] Documenation (after cli work)

Signed-off-by: Liron Levin <liron@twistlock.com>
2017-07-15 16:50:02 +03:00
Sebastiaan van Stijn
d0a8e73e7b
Service privileges: API docs
This documents the Service privileges
API changes, that were added in:
091b5e68ea

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-14 17:04:26 -07:00
Brian Goff
15a538a627 Testing: Use local plugins, not from hub
Use the (new) plugin fixtures for plugin tests rather than pulling
plugins from hub.

This removes the restriction for platforms/archs since plugin binaries
get built in the test environment.

Future work would be to add test plugins for the various subsystems so
tests that are actually using plugins (e.g. volumes, networks) can be
ported to use the fixtures as well.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-14 13:24:14 -04:00
Tonis Tiigi
4a3cfda45e archive: add test for prefix header
With docker-17.06.0 some images pulled do not extract properly. Some files don't appear in correct directories. This may or may not cause the pull to fail. These images can't be pushed or saved. 17.06 is the first version of Docker built with go1.8.

Cause

There are multiple updates to the tar package in go1.8.

https://go-review.googlesource.com/c/32234/ disables using "prefix" field when new tar archives are being written. Prefix field was previously set when a record in the archive used a path longer than 100 bytes.

Another change https://go-review.googlesource.com/c/31444/ makes the reader ignore the "prefix" field value if the record is in GNU format. GNU format defines that same area should be used for access and modified times. If the "prefix" field is not read, a file will only be extracted by the basename.

The problem is that with a previous version of the golang archive package headers could be written, that use the prefix field while at the same time setting the header format to GNU. This happens when numeric fields are big enough that they can not be written as octal strings and need to be written in binary. Usually, this shouldn't happen: uid, gid, devmajor, devminor can use up to 7 bytes, size and timestamp can use 11. If one of the records does overflow it switches the whole writer to GNU mode and all next files will be saved in GNU format.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-14 10:20:48 -07:00
Brian Goff
f7ce35f47b Merge pull request #34077 from justincormack/mount_remount_opts
In the case of remounting with changed data, need to call mount
2017-07-14 09:58:30 -04:00
Sebastiaan van Stijn
ce0ef9568d Merge pull request #34076 from yastij/33679-renaming-id-meth
renaming id() to state clearly that it's related to the networkAttachment
2017-07-14 00:29:09 -07:00
Sebastiaan van Stijn
93494237df Merge pull request #34089 from tonistiigi/builder-report-2017-07-10
Add builder dev report for 2017-07-10
2017-07-13 23:25:57 -07:00
Akihiro Suda
1daa10301a Merge pull request #34063 from dnephin/fix-builder-no-such-layer
Fix multiple `COPY --from` in multistage builds
2017-07-14 12:19:19 +09:00
Tonis Tiigi
72df48d1ad vendor: add archive/tar
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-13 19:08:19 -07:00