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

2927 commits

Author SHA1 Message Date
David Calavera
c446fd2099 Allow network configuration via daemon config file.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-26 12:59:00 -08:00
Brian Goff
be311fba7b 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-26 12:58:59 -08:00
Alessandro Boch
61943d54aa Save endpoint config only if endpoint creation succeeds
- Currently it is being save upfront...

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-26 12:58:59 -08:00
Brian Goff
08ca18b59d 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-26 12:58:59 -08:00
Alessandro Boch
36efc47844 Reject multiple networks on container creation
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-26 12:58:58 -08:00
Tonis Tiigi
5bb832e024 Fix error message in container creation
Error message was different if image was specified with the full ID.

Fixes 

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-26 12:58:58 -08:00
scaleoutsean
29423cb6e9 Add GPFS
Signed-off-by: Sean Lee <seanlee@tw.ibm.com>
2016-01-26 12:58:57 -08:00
David Calavera
c62c9636c5 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-26 12:58:54 -08:00
Alessandro Boch
56a982afb0 Move ErrUnsupportedNetwork* checks to updateNetworkConfig() func
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-26 12:58:53 -08:00
Stephen Rust
e91c8a9aa0 Allow external volume drivers to host anonymous volumes and copy existing data from image.
Signed-off-by: Stephen Rust <srust@blockbridge.com>
2016-01-26 12:58:53 -08:00
David Calavera
f999cd3d4e 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-26 12:58:53 -08:00
David Calavera
231eeca2b0 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-26 12:58:53 -08:00
David Calavera
ba01d9f9d6 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-26 12:58:53 -08:00
Tonis Tiigi
084a60e8e1 Revert "Copy aufs hardlinks to top layer"
This reverts commit ef05b83417.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-01-26 12:58:51 -08:00
Brian Goff
360d59662f 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-26 12:58:50 -08:00
Lei Jitang
326de12d8f Fix , clean up the ports when release network
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-01-26 12:58:50 -08:00
Brian Goff
77e92cfb13 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-26 12:58:49 -08:00
Pei Su
ac382473d9 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-26 12:58:49 -08:00
Jessica Frazelle
e75305e5f3 add send, recv, and x32 so we can install i386 pkgs on amd64
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-01-26 12:58:47 -08:00
Madhu Venugopal
f175dc5fb4 nil ptr check for endpointsettings when used with older clients
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-01-26 12:58:47 -08:00
Daniel Dao
bfa80edf4b 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-26 12:58:46 -08:00
Brian Goff
81cd580d68 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-26 12:58:45 -08:00
Sebastiaan van Stijn
e44364eae9 Merge pull request 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 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 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 from HackToday/19153-filter-rethink
Fix image filter
2016-01-14 13:59:14 -05:00
David Calavera
73a5393bf3 Merge pull request 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 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 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 from coolljt0725/fix_19100
Fix  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 
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 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 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 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 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 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 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 from calavera/internal
[Carry 18926] Add network internal mode
2016-01-13 10:13:21 -08:00
Alexander Morozov
7ea65da7ef Merge pull request from aboch/v6b
Account docker0 IPv6 address on daemon start
2016-01-13 09:48:41 -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 from mavenugo/vin-ln
Vendor libnetwork v0.5.4
2016-01-13 07:09:58 -05:00