Commit graph

3262 commits

Author SHA1 Message Date
Antonio Murdaca
5a9a435d40 Merge pull request #20290 from calavera/fix_stop_signal_merge
Inherit StopSignal from Dockerfile.
2016-02-13 09:26:11 +01:00
Jess Frazelle
79edcc5172 Merge pull request #20198 from cpuguy83/check_drivers_b4_vol_create
Check drivers before vol create
2016-02-12 18:41:48 -05:00
David Calavera
a252516ec1 Inherit StopSignal from Dockerfile.
Make sure the image configuration is not overriden by the default
value in the `create` flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-12 17:56:40 -05:00
Victor Vieux
99a396902f fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-02-11 15:49:36 -08:00
Aidan Hobson Sayers
dfb00652aa Expose bridge IPv6 setting to docker network inspect
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
2016-02-11 22:13:47 +00:00
David Calavera
803e3d4d1e Merge pull request #20230 from estesp/zfs-ref-counting
Add proper refcounting to zfs graphdriver
2016-02-11 08:27:26 -08:00
Phil Estes
922986b76e Add proper refcounting to zfs graphdriver
Fixes issues with layer remounting (e.g. a running container which then
has `docker cp` used to copy files in or out) by applying the same
refcounting implementation that exists in other graphdrivers like
overlay and aufs.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-02-11 01:00:54 -05:00
Brian Goff
00ec6102d9 Probe all drivers if volume driver not specified
This fixes an issue where `docker run -v foo:/bar --volume-driver
<remote driver>` -> daemon restart -> `docker run -v foo:/bar` would
make a `local` volume after the restart instead of using the existing
volume from the remote driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-10 20:43:15 -05:00
David Calavera
dfebb6074f Merge pull request #20210 from Microsoft/jjh/hcswin32-v2
Windows: Revendor HCS to use revised error scheme
2016-02-10 17:20:14 -08:00
John Howard
54263a9393 Windows: Use new error code mechanism from HCS
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-10 14:48:24 -08:00
John Howard
d4b0732499 Windows: Fix 'isolation'
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-10 13:19:19 -08:00
Alexander Morozov
2658341b5f Merge pull request #20205 from calavera/remove_last_daemon_references
Remove daemon dependency from api/server.
2016-02-10 13:13:53 -08:00
David Calavera
1af76ef597 Remove daemon dependency from api/server.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-10 15:16:59 -05:00
John Howard
7853193edb Windows CI: Another reliability fix
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-10 11:07:29 -08:00
Tibor Vass
61efb4d084 Merge pull request #20135 from vdemeester/20087-fix-since-before-filters
Fix the since and before filter behavior
2016-02-09 21:13:00 -05:00
Tibor Vass
0b4a7fb06d Merge pull request #20133 from mlaventure/dont-bind-mount-mqueue
Prevent mqueue from implicitely becoming a bind mount with --ipc=host
2016-02-09 19:55:57 -05:00
Kenfe-Mickael Laventure
f7d4abdc00 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>
2016-02-09 14:16:08 -08:00
Brian Goff
a77b7dd227 cleanup attach api calls
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-09 14:26:51 -05:00
Brian Goff
ae4ee974e8 Move stream flushes to backend
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-02-09 14:25:02 -05:00
Vincent Demeester
b41dba58a0 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>
2016-02-09 09:26:20 +01:00
Stefan J. Wernli
041a9510c6 Fixing 'docker save' on Windows.
Save was failing file integrity checksums due to bugs in both
Windows and Docker. This commit includes fixes to file time handling
in tarexport and system.chtimes that are necessary along with
the Windows platform fixes to correctly support save. With this
change, sysfile_backups for windowsfilter driver are no longer
needed, so that code is removed.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-02-08 18:08:49 -08:00
Tibor Vass
8c6887c54d Merge pull request #19772 from calavera/decouple-server-routers
[Carry 19133] Decouple server routers from the daemon package.
2016-02-08 17:54:49 -05:00
Tibor Vass
54b67fe12f Merge pull request #19711 from coolljt0725/fix_19679
Clean up container rootf mounts on daemon start, fixes #19679
2016-02-08 16:21:50 -05:00
David Calavera
06d8f504f7 Move backend types to their own package.
- Remove duplicated structs that we already have in engine-api.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-08 12:42:17 -05:00
Lukas Waslowski
dd93571c69 Decouple the "container" router from the actual daemon implementation.
This is done by moving the following types to api/types/config.go:
  - ContainersConfig
  - ContainerAttachWithLogsConfig
  - ContainerWsAttachWithLogsConfig
  - ContainerLogsConfig
  - ContainerStatsConfig

Remove dependency on "version" package from types.ContainerStatsConfig.
Decouple the "container" router from the "daemon/exec" implementation.

* This is done by making daemon.ContainerExecInspect() return an interface{}
value. The same trick is already used by daemon.ContainerInspect().

Improve documentation for router packages.
Extract localRoute and router into separate files.
Move local.router to image.imageRouter.

Changes:
  - Move local/image.go to image/image_routes.go.
  - Move local/local.go to image/image.go
  - Rename router to imageRouter.
  - Simplify imports for image/image.go (remove alias for router package).

Merge router/local package into router package.
Decouple the "image" router from the actual daemon implementation.
Add Daemon.GetNetworkByID and Daemon.GetNetworkByName.
Decouple the "network" router from the actual daemon implementation.

This is done by replacing the daemon.NetworkByName constant with
an explicit GetNetworkByName method.

Remove the unused Daemon.GetNetwork method and the associated constants NetworkByID and NetworkByName.

Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-08 11:30:57 -05:00
Jess Frazelle
e6573a5d18 Merge pull request #19876 from rhatdan/mqueue
Make mqueue container specific
2016-02-08 10:57:15 -05:00
Alexander Morozov
415dd86886 Merge pull request #20078 from cpuguy83/carry_17329
Carry 17329
2016-02-07 08:59:36 -08:00
David Calavera
a93cb2b856 Merge pull request #20045 from estesp/zfs-userns-permissions-fix
Fix ZFS permissions bug with user namespaces
2016-02-05 15:32:43 -08:00
Brian Goff
25941b5020 Merge pull request #20003 from liubogithub/btrfs
Graphdriver/btrfs: Avoid using single d.Get()
2016-02-05 16:35:12 -05:00
Phil Estes
aef0995b02 Fix ZFS permissions bug with user namespaces
Fix root directory of the mountpoint being owned by real root. This is
unique to ZFS because of the way file mountpoints are created using the
ZFS tooling, and the remapping that happens at layer unpack doesn't
impact this root (already created) holding directory for the layer.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-02-05 14:37:33 -05:00
Dan Walsh
ba38d58659 Make mqueue container specific
mqueue can not be mounted on the host os and then shared into the container.
There is only one mqueue per mount namespace, so current code ends up leaking
the /dev/mqueue from the host into ALL containers.  Since SELinux changes the
label of the mqueue, only the last container is able to use the mqueue, all
other containers will get a permission denied.  If you don't have SELinux protections
sharing of the /dev/mqueue allows one container to interact in potentially hostile
ways with other containers.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-02-05 16:50:35 +01:00
Lei Jitang
fae09e2569 Add progress bar to docker load
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-05 02:24:23 -05:00
Liu Bo
b2e27fee53 Graphdriver/btrfs: Avoid using single d.Get()
For btrfs driver, in d.Create(), Get() of parentDir is called but not followed
by Put().

