Commit graph

21596 commits

Author SHA1 Message Date
Justin Cormack
eceeae4d7c Add ipc syscall to default seccomp profile
On 32 bit x86 this is a multiplexing syscall for the system V
ipc syscalls such as shmget, and so needs to be allowed for
shared memory access for 32 bit binaries.

Fixes #20733

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 31410a6d79)
2016-03-07 16:33:09 -05:00
Dan Walsh
516ef83f30 Do not relabel if user did not request it for non local volumes
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
(cherry picked from commit 843a119d49)
2016-03-07 16:31:31 -05:00
Aaron Lehmann
f05d42ee03 Fix concurrent uploads that share layers
Concurrent uploads which share layers worked correctly as of #18353,
but unfortunately #18785 caused a regression. This PR removed the logic
that shares digests between different push sessions. This overlooked the
case where one session was waiting for another session to upload a
layer.

This commit adds back the ability to propagate this digest information,
using the distribution.Descriptor type because this is what is received
from stats and uploads, and also what is ultimately needed for building
the manifest.

Surprisingly, there was no test covering this case. This commit adds
one. It fails without the fix.

See recent comments on #9132.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 5c99eebe81)
2016-03-07 16:30:52 -05:00
Mike Dougherty
4b2e7f0562 Use multiple keyservers in install script
This improves on an earlier change by adding another keyserver and using a for loop instead of duplicating the command

Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
(cherry picked from commit adac575dd3)
2016-03-07 16:25:54 -05:00
David Calavera
a483ccc5df Make stdcopy.stdWriter goroutine safe.
Stop using global variables as prefixes to inject the writer header.
That can cause issues when two writers set the length of the buffer in
the same header concurrently.

Stop Writing to the internal buffer twice for each write. This could
mess up with the ordering information is written.

Signed-off-by: David Calavera <david.calavera@gmail.com>
(cherry picked from commit 443a5c2021)
2016-03-07 16:25:54 -05:00
Anusha Ragunathan
97e7e233b6 Always create apt-ftparchive.conf.
The Releases file(s) and other bits for EOL-ed distros such as Ubuntu
Vivid should remain untouched when we are releasing debs.

However, few files in https://apt.dockerproject.org/repo/dists/ubuntu-vivid/
were being updated for the docker 1.10 release including the Release files.
This is due to apt-ftparchive generating index files for vivid as well,
due to the stale apt-ftparchive.conf

This change always creates config using suites in contrib/reprepro/suites.sh.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 204c7808f9)
2016-03-07 16:25:54 -05:00
Antonio Murdaca
11a8469e49 pkg: idtools: fix subid files parsing
Since Docker is already skipping newlines in /etc/sub{uid,gid},
this patch skips commented out lines - otherwise Docker fails to start.
Add unit test also.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit bf04d68db2)
2016-03-07 16:25:54 -05:00
Phil Estes
54ab6ff79e Add synchronization and closure to IO pipes in userns path
The execdriver pipes setup uses OS pipes with fds so that they can be
chown'ed to the remapped root user for proper access. Recent flakiness
in certain short-lived tests (usually via the "exec" path) reveals that
the copy routines are not completing before exit/tear-down.

This fix adds synchronization and proper closure such that these
routines exit successfully.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)

(cherry picked from commit 995386735c)
2016-03-07 16:25:54 -05:00
Brian Goff
d0165c4085 Fix panic when plugin responds with null volume
In cases where the a plugin responds with both a null or empty volume
and a null or empty Err, the daemon would panic.
This is because we assumed the idiom if `err` is nil, then `v` must not
be but in reality the plugin may return whatever it wants and we want to
make sure it doesn't harm the daemon.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 96c79a1934)
2016-03-07 14:49:37 -05:00
Phil Estes
4899a04a2a Filter auto-created device list if user namespaces enabled
Because devices will be bind-mounted instead of using `mknod`, we need
to make sure the source exists and filter the list by only those whose
source is a valid path/current device entry.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)

(cherry picked from commit 9a554e8c37)
2016-03-07 14:46:59 -05:00
Brian Goff
ba797dd6a2 Close resp body on plugin call error
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 93ad9c31fc)
2016-03-07 14:46:54 -05:00
Lei Jitang
3772dad6e9 Fix exec start api with detach and AttachStdin at same time. fixes #20638
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit fb0ac1afd9)
2016-03-07 14:46:48 -05:00
Maxim Ivanov
84596366c2 Fix libdevmapper deferred removal detection
When linking, position of `-l` flags is important since
they muse come _after_ any object files which uses symbols
from a specified library, that is due to --as-needed binutils
ld flag enabled by default

