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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>