If we apply SElinux mount label, we need to mount btrfs subvolumes in d.Get(),
without a Put() would end up with a later Remove() failure on
"Device resourse is busy".

This calls the subvolume helper function directly in d.Create().

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
2016-02-04 10:25:24 -08:00
Zhang Wei
3c0a91d227 Fix error for restarting container
Fix error message for `--net container:b` and `--ipc container:b`,
container `b` is a restarting container.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-02-04 20:14:50 +08:00
Lei Jitang
af614a19dc Clean up container rootf mounts on daemon start fixes #19679
When the daemon shutdown ungracefully, it will left the running
containers' rootfs still be mounted. This will cause some error
when trying to remove the containers.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-03 20:52:32 -05:00
Jess Frazelle
dcde68b955 Merge pull request #19952 from WeiZhang555/fix-err-restarting-1
Fix error message for pause a restarting container
2016-02-03 17:34:19 -08:00
Jess Frazelle
e74c07b947 Merge pull request #19980 from tonistiigi/fix-microsoft-vendor-dir
Remove case sensitive duplicate dir in vendor
2016-02-03 17:32:14 -08:00
Jess Frazelle
fdcce4ac03 Merge pull request #19942 from LK4D4/fix_vet_errors
Fix minor vet warnings
2016-02-03 13:31:11 -08:00
Tonis Tiigi
b9a395c85d Remove case sensitive duplicate dir in vendor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-02-03 13:06:32 -08:00
Alexander Morozov
3b80b1947c Merge pull request #19943 from aboch/ec
Store endpoint config on network connect to a stopped container
2016-02-03 11:06:35 -08:00
Alexander Morozov
28a7577a02 Merge pull request #19959 from WeiZhang555/fix-cli-print-err
Remove redundant error message
2016-02-03 10:56:19 -08:00
Alexander Morozov
7a20a270bc Fix minor vet warnings
Also use Asserts where it's possible.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-02-03 10:43:01 -08:00
Phil Estes
b2c162a0b3 Merge pull request #19966 from twistlock/user_namespace__unnecessary_text_in_error
user namespaces: duplicate dot in user namespaces error message
2016-02-03 12:51:51 -05:00
Vincent Demeester
98c4f0bbc3 Merge pull request #18966 from mariusGundersen/machine-readable-state
Expose the machine readable state of a container when listing containers
2016-02-03 16:41:45 +01:00
Liron Levin
858f852da4 user namespaces: duplicate dot in user namespaces error message
duplicate dot in user namespaces error message:

$ docker run -ti --net=host ubuntu /bin/bash
docker: Error response from daemon: Cannot share the host or a
container's network namespace when user namespaces are enabled..

Signed-off-by: Liron Levin <liron@twistlock.com>
2016-02-03 16:56:34 +02:00
Sebastiaan van Stijn
f37e10aee3 Merge pull request #19961 from coolljt0725/check_nil
1.10.0-rc3: Check nil before set resource.OomKillDisable
2016-02-03 14:52:18 +01:00
Zhang Wei
2c63ac3a97 Fix error message for pause a restarting container
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-02-03 21:20:27 +08:00
Sebastiaan van Stijn
b75d0929b1 Merge pull request #19914 from coolljt0725/fix_top_restart
Fix docker top a restarting container
2016-02-03 11:28:10 +01:00
Lei Jitang
09a33b5f60 Check nil before set resource.OomKillDisable
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-03 04:31:00 -05:00
Zhang Wei
894266c1bb Remove redundant error message
Currently some commands including `kill`, `pause`, `restart`, `rm`,
`rmi`, `stop`, `unpause`, `udpate`, `wait` will print a lot of error
message on client side, with a lot of redundant messages, this commit is
trying to remove the unuseful and redundant information for user.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-02-03 15:45:20 +08:00
Lei Jitang
5566ccb7aa Fix docker top a restarting container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-02-02 21:05:01 -05:00
John Howard
55268f4e91 Windows: Turn off stats
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-02 17:59:11 -08:00
Alessandro Boch
9b63e4e7f5 Store endpoint config on network connect to a stopped container
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-02 17:25:44 -08:00
Alexander Morozov
c2bf90eb59 Merge pull request #19935 from Microsoft/jjh/onemorereliabilityhack
Windows CI: One more reliability hack
2016-02-02 16:49:29 -08:00
Alexander Morozov
83ee24e52b Merge pull request #19911 from Microsoft/jstarks/npipe
Windows: Add support for named pipe protocol
2016-02-02 15:59:45 -08:00
John Howard
14c53160d7 Windows CI: One more reliability hack
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-02 13:15:35 -08:00
Tibor Vass
b6a6ed7200 Merge pull request #19932 from calavera/fix_config_validation
Make sure flat options are not parsed as config structures.
2016-02-02 15:36:25 -05:00
David Calavera
b6766e3063 Make sure flat options are not parsed as config structures.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-02 14:45:37 -05:00
John Howard
6f0831930f Windows CI: Re-do TP4 CI reliability hack
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-02 09:36:18 -08:00
Arnaud Porterie
4f37e14e9c Merge pull request #18362 from runcom/tunable-SetMaxThreads
daemon_unix: set golang runtime max threads
2016-02-02 08:36:28 -08:00
Vincent Demeester
2b56501480 Merge pull request #19909 from Microsoft/jjh/testunit-daemon
Windows CI: Fix test-unit for daemon
2016-02-02 16:18:02 +01:00
John Howard
42f2621b0e Windows CI: Fix test-unit for daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-01 20:40:57 -08:00
John Starks
0906195fbb Windows: Add support for named pipe protocol
This adds an npipe protocol option for Windows hosts, akin to unix
sockets for Linux hosts. This should become the default transport
for Windows, but this change does not yet do that.

