Commit graph

5195 commits

Author SHA1 Message Date
Fabio Kung
edad52707c save deep copies of Container in the replica store
Reuse existing structures and rely on json serialization to deep copy
Container objects.

Also consolidate all "save" operations on container.CheckpointTo, which
now both saves a serialized json to disk, and replicates state to the
ACID in-memory store.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:33 -07:00
Fabio Kung
201a37f7a1 verifyVolumesInfo needs a container lock
It operates on containers that have already been registered on the
daemon, and are visible to other goroutines.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:33 -07:00
Fabio Kung
03aa24721c no need to save state to disk here
State will be saved on the following operation once the container is
properly registered on the daemon.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:32 -07:00
Fabio Kung
aacddda89d Move checkpointing to the Container object
Also hide ViewDB behind an inteface.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:32 -07:00
Fabio Kung
8e425ebc42 stop grabbing container locks during ps
Container queries are now served from the consistent in-memory db, and
don't need to grab a lock on every container being listed.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:31 -07:00
Fabio Kung
eed4c7b73f keep a consistent view of containers rendered
Replicate relevant mutations to the in-memory ACID store. Readers will
then be able to query container state without locking.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:52:31 -07:00
Fabio Kung
cfc404a375 Move platform specific mount data to Container
The Solaris version (previously daemon/inspect_solaris.go) was
apparently missing some fields that should be available on that
platform.

Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-23 07:22:47 -07:00
Fabio Kung
481a92cb41 Grab a lock to read container.RemovalInProgress
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-06-21 19:11:23 -07:00
John Stephens
930e689668 Merge pull request #33241 from Microsoft/jjh/multi-layerstore
LCOW: Support most operations excluding remote filesystem
2017-06-21 15:45:23 -07:00
Sebastiaan van Stijn
795a2fdbcb Merge pull request #33735 from tonistiigi/force-pull-fix
builder: fix copy —from conflict with force pull
2017-06-21 12:07:54 -07:00
John Howard
3a09b56a10 LCOW: Rework after 33454 merged which refactored daemon/builder interface
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:13 -07:00
John Howard
bdabc76a53 LCOW: Coherency - ensure windowsfilter driver is not used
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:13 -07:00
John Howard
f8aa70055e LCOW: Don't mount for linux containers either
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:12 -07:00
John Howard
ed10ac6ee9 LCOW: Create layer folders with correct ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:12 -07:00
John Howard
f154588226 LCOW: OCI Spec and Environment for container start
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:11 -07:00
John Howard
3d5cec70b4 LCOW: Plumb through platform on Import
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:54 -07:00
John Howard
a97b99e2d8 LCOW: Push to switch platform
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:54 -07:00
John Howard
e05cedcbf9 LCOW: Image exporter update
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:54 -07:00
John Howard
ba40132366 LCOW: Fix ImageCache to address right store
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:53 -07:00
John Howard
87abf34a3d LCOW: Store integrity checks
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:53 -07:00
John Howard
08252bc963 LCOW: Builder plumbing
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:53 -07:00
John Howard
a1fe1dc791 LCOW: pull goes to correct stores
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:52 -07:00
John Howard
8f53780694 LCOW: commit to use image platform, not host
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:52 -07:00
John Howard
3aa4a00715 LCOW: Move daemon stores to per platform
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:52 -07:00
John Howard
6c33684987 LCOW: Add platform to image store
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:51 -07:00
John Howard
ed4d2aa981 LCOW: Graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>

Adds the graphdriver for Linux containers on Windows
2017-06-20 19:49:24 -07:00
Brian Goff
226bf3e0d9 Merge pull request #33587 from bergwolf/aufs
fix aufs mount option length calculation
2017-06-20 15:51:42 -07:00
Tonis Tiigi
c268d9da4b builder: fix copy —from conflict with force pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-20 15:45:33 -07:00
John Howard
42c5c1a9ec LCOW: Pass platform through into layer store
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 09:21:37 -07:00
John Howard
55f8828eec LCOW: Remove CommonContainer - just Container
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 08:55:46 -07:00
Vincent Demeester
99c72eb268 Merge pull request #33454 from dnephin/refactor-builder-remove-copy-on-build
[Builder] Move file coping from the daemon to the builder
2017-06-20 10:12:57 +02:00
Royce Remer
b3add005d5 * standardize timeouts for log reads and writes for logger adapter tests
* use an assertion framework in logger adapter tests

