Commit Graph

2224 Commits

Author SHA1 Message Date
a2b541bbcc Merge pull request #16875 from hqhq/hq_quiet_at_info
Keep daemon quiet when using docker info
Upstream-commit: 96e1cda40f15a721c0c986ecee9c0543139c3312
Component: engine
2015-10-09 11:26:53 -04:00
950bd09f8a remove useless function generateIfaceName()
generateIfaceName() is useless as libnetwork has done
the job.

Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: a1620084c52a1afee55e9eabd7faa30889c8cabc
Component: engine
2015-10-09 18:07:54 +08:00
0b478891af Keep daemon quiet when using docker info
If I have some unsupported sysinfo, it's warning on daemon
side every time I use `docker info`, it seems unnecessay and
annoying to me, let's keep it quiet.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: aaacde4fd24c22b02312793acda75ee987601727
Component: engine
2015-10-09 14:57:47 +08:00
6ec1436aba Merge pull request #16152 from chlunde/devmapper-mount-flags
Use pkg/mount to support more flags in dm.mountopt
Upstream-commit: 6d9a84bcd04cd178033309859eb7bf386a8db85d
Component: engine
2015-10-08 16:02:50 -07:00
2c93131473 Merge pull request #16644 from dhiltgen/discovery_tls
Add TLS support for discovery backend
Upstream-commit: b50a88cfd78498e5cd943ee3964585a73067e3e4
Component: engine
2015-10-08 14:21:06 -07:00
a78c0b3db5 Merge pull request #16638 from MHBauer/daemon-derepo
refactor daemon image tagging
Upstream-commit: 67e38cc54cf528206aa150b05680748943764df8
Component: engine
2015-10-08 14:14:20 -07:00
c33d0611cf Merge pull request #16643 from chenchun/fix_empty_repository
Do not try to cleanupMounts if daemon.repository is empty
Upstream-commit: 4ab8514387286598504e05678d7bde9a5df00f45
Component: engine
2015-10-08 17:10:49 -04:00
510810895d Merge pull request #16366 from MHBauer/logs-refactor
refactor logs to not use internal data structures
Upstream-commit: 01cd67e752aa8a2a7fa9605d5c53bc95862a4d7b
Component: engine
2015-10-08 14:05:02 -07:00
aa4d367db2 Merge pull request #16803 from tiborvass/pkg-broadcaster
Move types from progressreader and broadcastwriter to broadcaster
Upstream-commit: bea2257f926ad8e49973d695254669c159987d19
Component: engine
2015-10-08 13:51:08 -07:00
57e2d9f131 Merge pull request #13777 from cpuguy83/graphdriver_extpoints
Create extpoint for graphdrivers
Upstream-commit: 4c55464dd3fbbecb0e67f9b33c54f62f3982b500
Component: engine
2015-10-08 13:46:42 -07:00
afbcd19418 Merge pull request #16660 from Microsoft/js/hostname
Windows: --hostname support
Upstream-commit: 5ec323aaa298dfa3f60bb28a638df65e7ade8624
Component: engine
2015-10-08 16:11:49 -04:00
e20529cb2b Merge pull request #16785 from cpuguy83/exec_cleanup
Cleanup some issues with exec
Upstream-commit: cc411c054ffc16fff1ec27b49047ff7dba6a1e04
Component: engine
2015-10-08 12:02:03 -07:00
99f0bfa2a6 Merge pull request #15868 from crosbymichael/aufs-data
Add aufs data structure for added mount information
Upstream-commit: b3b9fe8c7730060c9f5a7c5081b773676fdef889
Component: engine
2015-10-08 11:17:20 -07:00
815dbb240f Merge pull request #16852 from estesp/overlay-cleanup
Simplify dir removal in overlay driver
Upstream-commit: 6654b0e05f663da394bac6ed846187bca90451f5
Component: engine
2015-10-08 08:44:50 -07:00
a6e3345892 Merge pull request #16823 from rhvgoyal/check-thin-pool
devmapper: Make sure device is a thin pool device
Upstream-commit: c3e5364813848616d2713083cb442760e62417e4
Component: engine
2015-10-08 11:27:53 -04:00
99dfae8822 Simplify dir removal in overlay driver
There is no need to call `os.Stat` on the driver filesystem path of a
container as `os.RemoveAll` already handles (properly) the case where
the path no longer exists.