It also does not add support for the client side yet since that
code is in engine-api, which will have to be revendored separately.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-02-01 19:46:30 -08:00
Brian Goff
a39ad952ec Merge pull request #19889 from Microsoft/jjh/reliabilitytake2
Windows CI: TP4 reliability hack
2016-02-01 22:30:51 -05:00
John Howard
2ebcb48cf1 Windows CI: TP4 reliability hack
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-02-01 18:02:57 -08:00
Fangyuan Gao
5d07d83ee0 remove the unused Info interface in daemon/execdriver/driver.go and related code
Signed-off-by: Fangyuan Gao <21551127@zju.edu.cn>
2016-02-02 09:04:52 +08:00
David Calavera
85475f7dea Merge pull request #19794 from calavera/14358-disable-colors
[Carry 18621] Allow disabling of colored Docker logs via daemon flag.
2016-02-01 15:37:44 -08:00
Vincent Woo
87a450a37f Allow disabling of colored Docker logs via daemon flag.
Signed-off-by: Vincent Woo <me@vincentwoo.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-01 16:19:18 -05:00
Anusha Ragunathan
9c332b164f Remove package daemonbuilder.
Currently, daemonbuilder package (part of daemon) implemented the
builder backend. However, it was a very thin wrapper around daemon
methods and caused an implementation dependency for api/server build
endpoint. api/server buildrouter should only know about the backend
implementing the /build API endpoint.

Removing daemonbuilder involved moving build specific methods to
respective files in the daemon, where they fit naturally.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-02-01 09:57:38 -08:00
Kai Qiang Wu(Kennan)
feda5d7684 Make btrfs call same interface as others
Most storage drivers call graphdriver.GetFSMagic(home),
it is more clean to easy to maintain. So btrfs need to
adopt such change.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-02-01 07:50:21 +00:00
Marius Gundersen
2ed72a5d93 Expose the machine readable state of a container when listing containers
Updated documentation to reflect the new State property in the inspect remote api

Updated API changes for 1.23

Signed-off-by: Marius Gundersen <me@mariusgundersen.net>
2016-01-31 18:40:37 +01:00
Antonio Murdaca
140a74347d daemon_unix: set golang runtime max threads
SetMaxThreads from runtime/debug in Golang is called to set max threads
value to 90% of /proc/sys/kernel/threads-max

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-30 21:37:24 +01:00
Arnaud Porterie
46018c3cee Merge pull request #19837 from cpuguy83/carry_19085
Carry 19085 -- Improve & cleanup documentation comments
2016-01-29 14:30:25 -08:00
Brian Goff
9c09a79ba5 update doc string
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-29 15:25:25 -05:00
Joey Geiger
318b4f0b5f Fix typos in create.go
There were a few spelling issues that I noticed when reading about shared mounts.

Signed-off-by: jgeiger <joey.geiger@irco.com>
2016-01-28 14:08:11 -07:00
Vincent Demeester
36b5e63179 Merge pull request #19773 from coolljt0725/fix_message
Correct the info message when stop container
2016-01-28 08:29:42 +01:00
David Calavera
7a016578db Merge pull request #18041 from jnummelin/feature/fluent-logger-ignore-connect-error-flag
Added flag to ignore fluentd connect error on container start
2016-01-27 14:25:24 -08:00
Brian Goff
f4e5eb3f86 Merge pull request #19775 from coolljt0725/fix_prepare_mount
daemon: don't prepare mountpoint for restart container
2016-01-27 16:11:12 -05:00
Ivan Babrou
5a3351883b Add tag support to journald logging driver, closes #19556
Signed-off-by: Ivan Babrou <ibobrik@gmail.com>
2016-01-27 10:52:19 +00:00
Lei Jitang
6716a3a167 Correct the info message when stop container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-27 03:06:45 -05:00
Lei Jitang
0feeab2e43 daemon: don't prepare mountpoint for restart container
The restart container has already prepared the mountpoint, there is
no need to do that again. This can speed up the daemon start if
the restart container has a volume and the volume driver is not
available.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-27 02:43:40 -05:00
Jussi Nummelin
3cf82ff1ab Added flag to ignore fluentd connect error on container start
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>

Changed buffer size to 1M and removed unnecessary fmt call

Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>

Updated docs for the new fluentd opts

Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>
2016-01-27 09:05:44 +02:00
David Calavera
63f8429bf0 Merge pull request #19717 from coolljt0725/fix_load
Daemon: do GetRWLayer after checking if container support the current graph driver
2016-01-26 21:55:32 -08:00
Lei Jitang
0ae94303b8 Merge pull request #19722 from WeiZhang555/exec-restarting
Forbid exec a restarting container
2016-01-27 11:43:43 +08:00
Arnaud Porterie
70c5e96cb8 Merge pull request #19604 from Microsoft/jjh/testrename
Windows CI: Fix TestRename*
2016-01-26 19:03:31 -08:00
Zhang Wei
1d2208fed9 Forbid exec a restarting container
Currently if we exec a restarting container, client will fail silently,
and daemon will print error that container can't be found which is not a
very meaningful prompt to user.

This commit will stop user from exec a restarting container and gives
more explicit error message.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-01-27 10:05:06 +08:00
Lei Jitang
899f1b1870 Daemon: do GetRWLayer after checking if container use the current graph driver
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-26 20:20:30 -05:00
Tibor Vass
7992b353c0 Merge pull request #19737 from calavera/fix_reload_docs
Remove cluster storage advertise from reload.
2016-01-26 17:04:46 -08:00
Arnaud Porterie
3a70ab3a2c Merge pull request #19688 from crosbymichael/tmpfs-tar
Remove tar copy-up for tmpfs mounts
2016-01-26 17:03:07 -08:00
David Calavera
fa163f5619 Remove cluster storage advertise from reload.
Because libnetwork won't really send container information to the new
storage anyways.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-26 18:19:30 -05:00
Brian Goff
146e49b039 Merge pull request #19671 from calavera/volume-dangling
Make volume dangling filter return only used volumes with `dangling=false`.
2016-01-26 17:01:20 -05:00
Michael Crosby
ae8ec4860e Move tar copy-up for tmpfs mounts
We cannot rely on the tar command for this type of operation because tar
versions, flags, and functionality can very from distro to distro.
Since this is in the container execution path it is not safe to have
this as a dependency from dockers POV where the user cannot change the
fact that docker is adding these pre and post mount commands.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-01-26 14:00:39 -08:00
Brian Goff
b775efc9bc Merge pull request #19704 from cpuguy83/speedup_build_cache
Use imageStore.Children instead of whole the Map
2016-01-26 16:59:55 -05:00
Brian Goff
1350e8b7b8 Use imageStore.Children instead of whole the Map
daemon cache was getting the whole image map and then iterating through
it to find children. This information is already stored in the image
store.