Signed-off-by: Maxim Ivanov <ivanov.maxim@gmail.com>
(cherry picked from commit 24152a4231)
2016-03-07 14:46:30 -05:00
Tibor Vass
9a633164c0 Bump version to 1.10.3
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-07 14:37:21 -05:00
Tibor Vass
c3959b140f Merge pull request #20526 from tiborvass/1.10.2-cherrypicks
1.10.2 cherrypicks
2016-02-19 22:45:26 -05:00
Tibor Vass
7613ee933c Update CHANGELOG for 1.10.2
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-19 20:03:51 -05:00
David Calavera
1882f96fac Avoid setting default truthy values from flags that are not set.
When the value for a configuration option in the file is `false`,
and the default value for a flag is `true`, we should not
take the value from the later as final value for the option,
because the user explicitly set `false`.

This change overrides the default value in the flagSet with
the value in the configuration file so we get the correct
result when we merge the two configurations together.

Signed-off-by: David Calavera <david.calavera@gmail.com>
(cherry picked from commit 31cb96dcfa)
2016-02-19 20:02:47 -05:00
Tibor Vass
e87914a61f Merge pull request #20522 from LK4D4/do_not_close_chan
filenotify: don't close channels to avoid panic
2016-02-19 19:56:27 -05:00
Phil Estes
b756d5922c Fix copy chown settings to not default to real root
This corrects `docker cp` behavior when user namespaces are enabled.
Instead of chown'ing copied-in files to real root (0,0), the code
queries for the remapped root uid & gid and sets the chown option
properly.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)

(cherry picked from commit 40be5dba47)
2016-02-19 19:46:56 -05:00
Tibor Vass
1bfaf317a9 Merge pull request #20523 from cyli/vendor-notary-version-for-docker-1.10.2
Bump the notary version to one that fixes a bug with delegation path traversal
2016-02-19 19:36:29 -05:00
Tibor Vass
7e8b645077 Merge pull request #20518 from crosbymichael/bump-libcontainer-feb19
Bump libcontainer to 27dd48f6919a9bf8c25b41e97ca12
2016-02-19 19:35:52 -05:00
cyli
97b66d5b97 Bump the notary version to one that fixes a bug with delegation path traversal
Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-02-19 15:09:56 -08:00
Alexander Morozov
2251e5db3f filenotify: don't close channels to avoid panic
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-02-19 14:37:33 -08:00
Tonis Tiigi
9d2cd50708 Fix releasing reference on deletion error
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 64530c8e47)
2016-02-19 17:04:05 -05:00
Michael Crosby
9ef2e9d05c Bump libcontainer to 27dd48f6919a9bf8c25b41e97ca12
This includes the fix for moving the process out of the name=systemd
cgroup so that systemd does not delete the container's cgroups when its
configuration is reloaded.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-02-19 13:28:46 -08:00
Jess Frazelle
664c2f6639 Merge pull request #20510 from sanimej/102
Vendoring libnetwork v0.6.2-rc.1 to v1.10.2 branch
2016-02-19 13:39:33 -07:00
Aaron Lehmann
9032ad50c6 Close tarsplit gzip writer when creating tar-split.json.gz files during layer migration
There is a missing call to Close on the gzip.Writer that is used to
compress newly created tar-split files during layer migration. This can
result in corrupt tar-split files that later cause docker push and
docker save to fail. The Close call is necessary to flush buffered data
to the stream.