Given the results of the stat() were not even being used,  there is no
value in erroring out because of the stat call failure, and worse, it
prevents daemon cleanup of containers in "Dead" state unless you re-create
directories that were already removed via a manual cleanup after a
failure.  This brings removal in overlay in line with aufs/devicemapper
drivers which don't error out if the filesystem path no longer exists.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 6ed11b53743668dba3bcf6ecef4e57a399d95569
Component: engine
2015-10-08 11:04:00 -04:00
66bb31005c Fix broken link in error-message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4830f488d5bcdbe73ab49fcedef0c6f686cbe704
Component: engine
2015-10-08 14:32:34 +02:00
8709c3083b Merge pull request #16780 from Microsoft/jjh/vfs-build-tags
Fix VFS build tags
Upstream-commit: 53d24291648f3c610ddb13e131a498e1d27ae676
Component: engine
2015-10-08 09:43:06 +02:00
47fa2052c1 Add TLS support for discovery backend
This leverages recent additions to libkv enabling client
authentication via TLS so the discovery back-end can be locked
down with mutual TLS.  Example usage:

    docker daemon [other args] \
        --cluster-advertise 192.168.122.168:2376 \
        --cluster-store etcd://192.168.122.168:2379 \
        --cluster-store-opt kv.cacertfile=/path/to/ca.pem \
        --cluster-store-opt kv.certfile=/path/to/cert.pem \
        --cluster-store-opt kv.keyfile=/path/to/key.pem

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 124792a8714425283226c599ee69cbeac2e4d650
Component: engine
2015-10-07 16:01:00 -07:00
8c3d5b861b refactor logs to not use internal data structures
- refactor to make it easier to split the api in the future
 - additional tests for non existent container case

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 1eecc1e7e57f3b96878df01fd32596bc485117a8
Component: engine
2015-10-07 15:44:16 -07:00
254c913ad5 refactor daemon
- create pass through in daemon for access to functions on daemon
   member
 - import image
push image
export image and corrections
lookup image & comments
load image
list images
image history & comments

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 77c592d26a83aa5a56726d6e1741f18f044e64ab
Component: engine
2015-10-07 15:29:02 -07:00
a357665097 devmapper: Make sure device is a thin pool device
Right now we check for the existence of device but don't make sure it is
a thin pool device. We assume it is a thin pool device and call poolStatus()
on the device which returns an error EOF. And that error does not tell
anything.

So before we reach the stage of calling poolStatus() make sure we are working
with a thin pool device otherwise error out.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 6d2d0a74e8effe65175473352bf58fc4beda1718
Component: engine
2015-10-07 16:28:49 -04:00
6b3f6691b5 Merge pull request #16645 from mavenugo/ux
Docker Network UX & remote API changes
Upstream-commit: 8e31036816e200dfe54cc2205235de7dea54bcd0
Component: engine
2015-10-07 10:44:58 -07:00
362fe5af33 Merge pull request #16381 from rhvgoyal/deferred_deletion
devicemapper: Implement deferred deletion capability
Upstream-commit: 8cee3018740374ae44ae5f71b8032cc1b3d98cb4
Component: engine
2015-10-07 09:27:41 -07:00
8623fdfb48 Network remote APIs using new router, --net=<user-defined-network> changes
* Moving Network Remote APIs out of experimental
* --net can now accept user created networks using network drivers/plugins
* Removed the experimental services concept and --default-network option
* Neccessary backend changes to accomodate multiple networks per container
* Integration Tests

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 2ab94e11a2a8499088a72ab27fd09e897d8c810a
Component: engine
2015-10-07 03:54:19 -07:00
1f889ca641 Move types from progressreader and broadcastwriter to broadcaster
progressreader.Broadcaster becomes broadcaster.Buffered and
broadcastwriter.Writer becomes broadcaster.Unbuffered.