Prior to this change building the docker repo with a full cache took 30
seconds.
After it takes between 15 seconds or less (As low as 9 seconds).
This is an improvement on docker 1.9.1 which hovered around 17 seconds.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-26 14:12:56 -05:00
Arnaud Porterie
269a6d7d36 Merge pull request #19705 from mavenugo/18222
Vendor libnetwork v0.6.0-rc4 & corresponding changes in engine for port-map sandobx handling.
2016-01-26 09:16:57 -08:00
Aleksa Sarai
4357ed4a73 *: purge dockerinit from source code
dockerinit has been around for a very long time. It was originally used
as a way for us to do configuration for LXC containers once the
container had started. LXC is no longer supported, and /.dockerinit has
been dead code for quite a while. This removes all code and references
in code to dockerinit.

Signed-off-by: Aleksa Sarai <asarai@suse.com>
2016-01-26 23:47:02 +11:00
Madhu Venugopal
e38463b277 Move port-mapping ownership closer to Sandbox (from Endpoint)
https://github.com/docker/libnetwork/pull/810 provides the more complete
solution for moving the Port-mapping ownership away from endpoint and
into Sandbox. But, this PR makes the best use of existing libnetwork
design and get a step closer to the gaol.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-26 03:59:03 -08:00
Vincent Demeester
141a301dca Merge pull request #19154 from hqhq/hq_verify_cgroupparent
Verify cgroup-parent name for systemd cgroup
2016-01-26 11:44:31 +01:00
Antonio Murdaca
1f2917602e Merge pull request #19103 from vdemeester/events-with-attributes
Add the possibility to log event with specific attributes
2016-01-26 11:01:23 +01:00
Tibor Vass
07e2dedecb Merge pull request #19057 from dnephin/remove_version_from_registry_pkg
Remove dockerversion from registry package
2016-01-25 22:45:06 -08:00
Arnaud Porterie
c5380f9118 Merge pull request #19468 from jfrazelle/refactor-sec-profiles-into-own-pkg
Refactor sec profiles their own packages
2016-01-25 22:18:56 -08:00
Sebastiaan van Stijn
5b0183e91c Merge pull request #19683 from calavera/network_config_file
Allow network configuration via daemon config file.
2016-01-25 18:59:20 -08:00
Tibor Vass
58c2488d07 Merge pull request #19568 from cpuguy83/17907_fix_rmv
On container rm, don't remove named mountpoints
2016-01-25 18:13:57 -08:00
Tibor Vass
2cb8fdd327 Merge pull request #19673 from aboch/epcs
Save endpoint config only if endpoint creation succeeds
2016-01-25 16:50:47 -08:00
David Calavera
d4ccd948e9 Merge pull request #19676 from cpuguy83/19672_fix_force_rm
Fix removing mountpoints on container rm fail
2016-01-25 16:44:25 -08:00
David Calavera
c539be8833 Allow network configuration via daemon config file.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-25 18:54:56 -05:00
Tibor Vass
f7abff4f81 Merge pull request #19560 from aboch/mn
Reject multiple networks on container creation request
2016-01-25 14:57:51 -08:00
Alessandro Boch
733245b2e7 Save endpoint config only if endpoint creation succeeds
- Currently it is being save upfront...

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-25 13:43:32 -08:00
David Calavera
1431b623a4 Make volume dangling filter return only used volumes with dangling=false.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-25 16:26:51 -05:00
Brian Goff
dd7d1c8a02 On container rm, don't remove named mountpoints
This makes it so when calling `docker run --rm`, or `docker rm -v`, only
volumes specified without a name, e.g. `docker run -v /foo` instead of
`docker run -v awesome:/foo` are removed.

Note that all volumes are named, some are named by the user, some get a
generated name. This is specifically about how the volume was specified
on `run`, assuming that if the user specified it with a name they expect
it to persist after the container is cleaned up.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-25 15:51:28 -05:00
Alessandro Boch
cfa515fd9d Reject multiple networks on container creation
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-25 12:50:01 -08:00
Brian Goff
0eed34755e Fix removing mountpoints on container rm fail
Ensure that the the container's mountpoints are cleaned up if the
container is force removed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-25 15:49:56 -05:00
Tonis Tiigi
8a68315c38 Fix error message in container creation
Error message was different if image was specified with the full ID.