Signed-off-by: Royce Remer <royceremer@gmail.com>
2017-06-18 18:47:45 -07:00
Brian Goff
0919a1da14 Merge pull request #33712 from cyli/redact-ca-signing-cert
Redact swarm spec CA signing cert for usability reasons
2017-06-16 09:21:59 -04:00
allencloud
148f2711e8 add NamedUlimitOpt implement NamedOption to fix 32528
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-06-16 10:14:09 +08:00
Ying Li
bdfbd22afb Redact the swarm's spec's signing CA cert when getting swarm info, because
otherwise if the user gets the info from the API, makes a non-CA related change,
then updates, swarm will interpret this as the user trying to remove the signing
key from the swarm.  We are redacting due to usability reasons, not because
the signing cert is secret.  The signing KEY is secret, hence it's redacted.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-06-15 18:26:01 -07:00
John Howard
b931c35a46 Merge pull request #33498 from darrenstahlmsft/IoTDataPartition
Skip evaluation of symlinks to data root on IoT Core
2017-06-15 15:52:01 -07:00
Tõnis Tiigi
5eca8382b0 Merge pull request #33585 from moypray/containerd_core
When daemon is in startup process, could not start container
2017-06-15 09:13:41 -07:00
Kenfe-Mickaël Laventure
c86323c19d Merge pull request #33361 from aaronlehmann/no-join-address
cluster: Only pass a join address when in the process of joining a cluster
2017-06-14 14:08:37 -07:00
Vincent Demeester
0c2f3bcd82 Merge pull request #33053 from simonferquel/ignore-private-networks
Ignore HNS networks with type `Private`
2017-06-14 14:20:39 +02:00
Wentao Zhang
5b0993d6c7 When daemon is in startup process, could not start container
Description:
 When docker is in startup process and containerd sends an "process exit" event to docker.
 If the container config '--restart=always', restartmanager will start this container very soon.

 But some initialization is not done, e.g. `daemon.netController`,when visit, docker would panic.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
2017-06-14 18:53:18 +08:00
Darren Stahl
8e71b1e210 Skip evaluation of symlinks to data root on IoT Core
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-06-13 15:02:35 -07:00
Brian Goff
bccebdac18 Merge pull request #32468 from coolljt0725/clean_thin
devicemapper: remove thin pool if 'initDevmapper' failed
2017-06-13 07:34:15 -05:00
Sebastiaan van Stijn
5052986afc Merge pull request #33621 from thaJeztah/fix-runc-version-exec
Fix missing "--version" argument
2017-06-13 14:18:17 +02:00
Simon Ferquel
b91fd26bb5 Ignore HNS networks with type Private
Fix #33052 (workaround style)

**- What I did**

HNS reports networks that don't have anything to do with the Daemon, and
for which no networking plugin is available. This make the Daemon start
sequence pause for 15 secs, as the plugin resolving logic has a wait &
retry logic

**- How I did it**

Just after retrieving the HNS networks, I filter out those with type
`Private`

**- How to verify it**

Replace dockerd coming with Docker for Windows from one built from this
PR. Windows containers daemon should now launch pretty quickly

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-06-13 13:25:00 +02:00
Brian Goff
ff2127968d Merge pull request #33638 from coolljt0725/mnt_deatch
Use lazy umount on Put for overlay2 and overlay
2017-06-12 18:58:55 -05:00
Brian Goff
2ae085f309 Merge pull request #33414 from darrenstahlmsft/IoTServerContainers
Check for Windows 10 IoT Core to use process isolation on IoT
2017-06-12 18:02:15 -05:00
Kenfe-Mickaël Laventure
135bd20585 Merge pull request #33620 from cpuguy83/skip_size_on_mounted_local_volumes
Do not calculate size for local volumes with mount
2017-06-12 11:40:55 -04:00
Lei Jitang
f65fa1f115 Use lazy umount on Put for overlay2 and overlay
we see a lot of
```
level=debug msg="Failed to unmount a03b1bb6f569421857e5407d73d89451f92724674caa56bfc2170de7e585a00b-init overlay: device or resource busy"
```
in daemon logs and there is a lot of mountpoint leftover.
This cause failed to remove container.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-06-12 09:07:25 -04:00
Sebastiaan van Stijn
6400ce8f0a
Fix missing "--version" argument
Commit 858b4b44c8 added
support for obtaining the runtime version
if a custom path was set, but accidentally
removed the "--version" flag.

This patch restores the flag, and adds an integration
test to verify the behavior..

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-11 23:31:47 +02:00
Brian Goff
0822d90364 Do not calculate size for local volumes with mount
Local volumes support mount options which, when in use, can mount
external file systems. We don't really need to enumerate these external
filesystems which may be a very slow process.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-06-09 18:28:46 -04:00