The package broadcastwriter is thus renamed to broadcaster.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2391233404e2e6892c79a24f31cc99715c086b21
Component: engine
2015-10-06 22:20:07 -04:00
5a9d726a00 Merge pull request #16147 from tiborvass/refactor-builder
Refactor builder with new Go interfaces
Upstream-commit: 2606a2e4d3bf810ec82e373a6cd334e22e504e83
Component: engine
2015-10-06 20:36:07 -04:00
d8db4defa7 Abstract builder and implement server-side dockerfile builder
This patch creates interfaces in builder/ for building Docker images.
It is a first step in a series of patches to remove the daemon
dependency on builder and later allow a client-side Dockerfile builder
as well as potential builder plugins.

It is needed because we cannot remove the /build API endpoint, so we
need to keep the server-side Dockerfile builder, but we also want to
reuse the same Dockerfile parser and evaluator for both server-side and
client-side.

builder/dockerfile/ and api/server/builder.go contain implementations
of those interfaces as a refactoring of the current code.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e0ef11a4c2c6789e08b61df082b5b9aa70898e7a
Component: engine
2015-10-06 19:10:19 -04:00
c46b8dfd3a devmapper: Implement a goroutine to cleanup deleted devices
Start a goroutine which runs every 30 seconds and if there are deferred
deleted devices, it tries to clean those up.

Also it moves the call to cleanupDeletedDevices() into goroutine and
moves the locking completely inside the function. Now function does not
assume that device lock is held at the time of entry.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 87de04005d61ab986d70a31e3ac82ec92912df55
Component: engine
2015-10-06 17:37:21 -04:00
fb33696b35 devmapper: Keep track of number of deleted devices
Keep track of number of deleted devices and export this information through
"docker info".

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d295dc66521e2734390473ec1f1da8a73ad3288a
Component: engine
2015-10-06 17:37:21 -04:00
7bb486d26e devmapper: Implement deferred deletion functionality
Finally here is the patch to implement deferred deletion functionality.
Deferred deleted devices are marked as "Deleted" in device meta file. 

First we try to delete the device and only if deletion fails and user has
enabled deferred deletion, device is marked for deferred deletion.

When docker starts up again, we go through list of deleted devices and
try to delete these again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d929589c1fc4538dcd1b2a7a3dc7d4afbdfa72fd
Component: engine
2015-10-06 17:37:21 -04:00
cd659bcc9c devmapper: Provide option to enabled deferred device deletion
Provide a command line option dm.use_deferred_deletion to enable deferred
device deletion feature. By default feature will be turned off.

Not sure if there is much value in deferred deletion being turned on
without deferred removal being turned on. So for now, this feature can
be enabled only if deferred removal is on.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 51e059e7e90f37848596a0b6ec83f7835e6e4131
Component: engine
2015-10-06 17:37:21 -04:00
3c327a4ced devmapper: construct used device ID map from device Hash map
Currently during startup we walk through all the device files and read
their device ID and mark in a bitmap that device id is used.

We are anyway going through all device files. So we can as well load all
that data into device hash map. This will save us little time when
container is actually launched later.

Also this will help with later patches where cleanup deferred device
wants to go through all the devices and see which have been marked for
deletion and delete these.