Fixes #19652

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-25 11:45:20 -08:00
John Howard
f21fb2162e Windows CI: Fix TestRename*
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-01-23 09:25:10 -08:00
Phil Estes
67d86d10d8 Merge pull request #19216 from scaleoutsean/master
Add GPFS filesystem IDs
2016-01-22 21:27:03 -05:00
Qiang Huang
5ce5a8e966 Verify cgroup-parent name for systemd cgroup
Fixes: #17126

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-01-22 21:17:23 -05:00
David Calavera
422827fa92 Merge pull request #19527 from aboch/epc
Move Unsupp Network & IP check to the new updateNetworkConfig() func
2016-01-22 15:54:21 -08:00
Brian Goff
455a505749 Merge pull request #19190 from srust/volume_driver_parity_again
Allow external volume drivers to host anonymous volumes again
2016-01-22 15:53:06 -05:00
Phil Estes
34a83f9f2c Merge pull request #19517 from calavera/validate_config_keys
Verify that the configuration keys in the file are valid.
2016-01-22 15:01:29 -05:00
David Calavera
5e80ac0dd1 Make TLSOptions and LogConfig embedded structs.
That way the configuration file becomes flag, without extra keys.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-22 13:20:17 -05:00
scaleoutsean
bdc8241da9 Add GPFS
Signed-off-by: Sean Lee <seanlee@tw.ibm.com>
2016-01-22 21:12:47 +08:00
Vincent Demeester
c91045a78b Merge pull request #19558 from LK4D4/reduce_cgroup_parsing
Refactor sysinfo usage
2016-01-22 11:18:53 +01:00
Jessica Frazelle
bed0bb7d01
move default seccomp profile into package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-21 16:55:29 -08:00
Jessica Frazelle
35e50119fc
move default apparmor policy into package
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-21 16:55:27 -08:00
Phil Estes
3233f45609 Merge pull request #19263 from jfrazelle/update-aa-parser
refactor aaparser pkg, add unit tests
2016-01-21 19:40:53 -05:00
Brian Goff
9ae51b3e0f Merge pull request #19383 from calavera/container_store
Extract container store from the daemon.
2016-01-21 17:20:47 -05:00
David Calavera
ed4038676f Verify that the configuration keys in the file are valid.
- Return an error if any of the keys don't match valid flags.
- Fix an issue ignoring merged values as named values.
- Fix tlsverify configuration key.
- Fix bug in mflag to avoid panics when one of the flag set doesn't have any flag.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-21 16:56:12 -05:00
Tibor Vass
d2448a0c20 Merge pull request #19524 from LK4D4/iocopy_writeto
Use bufio.Reader in io.Copy source for overlay.copyRegular
2016-01-21 15:37:12 -05:00
Alessandro Boch
3b0d36dbc1 Move ErrUnsupportedNetwork* checks to updateNetworkConfig() func
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-21 10:56:01 -08:00
Alexander Morozov
3f5e1c69b3 Use pools.Copy instead of io.Copy for overlay.copyRegular
That function is pretty heavy used on container start. Autoallocating
buffer can be painful.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-21 08:53:37 -08:00
Tonis Tiigi
98d0997894 Revert "Copy aufs hardlinks to top layer"
This reverts commit ef05b83417.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-21 07:52:50 -08:00
Tibor Vass
757d686700 Merge pull request #19500 from cpuguy83/fix_loading_with_containerized_plugins
Fix loading with containerized plugins
2016-01-21 08:57:01 -05:00
Vincent Demeester
476edba011 Merge pull request #19483 from coolljt0725/fix_19477
Fix #19477, clean up the ports when release network
2016-01-21 14:29:29 +01:00
Lei Jitang
6025517b68 Fix #19477, clean up the ports when release network
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-20 20:09:11 -05:00
Alexander Morozov
22ebeede30 Reuse *sysinfo.SysInfo instance in verification
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-20 17:08:10 -08:00
David Calavera
ee001d87a9 Merge pull request #19514 from cpuguy83/19444_fix_links_with_same_name
Don't error out when link name in use.
2016-01-20 15:21:58 -08:00
Brian Goff
332d95fd0d Don't error out when link name in use.
This preserves old behavior from sqlite links/names.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-20 16:40:56 -05:00
Tibor Vass
2705fa573b Merge pull request #19457 from calavera/post_config_verification
Fix post config verification without flags.
2016-01-20 14:49:32 -05:00
David Calavera
cd3446972e Fix post config verification without flags.
- Set the daemon log level to what's set in the configuration.
- Enable TLS when TLSVerify is enabled.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-20 13:01:07 -05:00
David Calavera
fd79462af3 Merge pull request #19044 from HackToday/18890-validate-volume
Fix volume filter validation
2016-01-20 09:56:30 -08:00
Brian Goff
d85b9f8580 Fix loading of containerized plugins
During daemon startup, all containers are registered before any are
started.
During container registration it was calling out to initialize volumes.
If the volume uses a plugin that is running in a container, this will
cause the restart of that container to fail since the plugin is not yet
running.
This also slowed down daemon startup since volume initialization was
happening sequentially, which can be slow (and is flat out slow since
initialization would fail but take 8 seconds for each volume to do it).

This fix holds off on volume initialization until after containers are
restarted and does the initialization in parallel.

The containers that are restarted will have thier volumes initialized
because they are being started. If any of these containers are using a
plugin they will just keep retrying to reach the plugin (up to the
timeout, which is 8seconds) until the container with the plugin is up
and running.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-20 12:23:17 -05:00
Pei Su
e5e62b96ce Fix race condition in execCommandGC
`daemon.execCommandGC`
The daemon object (grep execCommandGC) iterate over a map
(grep execCommands.Commands) in a goroutine.
Lock can't protect concurrency access in this case.
Exec command storage object should return a copy of commands instead.

Signed-off-by: Pei Su <sillyousu@gmail.com>
2016-01-20 12:52:05 +08:00
David Calavera
3c82fad441 Extract container store from the daemon.
- Generalize in an interface.
- Stop abusing of List for everything.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-19 13:21:41 -05:00
Tibor Vass
30e42a2799 Merge pull request #19432 from jfrazelle/fix-x32
add send, recv, and x32 so we can install i386 pkgs on amd64
2016-01-19 10:20:01 -05:00
Jessica Frazelle
308eff99e8
add send, recv, and x32 so we can install i386 pkgs on amd64
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-18 19:24:01 -08:00
Madhu Venugopal
35dbce109b nil ptr check for endpointsettings when used with older clients
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-18 17:15:59 -08:00
Antonio Murdaca
a495c148a5 Merge pull request #19414 from anusha-ragunathan/postBuild
Make daemonbuilder.Docker leaner.
2016-01-18 21:46:49 +01:00
Brian Goff
3044a08326 Merge pull request #19372 from cloudflare/fix-log-copier
only close LogDriver after LogCopier is done
2016-01-18 14:38:34 -05:00
Daniel Dao
84e14754e1 only close LogDriver after LogCopier is done
this prevents the copier from sending messages in the buffer to the closed
driver. If the copied took longer than the timeout to drain the buffer, this
aborts the copier read loop and return back so we can cleanup resources
properly.

Signed-off-by: Daniel Dao <dqminh@cloudflare.com>
2016-01-18 17:47:57 +00:00
Anusha Ragunathan
14215ed5a1 Make daemonbuilder.Docker leaner.
Currently builder.Backend is implemented by daemonbuilder.Docker{} for
the daemon. This registration happens in the API/server code. However,
this is too implementation specific. Ideally we should be able to specify
that docker daemon (or any other) is implementing the Backend and abstract
the implementation details. So we should remove package daemonbuilder
dependency in build_routes.go

With this change, daemonbuilder.Docker is nothing more than the daemon.
A follow on change will remove the daemonbuilder package and move relevant
methods under daemon, so that API only knows about the backend.

Also cleanup code in api/client/build.go. docker cli always performs build
context tar download for remoteURLs and sends an empty remoteContext. So
remove relevant dead code.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-18 09:16:11 -08:00
Kai Qiang Wu(Kennan)
66c253cbf7 Fix volume filter validation
Fixes: #18890
This fix add same filter validation logic as images. We should
add such check to make sure filters work make sense to end-users