Fixes: #20104

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 1c05c65f6f)
2016-02-19 15:06:44 -05:00
Zhang Wei
4112eeb2cd Fix docs
Fix wrong descriptions in docs

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
(cherry picked from commit 899335022f)
2016-02-19 15:06:26 -05:00
Brian Goff
7ad7f263d7 Fix issue with multiple volume refs with same name
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 0fe31306d1)
2016-02-19 15:06:09 -05:00
Tonis Tiigi
77f94fd3c5 Fix migration diffid atomic write
Fixes #20267

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 056013f97b)
2016-02-19 15:06:01 -05:00
Tonis Tiigi
64368c438a Fix docker import on compressed data
Fixes #20296

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e1c2eb0d35)
2016-02-19 15:05:49 -05:00
Dan Walsh
f844fa64e6 /dev/mqueue should never be mounted readonly
If user specifies --read-only flag it should not effect /dev/mqueue.
This is causing SELinux issues in docker-1.10.  --read-only blows up
on SELinux enabled machines.  Mounting /dev/mqueue read/only would also
blow up any tool that was going to use /dev/mqueue.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
(cherry picked from commit adb2e3fedc)
2016-02-19 15:05:26 -05:00
Tibor Vass
89e4ea0cd2 Bump version to 1.10.2
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-19 10:57:14 -05:00
Santhosh Manohar
512b0b7e6d Vendoring libnetwork v0.6.2-rc.1 to v1.10.2 branch
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-02-17 00:51:36 -08:00
Santhosh Manohar
ba00d454e4 IT case for sending invalid query to embedded DNS server
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-02-17 00:47:21 -08:00
Tibor Vass
9e83765d0f Merge pull request #20238 from tiborvass/fix-1.10.1-changelog
Correct 1.10.1 CHANGELOG
2016-02-11 13:45:56 -05:00
Tibor Vass
b71c4680b3 Merge pull request #20235 from mavenugo/v1.10.1
vendor libnetwork v0.6.1-rc3
2016-02-11 13:33:38 -05:00
Madhu Venugopal
484b451a3d vendor libnetwork v0.6.1-rc3
- fixes https://github.com/docker/docker/issues/20140

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-02-11 10:31:08 -08:00
Tibor Vass
ce4f13f604 Correct 1.10.1 CHANGELOG
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-11 13:27:22 -05:00
Arnaud Porterie
6ab0256048 Merge pull request #20195 from tiborvass/1.10.1-cherrypicks
1.10.1 cherrypicks
2016-02-10 11:36:28 -08:00
Tibor Vass
f1cd0cabba Update CHANGELOG for 1.10.1
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-10 13:05:41 -05:00
Madhu Venugopal
8f78ba9e06 Vendor libnetwork v0.6.1-rc2
- Fixes #20132 #20140 #20019

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 84705f15d9)

From PR #20181
2016-02-10 13:05:41 -05:00
Jessica Frazelle
14c2baad6e remove tasksmax, people on newer kernels can add it themselves
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
(cherry picked from commit 6241250824)

From PR #20167
2016-02-10 13:05:41 -05:00
Vincent Demeester
bba374fae5 Fix the since and before filter behavior
Filters should not include stopped container if `-a` is not specified.
Right now, before and since filter are acting as --before and --since
deprecated flags. This commit is fixing that.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit b41dba58a0)

From PR #20135
2016-02-10 13:05:41 -05:00
Tibor Vass
d6e7dc791f Add runSleepingContainer in integration-cli
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-02-10 13:05:40 -05:00
Kenfe-Mickael Laventure
85dba4980e Disable TestRunMountshmmqueuefromhost when using userns
Since we now automatically mount the mqueue device inside the
container (instead of bind mounting the one from the host), when
trying to start a container with --ipc=host, the mount will fail with
EPERM.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit dba5a7f243)

From PR #20133
2016-02-10 12:58:27 -05:00
Kenfe-Mickael Laventure
b4963c87b2 Prevent mqueue from implicitely becoming a bind mount with --ipc=host
Currently, when running a container with --ipc=host, if /dev/mqueue is
a standard directory on the hos the daemon will bind mount it allowing
the container to create/modify files on the host.

This commit forces /dev/mqueue to always be of type mqueue except when
the user explicitely requested something to be bind mounted to
/dev/mqueue.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit f7d4abdc00)

From PR #20133
2016-02-10 12:58:27 -05:00
Liron Levin
f875caf6bf Fix 19575: Docker events doesn't work with authorization plugin
To support the requirement of blocking the request after the daemon
responded the authorization plugin use a `response recorder` that replay
the response after the flow ends.

This commit adds support for commands that hijack the connection and
flushes data via the http.Flusher interface. This resolves the error
with the event endpoint.

Signed-off-by: Liron Levin <liron@twistlock.com>
(cherry picked from commit 5ffc810df2)

From PR #20002
2016-02-10 12:58:27 -05:00
David Calavera
6234588d72 Fix channel closing race in event tests.
Divide event matching into two functions, a matcher and
a processor. That way, the error handling doesn't call
the channel closing logic at all.

Signed-off-by: David Calavera <david.calavera@gmail.com>
(cherry picked from commit 27b060492c)

From PR #19519
2016-02-10 12:58:22 -05:00
Stephen Rust
0bc432802d Fix volume driver API compatibility mode (a little)
Signed-off-by: Stephen Rust <srust@blockbridge.com>
(cherry picked from commit c3985bdf79)

From PR #19983
2016-02-10 11:30:07 -05:00