Commit graph

86 commits

Author SHA1 Message Date
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00
allencloud
73046cb8d8 handle kernel version error in version api
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-18 00:31:50 +08:00
Jessica Frazelle
8dd88afb5b
remove dead code
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-16 19:15:14 -07:00
allencloud
b0fb0f1993 handle kernel and os info error in /info api
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-15 20:23:15 +08:00
David Calavera
59586d02b1 Move registry service options to the daemon configuration.
Allowing to set their values in the daemon configuration file.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-03-10 11:53:11 -05:00
David Calavera
b7bc1ce1a4 Merge pull request #20730 from clnperez/sysinfo-match-ip-case
Match case for IP variables in sysinfo pkg
2016-03-03 08:48:57 -08:00
Sebastiaan van Stijn
747a486b4a Add KernelMemory to "info" and show warning
This change adds "KernelMemory" to the /info endpoint and
shows a warning if KernelMemory is not supported by the kernel.

This makes it more consistent with the other memory-limit
options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-03-02 23:32:25 +01:00
Qiang Huang
ca89c329b9 Add CgroupDriver to docker info
Fixes: #19539

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-02 20:07:06 +08:00
Christy Perez
5b3fc7aab2 Match case for variables in sysinfo pkg
I noticied an inconsistency when reviewing docker/pull/20692.

Changing Ip to IP and Nf to NF.

More info: The golang folks recommend that you keep the initials consistent:
https://github.com/golang/go/wiki/CodeReviewComments#initialisms.

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2016-03-01 10:37:05 -06:00
Alexander Morozov
05002c2501 Add support for forwarding Docker client through SOCKS proxy
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-02-16 11:09:28 -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
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
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
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
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
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
Antonio Murdaca
77ef3a606a daemon: info: remove exported getter
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-01 20:22:29 +01:00
Brian Goff
e7e3e568d1 Merge pull request #18836 from vdemeester/18829-info-authz-plugins
Add authorization plugins to docker info
2015-12-31 09:47:59 -05:00
Vincent Demeester
4a1eb3f3e2 Add authorization plugins to docker info
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-12-29 22:10:23 +01:00
Daniel Nephin
f5916b10ae Remove the graph driver from the daemon, move it into the layer store.
Support restoreCustomImage for windows with a new interface to extract
the graph driver from the LayerStore.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-28 12:55:48 -05:00
David Calavera
867f432985 Move docker system information to a dedicated router and backend.
Because I like the name `system` better than `local` :)

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-03 13:38:56 -05:00
Antonio Murdaca
3662f58083 daemon: remove private func config()
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-12-03 11:46:53 +01:00
Antonio Murdaca
1b726b29b2 daemon: remove sysInitPath, lxc leftover
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2015-11-30 10:04:13 +01:00
Tonis Tiigi
4352da7803 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-24 09:40:25 -08:00
Kenjiro Nakayama
84781a5df7 docker info suppports case-insensitive proxy env settings
Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
2015-11-18 10:58:19 +09:00
Michael Crosby
104dab87ea Merge pull request #17478 from vdemeester/pr-13921
Carry#13921 : Expand /info: Expose OSType (GOOS), Architecture (GOARCH)
2015-11-17 15:44:57 -08:00
Kunal Kushwaha
aa7fd884e6 Supported added for reterving Plugin list for Network and Volume.
Also, plugin information in docker info output.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2015-11-16 15:28:09 +09:00
Vincent Demeester
49779b674a Add pkg/parsers/architecture and pkg/platform
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-14 23:03:02 +01:00
Olle Jonsson
4e8fcd4002 /info: Add keys Architecture, OSType
- introduces Swarm-relevant keys, see #13634
  - docs updated

Signed-off-by: Olle Jonsson <olle.jonsson@gmail.com>
2015-11-14 22:21:45 +01:00
Alexander Morozov
cccf674943 Merge pull request #16873 from coolljt0725/expand_docker_info
Add more cgroup config to docker info
2015-11-13 09:37:06 -08:00
Alexander Morozov
1df0bb5a13 daemon/info.go: assign proxy fields directly
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-11 11:03:53 -08:00
Alexander Morozov
8f311f4d8c daemon/info.go: remove check for map nilness
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-11-10 09:20:59 -08:00
Vincent Demeester
8054a30387 dockerversion placeholder for library import
- Add a *version* file placeholder.
- Update autogen and builds to use it and an autogen build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-09 19:32:46 +01:00
Brian Goff
b78ca243d9 Revert "dockerversion placeholder for library-import"
This reverts commit d5cd032a86.