Right now, we keep old use 1 as filter, but in long term, it should
be have same interface checking as images, it could be improved in
other patches.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-01-18 10:07:42 +00:00
Vincent Demeester
1d8ccc6ae7 Add the possibility to log event with specific attributes
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-01-17 12:14:01 +01:00
Daniel Nephin
61a49bb6ba Remove the use of dockerversion from the registry package
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-15 12:43:54 -05:00
Brian Goff
1a60a805bf Fix panic on starting exec more than once
Issue was caused when exec is tarted, exits, then stated again.
In this case, `Close` is called twice, which closes a channel twice.

Changes execConfig.ExitCode to a pointer so we can test if the it has
been set or not.
This allows us to return early when the exec has already been run.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-15 11:57:23 -05:00
Sebastiaan van Stijn
e44364eae9 Merge pull request #18587 from calavera/daemon_configuration_file
Allow to set daemon and server configurations in a file.
2016-01-14 16:44:58 -08:00
Tibor Vass
9365b301a8 Merge pull request #19339 from cpuguy83/19335_revert_18736
Revert "Break big lock into some tiny locks"
2016-01-14 16:53:39 -05:00
David Calavera
677a6b3506 Allow to set daemon and server configurations in a file.
Read configuration after flags making this the priority:

1- Apply configuration from file.
2- Apply configuration from flags.

Reload configuration when a signal is received, USR2 in Linux:

- Reload router if the debug configuration changes.
- Reload daemon labels.
- Reload cluster discovery.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-14 16:44:37 -05:00
Tibor Vass
e35f5a481a Merge pull request #17316 from rmb938/ipam_conf_options
Add IPAM Config Options to match libnetwork
2016-01-14 16:30:03 -05:00
Ryan Belgrave
662cac08ef Add IPAM Config Options to match libnetwork
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2016-01-14 14:32:25 -05:00
Brian Goff
7cd6210a88 Merge pull request #19326 from HackToday/19153-filter-rethink
Fix image filter
2016-01-14 13:59:14 -05:00
David Calavera
73a5393bf3 Merge pull request #19242 from mavenugo/nsalias
Network scoped alias support
2016-01-14 10:58:51 -08:00
Brian Goff
f093e1273d Revert "Break big lock into some tiny locks"
This reverts commit 1326f0cba5.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-14 13:38:09 -05:00
Tibor Vass
f292e90b8d Merge pull request #19226 from coolljt0725/remove_dup_check
Remove duplication checking for the existence of endpoint to speed up container starting
2016-01-14 12:24:11 -05:00
David Calavera
a225e39667 Merge pull request #19155 from coolljt0725/create_cwd_on_create
Create the working directory on container creation
2016-01-14 09:13:44 -08:00
Madhu Venugopal
dda513ef65 Network scoped alias support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-14 08:44:41 -08:00
Tibor Vass
349d9700bd Merge pull request #19291 from coolljt0725/fix_19100
Fix #19100 and fix a typo
2016-01-14 11:40:29 -05:00
Kai Qiang Wu(Kennan)
5ee69eb470 Fix image filter
This is related image fix for Propose #19153
for volume related change, would use another patch
to fix that.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-01-14 08:17:40 +00:00
Lei Jitang
3d2539d39d Fix #19100 and fix a typo
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-14 14:58:54 +08:00
Madhu Venugopal
b464f1d78c Forced endpoint cleanup
docker's network disconnect api now supports `Force` option which can be
used to force cleanup an endpoint from any host in the cluster.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-13 21:28:52 -08:00
David Calavera
9c30492e9e Merge pull request #19311 from estesp/no-oom-warning-when-cant-even
Only warn on OOMKill disable if the feature is actually requested
2016-01-13 13:43:37 -08:00
Sebastiaan van Stijn
661d75f398 Merge pull request #19123 from shishir-a412ed/rootfs_size_configurable
daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart
2016-01-13 13:22:08 -08:00
David Calavera
d6e01e3337 Merge pull request #19241 from rhvgoyal/fix-device-id-free
Mark device ID free only if device actually got deleted
2016-01-13 13:07:39 -08:00
Phil Estes
5a707d94d6 Only warn on OOMKill disable if the feature is actually requested
Instead of warning the caller who is disabling OOM killer that the
feature isn't available, only warn if they are trying to **enable** OOM
killer and it can't be done.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-13 11:53:44 -08:00
Tibor Vass
612cf0f172 Merge pull request #19279 from tiborvass/rename-authz-to-authorization
Rename authz to authorization for greater clarity
2016-01-13 14:30:18 -05:00
Tibor Vass
5c630ea7c3 Rename authz to authorization for greater clarity
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-01-13 14:15:37 -05:00
Brian Goff
184040bdd5 Merge pull request #19273 from calavera/volume-lazy-init
[Carry 18549] Lazy initialize Volume on container Mount object.
2016-01-13 14:15:17 -05:00
Shishir Mahajan
e47112d3e8 daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-01-13 13:57:31 -05:00
David Calavera
0ee64127ae Merge pull request #19276 from calavera/internal
[Carry 18926] Add network internal mode
2016-01-13 10:13:21 -08:00
Alexander Morozov
7ea65da7ef Merge pull request #19254 from aboch/v6b
Account docker0 IPv6 address on daemon start
2016-01-13 09:48:41 -08:00
Jessica Frazelle
446f498eba
refactor aaparser pkg, add unit tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-13 08:43:12 -08:00
Chun Chen
b70954e60a Add network interal mode
Signed-off-by: Chun Chen <ramichen@tencent.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-13 11:30:36 -05:00
David Calavera
aab3596397 Remove duplicated lazy volume initialization.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-13 11:22:31 -05:00
Tibor Vass
46eb470039 Merge pull request #19267 from mavenugo/vin-ln
Vendor libnetwork v0.5.4
2016-01-13 07:09:58 -05:00
Antonio Murdaca
a79f96828f Merge pull request #19249 from calavera/carry_17414
[Carry 17414] Added additional container information to "docker info".
2016-01-13 10:42:22 +01:00
Antonio Murdaca
40d7ad98a8 Merge pull request #19275 from tonistiigi/delete-image-conflict-bitmask
Use bitmask for conflict checking
2016-01-13 10:00:57 +01:00
Madhu Venugopal
8edbd10349 Updating to the new ep.Delete API
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-12 20:42:37 -08:00
Qiang Huang
7b616d4743 Do not fail if not support OomKillDisable
Fixes: #19278

