Commit graph

85 commits

Author SHA1 Message Date
Michael Crosby
89986cbff4 Add --oom-score-adjust to daemon
This adds an `--oom-score-adjust` flag to the daemon so that the value
provided can be set for the docker daemon's process.  The default value
for the flag is -500.  This will allow the docker daemon to have a
less chance of being killed before containers do.  The default value for
processes is 0 with a min/max of -1000/1000.

-500 is a good middle ground because it is less than the default for
most processes and still not -1000 which basically means never kill this
process in an OOM condition on the host machine.  The only processes on
my machine that have a score less than -500 are dbus at -900 and sshd
and xfce( my window manager ) at -1000.  I don't think docker should be
set lower, by default, than dbus or sshd so that is why I chose -500.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit a894aec8d8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:14:57 -07:00
Lei Jitang
ecffb6d58c Daemon to support network restore
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-14 16:45:25 -07:00
Kenfe-Mickael Laventure
7b2e5216b8 Add support for multiples runtimes
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Antonio Murdaca
44ccbb317c *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-11 19:42:38 +02:00
Alexander Morozov
9f1a121259 Merge pull request #22774 from Microsoft/jjh/client
Windows: Daemon default to Hyper-V containers on client
2016-05-23 11:29:50 -07:00
John Howard
ef2db56bcf Windows: Default to Hyper-V Containers on client
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-21 11:29:53 -07:00
Alessandro Boch
6eb2b903a3 Docker changes for libnetwork vendoring b66c038
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-16 15:04:01 -07:00
Darren Stahl
8df2066341 Add IO Resource Controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-04-25 13:07:29 -07:00
Vincent Demeester
172ca1ca8c Merge pull request #20924 from Microsoft/10662-CPUResourceControls
Add CPU count and maximum resource controls for Windows
2016-04-15 08:14:59 +02:00
Darren Stahl
ea8c690886 Add CPU count and maximum resource controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-04-14 15:40:25 -07:00
David Calavera
f62b26571a Merge pull request #21894 from Microsoft/sjw/nanoserver-fix
Fixing warning to correctly output error string.
2016-04-08 16:43:07 -07:00
Stefan J. Wernli
3c220cfcba Fixing warning to correctly output error string.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-08 15:04:04 -07:00
Brian Goff
7f865e4953 Merge pull request #21777 from Microsoft/jjh/killTP4
Windows: So long TP4, so long...
2016-04-08 09:33:23 -04:00
John Howard
d5ef62f489 Merge pull request #21872 from Microsoft/sjw/nanoserver-fix
Fixing nanoserver image load bug.
2016-04-07 21:24:32 -07:00
John Starks
d45a26d7e2 Windows: Support non-base-layered images
Previously, Windows only supported running with a OS-managed base image.
With this change, Windows supports normal, Linux-like layered images, too.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-07 17:52:26 -07:00
Stefan J. Wernli
a22092b136 Fixing nanoserver image load bug.
Fixes an issue that prevents nano server images from loading properly. Also updates logic for custom image loading to avoid preventing daemon start because an image failed to load.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-07 16:44:51 -07:00
John Howard
5175c9a5ea Windows: So long TP4, so long...
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-05 16:39:27 -07:00
John Starks
194eaa5c0f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-04 13:14:57 -07:00
Tonis Tiigi
14dc4a7158 Expose RootFS in image inspect
Fixes #20451

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 13:49:30 -07:00
John Howard
4461bc45b6 Windows: Fix unmount for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-18 20:43:46 -07:00
John Howard
94d70d8355 Windows libcontainerd implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Darren Stahl <darst@microsoft.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-18 13:38:41 -07:00
msabansal
e8026d8a98 Windows libnetwork integration
Signed-off-by: msabansal <sabansal@microsoft.com>
2016-03-09 20:33:21 -08: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
Qiang Huang
8ae6f6ac28 Support update swap memory only
We should support update swap memory without memory.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-02-24 13:36:47 +08:00
Alessandro Boch
ed364b69df Invoke ReloadConfiguration on network controller
- It reverts fa163f5619 plus a small change
  in order to allow passing the global scope datastore
  to libnetwork after damon boot.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-02-18 12:14:14 -08:00
Antonio Murdaca
140a74347d daemon_unix: set golang runtime max threads
SetMaxThreads from runtime/debug in Golang is called to set max threads
value to 90% of /proc/sys/kernel/threads-max

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-01-30 21:37:24 +01:00
Vincent Demeester
141a301dca Merge pull request #19154 from hqhq/hq_verify_cgroupparent
Verify cgroup-parent name for systemd cgroup
2016-01-26 11:44:31 +01:00
David Calavera
c539be8833 Allow network configuration via daemon config file.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-25 18:54:56 -05:00
Qiang Huang
5ce5a8e966 Verify cgroup-parent name for systemd cgroup
Fixes: #17126

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-01-22 21:17:23 -05:00
Phil Estes
557c7cb888 Move userns support out of experimental into master
Adds the `--userns-remap` flag to the master build

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-01-08 15:06:22 -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
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
Sebastiaan van Stijn
1105caa7f1 Merge pull request #18860 from dnephin/remove_migrate_if_downlevel
Remove migrateIfDownlevel and aufs migration from docker pre-0.7
2015-12-23 00:08:36 +01:00
Daniel Nephin
0673361ef6 Remove migrateIfDownlevel and aufs migration from docker pre-0.7
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-22 16:45:42 -05:00
David Calavera
7ac4232e70 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-22 13:34:30 -05:00
Ma Shimiao
843084b08b Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-21 09:14:49 +08:00
Tonis Tiigi
2655954c2d Add own reference package wrapper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-12-16 11:58:52 -08:00
Ma Shimiao
3f15a055e5 Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-12-04 09:26:03 +08:00
David Calavera
6bb0d1816a Move Container to its own package.
So other packages don't need to import the daemon package when they
want to use this struct.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-12-03 17:39:49 +01:00
Qiang Huang
4089b4e440 Set default MemorySwappiness when adapt
It makes the inspect result consistent between cli and REST api
when MemorySwappiness is not set.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-12-02 10:53:52 +08:00
Tonis Tiigi
20e759ab56 Validate adding digests to tagstore with go types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-11-25 15:06:51 -08: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
David Calavera
060f4ae617 Remove the container initializers per platform.
By removing deprecated volume structures, now that windows mount volumes we don't need a initializer per platform.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-11-18 08:41:46 -05:00
John Howard
b2771b4456 Windows: Disable links
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-15 21:32:31 -08:00
John Howard
2648655a4a Remove uncalled configureSysInit
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-13 13:43:09 -08:00
Vincent Demeester
588fedef4a Merge pull request #17949 from Microsoft/jjh/cpuweighttp4
Windows: TP4 fix cpu weight
2015-11-12 21:13:09 +01:00
Vincent Demeester
812a1c149a Merge pull request #13959 from Mashimiao/add-support-blkio_weight_device
Add support for blkio.weight_device
2015-11-12 20:42:13 +01:00
John Howard
90eac6b48b Windows: TP4 fix cpu weight
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-12 11:08:24 -08:00
John Howard
122568b314 Windows [TP4] Require build 10586+
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-11-11 14:49:14 -08:00
Ma Shimiao
0fbfa1449d Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-11-11 23:06:36 +08:00