So re-organize the code a bit.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 6b8b4feaa165af630dd33423f0538a0b987703ae
Component: engine
2015-10-06 17:37:21 -04:00
c8875071f3 Merge pull request #16799 from rhvgoyal/code-reorg
devmapper: Break down setupBaseImage() function into smaller pieces
Upstream-commit: 670c48857ace676b43649b39bd12e83b19558d23
Component: engine
2015-10-06 16:15:31 -04:00
3fb0ea6fd2 Merge pull request #16795 from runcom/bump-libcontainer
Bump libcontainer
Upstream-commit: 931e6129d0c27acc81fc2eea57f333f31f1cfb69
Component: engine
2015-10-06 12:24:19 -07:00
cb460a3ef9 Cleanup some issues with exec
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 561005e5ca00a8c24e83294e7005bdaf32f19d5a
Component: engine
2015-10-06 15:22:20 -04:00
e9bd508682 bump libcontainer to 902c012e85cdae6bb68d8c7a0df69a42f818ce96
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 753901343624f15264b46fe9ade01cf451be99f1
Component: engine
2015-10-06 17:55:09 +02:00
a37c8bb04a devmapper: Move UUID setup and verification code in a function
Simplify setupBaseImage() even further. Move some more code in a separate
function. Pure code reorganization. No functionality change.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 0fcd485626f110bbf39e8a6b1edc11b4ac6f7065
Component: engine
2015-10-06 08:38:03 -04:00
b4d2c9486c devmapper: Move thin pool related checks in a function
Move thin pool related checks in a separate function. Pure code reorganization.
Makes reading code easier.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 69051ec0a58906e5252f902063ccead2075c8bed
Component: engine
2015-10-06 08:38:03 -04:00
0f1a89a462 devmapper: Move base device creation in separate function
This moves base device creation function in a separate function. Pure
code reorganization. Makes reading code little easier.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: efc1ddd7e3341124a2ebbb8a358f44754b32f310
Component: engine
2015-10-06 08:38:03 -04:00
3d6e7d79f9 Merge pull request #16727 from rhvgoyal/code-cleanup
devmapper: Little code cleanup and code reorganization
Upstream-commit: 1529343a3fc78251a2d62befebdbd669db133a3b
Component: engine
2015-10-05 22:23:10 -07:00
98d72c0286 Fix VFS build tags
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7db08b4e62555055031ad6228221dc8c11ebe6a2
Component: engine
2015-10-05 15:52:09 -07:00
250a07900f Merge pull request #16718 from mavenugo/discovery
Vendoring libnetwork integrated with Docker discovery service
Upstream-commit: 33e9d70c82a9dee04e5e6d50dd890a6b96650b0a
Component: engine
2015-10-05 12:06:36 -07:00
1c5745b90e devmapper: Few code cleanups
This patch does three things. Following are the descriptions.

===
Create a separate function for delete transactions so that parent function
is little smaller.

Also close transaction if an error happens.
===
When docker is being shutdown, save deviceset metadata first before
trying to remove the devices. Generally caller gives only 10 seconds
for shutdown to complete and then kills it after that. So if some device
is busy, we will wait 20 seconds for it removal and never be able to save
metadata. So first save metadata and then deal with device removal.
===
Move issue discard operation in a separate function. This makes reading code
little easier.

Also don't issue discards if device is still open. That means devices is
still probably being used and issuing discards is not a good idea.

This is especially true in case of deferred deletion. We want to issue
discards when device is not open. At that time device can be deleted too.
Otherwise we will issue discards and deletion will actually fail. Later
we will try deletion again and issue discards again and deletion will
fail again as device is open and busy.

So this will ensure that discards are issued once when device is not open
and it can actually be deleted.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 482eca3099ad4bf3a7db62a31f88e2158cbbc933
Component: engine
2015-10-05 09:02:31 -04:00
e846ce8223 Merge pull request #16530 from dnephin/filter_events_by_label
Filter events by labels
Upstream-commit: e86291edd88641cc866c842d0f4a8f8296820aeb
Component: engine
2015-10-04 20:36:42 +02:00
b6b2359efc Docker daemon updates to libnetwork discovery support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 139ea5b7f2a1b981a8c9556a21e52ceaa8c65d5c
Component: engine
2015-10-02 20:57:47 -07:00
5fa21cf8ee Don't let Names be null on GET /containers/JSON
Fixes an issue where a `Dead` container has no names so the API returns
`null` instead of an empty array.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 59b8a0f697355f1d404121f0c3e96c4957ac4608
Component: engine
2015-10-02 17:09:14 -04:00
1dfde818a2 Resolves #16458 - filter events by labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 08b117517d6d6b5daebe4c056c135e1598f44385
Component: engine
2015-10-02 16:33:20 -04:00
3b057aaeb2 Merge pull request #16250 from cpuguy83/15487_exec_error_codes
Make exec start return proper error codes
Upstream-commit: 5a43beda91efd9a53c798082abbc5b287167aa0c
Component: engine
2015-10-02 12:55:17 -07:00
56b56acf38 Merge pull request #16708 from jfrazelle/fix-shm-mqueue-when-mounted-from-host
do not mount /dev/shm or /dev/mqueue if we are mounting from the host
Upstream-commit: 662f55d11d2f278daf5b9be215608540af35be4d
Component: engine
2015-10-02 15:13:59 -04:00