The issue seems existed since we add support for OomKillDisable,
OomKillDisable support should not be hard request, we just
discard it if not support and move on.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-01-13 09:07:40 +08:00
Sebastiaan van Stijn
47d87d3b92 Merge pull request #19229 from mavenugo/udlinks
Local alias support
2016-01-12 16:47:32 -08:00
Tonis Tiigi
883be48930 Use bitmask for conflict checking
Rather than using 2 different functions for different
types of conflicts use a bitmask to specify what
conflicts need to be checked. This allows a better way
to make exceptions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-12 16:01:56 -08:00
Tibor Vass
1e1a3c9508 Merge pull request #19266 from tonistiigi/fix-untag-on-rmi-by-id
Fix rmi by ID untagging image on error
2016-01-12 18:56:25 -05:00
Tibor Vass
56272c9e9e Merge pull request #19060 from jfrazelle/daemon-read-seccomp
read seccomp profile locally then pass to daemon
2016-01-12 18:34:59 -05:00
David Calavera
c0c66c57b2 Merge pull request #19170 from aaronlehmann/delete-prune-digests
Prune digest references when deleting by tag
2016-01-12 15:15:36 -08:00
Darren Shepherd
2aa673aed7 Lazy initialize Volume on container Mount object
Currently on daemon start volumes are "created" which involves invoking
a volume driver if needed.  If this process fails the mount is left in a
bad state in which there is no source or Volume set.  This now becomes
an unrecoverable state in which that container can not be started.  The
only way to fix is to restart the daemon and hopefully you don't get
another error on startup.

This change moves "createVolume" to be done at container start.  If the
start fails it leaves it in the state in which you can try another
start.  If the second start can contact the volume driver everything
will recover fine.

Signed-off-by: Darren Shepherd <darren@rancher.com>
2016-01-12 17:19:59 -05:00
Tonis Tiigi
38a45eed88 Fix rmi by ID untagging image on error
Do not untag image if it would later get a hard conflict because of running containers.

Fixes #18873

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-12 13:45:40 -08:00
Madhu Venugopal
e221b8a3d6 Support --link for user-defined networks
This brings in the container-local alias functionality for containers
connected to u ser-defined networks.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-12 13:38:48 -08:00
Jessica Frazelle
062d0b3921
read seccomp profile locally then pass to daemon
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-12 13:12:29 -08:00
Jess Frazelle
c1582f20cc Merge pull request #19243 from calavera/engine_api_0_2
Vendor engine-api 0.2
2016-01-12 13:11:39 -08:00
Aaron Lehmann
2f048f73e1 Prune digest references when deleting by tag
When pulling an image with content trust enabled, two references are
created: a digest reference and a tag reference. Deleting by tag
wouldn't actually remove the image, because the digest reference keeps
it alive.

This change modifies the rmi logic so that digest references don't keep
an image alive. If the last tag referencing a given image is deleted,
any digest references to it will be removed as well, so the image can
actually get deleted. This fixes the usability problem with deletions
when content trust is in use, so something like "docker pull busybox;
docker rmi busybox" will work as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-01-12 12:11:43 -08:00
Jess Frazelle
293b3767c8 Merge pull request #19245 from jfrazelle/seccomp-kernel-check
check seccomp is configured in the kernel
2016-01-12 11:33:27 -08:00
Tibor Vass
45211af702 Merge pull request #19194 from LK4D4/fix_race_clean_net
Fix race on cleaning endpoint data
2016-01-12 13:28:50 -05:00
Qiang Huang
f4a687334b Change OomKillDisable to be pointer
It's like `MemorySwappiness`, the default value has specific
meaning (default false means enable oom kill).

We need to change it to pointer so we can update it after
container is created.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
(cherry picked from commit 9c2ea42329)

Conflicts:
	vendor/src/github.com/docker/engine-api/types/container/host_config.go
2016-01-12 13:19:17 -05:00
Jessica Frazelle
40d5ced9d0
check seccomp is configured in the kernel
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-12 09:45:21 -08:00
Sebastiaan van Stijn
c72be040bb Merge pull request #19187 from estesp/lets-do-this
User namespaces: graduate from experimental
2016-01-12 09:34:19 -08:00
Sebastiaan van Stijn
301627c677 Merge pull request #18906 from coolljt0725/connect_to_created
Support network connect/disconnect to stopped container
2016-01-12 07:06:31 -08:00
Alessandro Boch
cfa3682ca4 Account dcoker0 IPv6 address on daemon start
- In case --fixed-cidr-v6 is specified and docker0 bridge already
  has a global scope IPv6 address belonging to that v6 network
  (likely from a previous daemon instance), to maintain consistency
  with what done for the docker0 IPv4 address, daemon has to pass it
  down to libnetwork in the IPAMConfig as network gateway to make
  sure that the address is not given to some container.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-11 23:47:44 -08:00
Phil Estes
d5743a3a5c Properly report conflicting namespace options when using userns
This prevents strange errors and clarifies which namespace options are
incompatible with user namespaces (at this time).

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-11 20:50:22 -05:00
Sebastiaan van Stijn
656979670c Merge pull request #18998 from calavera/syslog_tls
Allow syslog over TCP+TLS.
2016-01-11 17:21:38 -08:00
Lei Jitang
79d4f0f56e Add docker network connect/disconnect to non-running container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-11 20:13:39 -05:00
Kim Eik
e732f4e649 Added additional container information to "docker info".
Instead of just showing the number of containers this patch will
show the number of running, paused and stopped containers as well.

Signed-off-by: Kim Eik <kim@heldig.org>
(cherry picked from commit a9804ab1cb)
2016-01-11 19:14:44 -05:00
Jess Frazelle
a96a0b3781 Merge pull request #19217 from justincormack/arm_syscalls
Add arm specific syscalls to default seccomp profile
2016-01-11 15:26:09 -08:00
Alexander Morozov
5abef06a15 Fix race on reading endpoint data
Race is with its cleanup.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-11 14:28:07 -08:00
Jess Frazelle
9c9a1d1b4b Merge pull request #19069 from jfrazelle/apparmor-regex-proc
fix proc regex
2016-01-11 13:50:25 -08:00
Alexander Morozov
9a23569ecf Merge pull request #16032 from cpuguy83/remove_sqlite_dep
Build names and links at runtime - no more sqlite
2016-01-11 10:59:49 -08:00
Vivek Goyal
2dccb562df Mark device ID free only if device actually got deleted
Right now if somebody has enabled deferred device deletion, then
deleteTransaction() returns success even if device could not be deleted. It
has been marked for deferred deletion. Right now we will mark device ID free
and potentially use it again when somebody tries to create new container. And
that's wrong. Device ID is not free yet. It will become free once devices
has actually been deleted by the goroutine later.