Commit caused issues on systems with case-insensitive filesystems.
Revert for now

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-27 21:23:53 -04:00
David Calavera
6276c676a8 Merge pull request #17350 from vdemeester/11699-auto-libraryimport
dockerversion placeholder for library-import
2015-10-27 13:39:40 -07:00
Vincent Demeester
d5cd032a86 dockerversion placeholder for library-import
- Move autogen/dockerversion to version
- Update autogen and "builds" to use this package and a build flag

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-27 20:36:07 +01:00
Madhu Venugopal
3e7db73b99 Enhancing --cluster-advertise to support <interface-name>
--cluster-advertise daemon option is enahanced to support <interface-name>
in addition to <ip-address> in order to amke it  automation friendly using
docker-machine.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-27 11:03:22 -07:00
Lei Jitang
458ec418cd Add more cgroup config to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-09 03:02:04 -04:00
Qiang Huang
aaacde4fd2 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>
2015-10-09 14:57:47 +08:00
Tibor Vass
b08f071e18 Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de41640435, reversing
changes made to 7daeecd42d.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
2015-09-29 14:26:51 -04:00
Tibor Vass
79c31f4b13 Revert "Merge pull request #16567 from calavera/context_per_request"
This reverts commit ff92f45be4, reversing
changes made to 80e31df3b6.

Reverting to make the next revert easier.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-09-29 13:40:46 -04:00
Arnaud Porterie
7d193ef1f3 Add builtin nodes discovery
Use `pkg/discovery` to provide nodes discovery between daemon instances.

The functionality is driven by two different command-line flags: the
experimental `--cluster-store` (previously `--kv-store`) and
`--cluster-advertise`. It can be used in two ways by interested
components:

1. Externally by calling the `/info` API and examining the cluster store
   field. The `pkg/discovery` package can then be used to hit the same
   endpoint and watch for appearing or disappearing nodes. That is the
   method that will for example be used by Swarm.
2. Internally by using the `Daemon.discoveryWatcher` instance. That is
   the method that will for example be used by libnetwork.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-09-25 14:52:09 -07:00
David Calavera
27c76522de Define a context per request.
Avoid creating a global context object that will be used while the daemon is running.

Not only this object won't ever be garbage collected, but it won't ever be used for anything else than creating other contexts in each request. I think it's a bad practive to have something like this sprawling aroud the code.

This change removes that global object and initializes a context in the cases we don't have already one, like shutting down the server.
This also removes a bunch of context arguments from functions that did nothing with it.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-24 18:44:53 -04:00
Doug Davis
26b1064967 Add context.RequestID to event stream
This PR adds a "request ID" to each event generated, the 'docker events'
stream now looks like this:

```
2015-09-10T15:02:50.000000000-07:00 [reqid: c01e3534ddca] de7c5d4ca927253cf4e978ee9c4545161e406e9b5a14617efb52c658b249174a: (from ubuntu) create
```
Note the `[reqID: c01e3534ddca]` part, that's new.

Each HTTP request will generate its own unique ID. So, if you do a
`docker build` you'll see a series of events all with the same reqID.
This allow for log processing tools to determine which events are all related
to the same http request.

I didn't propigate the context to all possible funcs in the daemon,
I decided to just do the ones that needed it in order to get the reqID
into the events. I'd like to have people review this direction first, and
if we're ok with it then I'll make sure we're consistent about when
we pass around the context - IOW, make sure that all funcs at the same level
have a context passed in even if they don't call the log funcs - this will
ensure we're consistent w/o passing it around for all calls unnecessarily.

ping @icecrime @calavera @crosbymichael

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-24 11:56:37 -07:00
Zhang Kun
7cf343d106 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-09-21 21:15:32 +08:00
Morgan Bauer
abd72d4008
golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the
 downcased versions already existed, and the existing functions simply
 had locks around the already downcased version.
 - deleting unused functions
 - package comment
 - magic numbers replaced by golang constants
 - comments all over

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-08-27 22:07:42 -07:00
Zhang Wei
3d6617ffe7 fix golint warnings/errors on package api/types/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-08-07 09:43:43 +08:00
Antonio Murdaca
b2d06b6fba Move sysinfo out of daemon struct
sysinfo struct was initialized at daemon startup to make sure
kernel configs such as device cgroup are present and error out if not.
The struct was embedded in daemon struct making impossible to detect
if some system config is changed at daemon runtime (i.e. someone
umount the memory cgroup). This leads to container's starts failure if
some config is changed at daemon runtime.
This patch moves sysinfo out of daemon and initilize and check it when
needed (daemon startup, containers creation, contaienrs startup for
now).

Signed-off-by: Antonio Murdaca <runcom@linux.com>
(cherry picked from commit 472b6f66e0)
2015-08-06 15:46:09 -07:00
Hu Keping
7390cc5300 Fix golint warning on pkg/sysinfo
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-08-01 18:24:49 +08:00