So move the location of call to markDeviceIDFree() to a place where we know
device actually got deleted and was not marked for deferred deletion.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2016-01-11 18:57:37 +00:00
David Calavera
4b98193bea Add support for syslog over TLS.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-11 12:25:34 -05:00
Brian Goff
2600777469 Add migration from sqlite links back to hostConfig
Before #16032, once links were setup
in the sqlite db, hostConfig.Links was cleared out.
This means that we need to migrate data back out of the sqlite db and
put it back into hostConfig.Links so that links specified on older
daemons can be used.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-11 11:31:29 -05:00
Lei Jitang
f62d4ceba6 Remove duplication checking for the existence of endpoint
CreateEndpoint will check if the endpoint exist or not, so there is no
need to check before call CreatEndpoint in connectToNetwork since
checking the existence of the endpoint could take much time especially
if we use external K-V store, this would slow down the staring of container.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-11 14:45:43 +08:00
Sebastiaan van Stijn
967acd56c1 Merge pull request #18512 from euank/18510-fixOomKilled
Set OOMKilled state on any OOM event
2016-01-11 00:09:26 +01:00
Justin Cormack
37d35f3c28 Add arm specific syscalls to default seccomp profile
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-10 19:55:24 +00:00
Arnaud Porterie
fe3d1f9dd7 Merge pull request #19198 from sanimej/vin
Vendoring libnetwork
2016-01-10 11:46:34 -08:00
Justin Cormack
13a9d4e899 Add i386 specific modify_ldt syscall to default seccomp filter
This syscall is used by Go on i386 binaries, although not by libc.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-10 12:00:11 +00:00
Sebastiaan van Stijn
a082f80832 Merge pull request #18736 from WeiZhang555/tiny-lock
Break big lock into some tiny locks for containerStart
2016-01-09 00:35:26 +01:00
Santhosh Manohar
64a6dc3558 Docker changes for libnetwork vendoring..
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-01-08 14:13:55 -08:00
Stephen Rust
7c70ad058f Allow external volume drivers to host anonymous volumes and copy existing data from image.
Signed-off-by: Stephen Rust <srust@blockbridge.com>
2016-01-08 15:06:42 -05:00
Phil Estes
557c7cb888 Move userns support out of experimental into master
Adds the `--userns-remap` flag to the master build

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-08 15:06:22 -05:00
Arnaud Porterie
05de2aadff Merge pull request #19001 from aboch/pip
Allow user to choose the IP address for the container
2016-01-08 11:49:20 -08:00
Michael Crosby
e26974e20b Merge pull request #19175 from cpuguy83/18670_copy_data_for_named_volumes
On create, copy image data for named volumes.
2016-01-08 11:33:40 -08:00
Alessandro Boch
2bb3fc1bc5 Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-08 10:09:16 -08:00
Lukas Waslowski
a4ce361ac8 Improve docs for Daemon.TagImage and dockerfile.BuildFromConfig.
Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
2016-01-08 14:51:09 +01:00
Lei Jitang
cde0ed67a1 Create the working directory on container creation
if create a container with -w to specify the working directory and
the directory does not exist in the container rootfs, the directory
will be created until the container start. It make docker export of
a created container and a running container inconsistent.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-08 12:11:21 +08:00
Phil Estes
72e65e8793 Fix btrfs subvolume snapshot dir perms for user namespaces
Make sure btrfs mounted subvolumes are owned properly when a remapped
root exists (user namespaces are enabled, for example)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-07 23:05:28 -05:00
Brian Goff
b468332707 On create, copy image data for named volumes.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-07 21:57:08 -05:00
Brian Goff
0f9f99500c Build names and links at runtime
Don't rely on sqlite db for name registration and linking.
Instead register names and links when the daemon starts to an in-memory
store.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-07 14:10:42 -05:00
Jess Frazelle
938d28e772 Merge pull request #19144 from LK4D4/fix_parent_systemd
Choose default-cgroup parent by cgroup driver
2016-01-07 10:24:51 -08:00
Alexander Morozov
c1cd45d547 Choose default-cgroup parent by cgroup driver
It's "/docker" for cgroupfs and "system.slice" for systemd.

Fix #19140

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-01-07 08:56:26 -08:00
David Calavera
907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
David Calavera
4ee3048fa8 Merge pull request #19110 from brahmaroutu/update_openc
update runc to the latest code base to fix gccgo builds
2016-01-06 15:09:11 -08:00
Jessica Frazelle
2b4f64e590
fix proc regex
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-06 10:08:35 -08:00
Tõnis Tiigi
fe550a1f17 Merge pull request #19093 from estesp/userns-root-rework
Allow root non-userns metadata backwards compatibility
2016-01-06 09:48:37 -08:00
David Calavera
4b1872f1ef Merge pull request #18979 from jfrazelle/make-whitelist
Change seccomp blacklist to a whitelist
2016-01-06 09:15:25 -08:00
Srini Brahmaroutu
9982631707 update runc to the latest code base to fix gccgo build
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2016-01-06 00:02:56 +00:00
Phil Estes
55137c19f4 Merge pull request #16534 from cpuguy83/make_volume_drivers_responsible
Move responsibility of ls/inspect to volume driver
2016-01-05 17:29:51 -05:00
David Calavera
b4e26a96da Merge pull request #18752 from cpuguy83/fix_broken_pipe_error_on_download_abrt
Don't log EPIPE errors on client download abort
2016-01-05 13:34:57 -08:00
Brian Goff
d3eca4451d Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-01-05 16:28:38 -05:00
Tibor Vass
df9a3d1005 Merge pull request #19092 from anusha-ragunathan/builder-rm-merge
Remove runconfig.Merge
2016-01-05 15:21:24 -05:00
David Calavera
acfd5eb947 Merge pull request #18977 from anusha-ragunathan/builder
Use ImageBuildOptions in builder.
2016-01-05 11:54:21 -08:00
Anusha Ragunathan
eb4ae8e28a Remove runconfig.Merge
Merge was used by builder and daemon. With this commit, the builder
call has been inlined and the function moved to the daemon package,
which is the only other caller.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-05 11:28:55 -08:00
Michael Crosby
5aae5a5fae Merge pull request #18399 from tonistiigi/migration-optimization
Migration optimizations
2016-01-05 10:11:56 -08:00
Anusha Ragunathan
5190794f1d Use ImageBuildOptions in builder.
dockerfile.Config is almost redundant with ImageBuildOptions.
Unify the two so that the latter can be removed. This also
helps build's API endpoint code to be less dependent on package
dockerfile.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-05 10:09:34 -08:00
Justin Cormack
822c4f79ab
Allow the waitpid syscall
This version is sometimes used eg by glibc on x86

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2016-01-05 09:29:16 -08:00