Commit Graph

57 Commits

Author SHA1 Message Date
3077005306 Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ff42a2eb41a86217a440a1c4b2afd3c4cd1d48ac
Component: engine
2016-11-30 10:11:42 -08:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
3affb6aba8 Implementing support for --cpu-rt-period and --cpu-rt-runtime so that
containers may specify these cgroup values at runtime. This will allow
processes to change their priority to real-time within the container
when CONFIG_RT_GROUP_SCHED is enabled in the kernel. See #22380.

Also added sanity checks for the new --cpu-rt-runtime and --cpu-rt-period
flags to ensure that that the kernel supports these features and that
runtime is not greater than period.

Daemon will support a --cpu-rt-runtime flag to initialize the parent
cgroup on startup, this prevents the administrator from alotting runtime
to docker after each restart.

There are additional checks that could be added but maybe too far? Check
parent cgroups to ensure values are <= parent, inspecting rtprio ulimit
and issuing a warning.

Signed-off-by: Erik St. Martin <alakriti@gmail.com>
Upstream-commit: 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
Component: engine
2016-10-26 11:33:06 -04:00
6e5d016ba6 Update containerd and runc
containerd: 837e8c5e1cad013ed57f5c2090c8591c10cbbdae
runc: 02f8fa7863dd3f82909a73e2061897828460d52f

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 7e12c3bb99381f117be73e05c187be6ce44280b9
Component: engine
2016-10-05 14:47:15 -07:00
ba822f35dd make more pkgs support darwin
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: bd11a269bc114334cf6160ba38e396f8f0e3aecd
Component: engine
2016-08-10 22:56:05 +08:00
3aada352fd Fix s390x build failure by removing golang.org/x/sys
This fix tries to fix the issue raised in #24168 where
golang.org/x/sys causes s390x build failure.

This fix removed the import of "golang.org/x/sys/unix".

This fix fixes #24168.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f3d8658fffbf901845c937a40efa66a5b06cdfc3
Component: engine
2016-06-30 06:32:32 -07:00
a6603c31a0 Fix wrong CPU count after CPU hot-plugging on Windows
This fix tries to fix wrong CPU count after CPU hot-plugging.
On windows, GetProcessAffinityMask has been used to probe the
number of CPUs in real time.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3707a76921b412cb42e6134beaa0bddbb5e08f25
Component: engine
2016-06-25 22:20:29 -07:00
bde674f465 Fix wrong CPU count after CPU hot-plugging
This fix tries to address issues raised in #23768 where the CPU count
is not updated after cpu ho-plugging.

This fix follows the suggestion from #23768 and replace go's `runtime.NumCPU()`
with `sysconf(_SC_NPROCESSORS_ONLN)` so that correct CPU count could
be obtained even after CPU hot-plugging.

This fix is tested manually, as is suggested in #23768.

This fix fixes #23768.

The NumCPU() in Linux is based on @wmark 's implementation.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8b2383f5c1108c590928c0e6c57f1f0aa0dd36f6
Component: engine
2016-06-25 20:48:36 -07:00
763e6c326e *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 44ccbb317c2ca67fd8a88147b1ff80ce83d453cc
Component: engine
2016-06-11 19:42:38 +02:00
3a35464d9d Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: 86d8758e2bb5e9d21d454ceda90b33feb8e74771
Component: engine
2016-05-23 16:37:12 -07:00
de84e87a00 pids limit support
update bash commpletion for pids limit

update check config for kernel

add docs for pids limit

add pids stats

add stats to docker client

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 69cf03700fed7bf5eb7fe00c9214737e21478e49
Component: engine
2016-03-08 07:55:01 -08:00
9fe49cb009 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>
Upstream-commit: 5b3fc7aab25be908cab869dab5c0b2cb821d31dc
Component: engine
2016-03-01 10:37:05 -06:00
2f86eee3b4 Reuse subsystems mountpoints between checks
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 781a33b6e77a122f2a171a941da3a1798fc73c27
Component: engine
2016-01-20 19:20:59 -08:00
cb5c9d856b check seccomp is configured in the kernel
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 40d5ced9d00113744555ff13f4e62617dda5f1e2
Component: engine
2016-01-12 09:45:21 -08:00
a04e1f9592 Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 843084b08b521a70baf9284ec4e23e941ab38367
Component: engine
2015-12-21 09:14:49 +08:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
7be0f9667b Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 3f15a055e5c50d0f08d4c3e7cd9618d537b84f29
Component: engine
2015-12-04 09:26:03 +08:00
1a0735060a Add support for blkio.weight_device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 0fbfa1449d917ee0778266139d6035fb0782f7c2
Component: engine
2015-11-11 23:06:36 +08:00
360eb92f7d Validate --cpuset-cpus, --cpuset-mems
Before this patch libcontainer badly errored out with `invalid
argument` or `numerical result out of range` while trying to write
to cpuset.cpus or cpuset.mems with an invalid value provided.
This patch adds validation to --cpuset-cpus and --cpuset-mems flag along with
validation based on system's available cpus/mems before starting a container.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 94464e3a5e1dce0f6b3e821f79fe193278f67dba
Component: engine
2015-09-27 16:38:58 +02:00
4f3fe3187a Add support for memory reservation
Signed-off-by: qhuang <qhuang@10.0.2.15>
Upstream-commit: aa1780997f42a3fbe3a7f9c7be2b8a5092b9b7c1
Component: engine
2015-09-23 14:02:45 +08:00
3004521c7f Add support for kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b6f1b4ad350cbf1f540797eee44520694237d47c
Component: engine
2015-08-19 23:56:55 +08:00
a2576f3ffa Merge pull request #15380 from calavera/remove_sys_info_pointers
Remove pointers from the SysInfo struct.
Upstream-commit: f1da5edc8b1404a302b02d38a60bba91c4bcd965
Component: engine
2015-08-17 18:40:54 -07:00
0f41d6e091 Remove pointers from the SysInfo struct.
Because they can just be values.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: c2bc637a0306657a86f3739bd5bdcd5db8d22539
Component: engine
2015-08-06 15:57:21 -07:00
0655529aa6 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 472b6f66e03f9a85fe8d23098dac6f55a87456d8)
Upstream-commit: b2d06b6fba307a8972d08477ef8b711e31ace433
Component: engine
2015-08-06 15:46:09 -07:00
f23264da83 Check sysinfo for Cpuset cpu.shares and blkio
Carried: #14015

If kernel is compiled with CONFIG_FAIR_GROUP_SCHED disabled cpu.shares
doesn't exist.
If kernel is compiled with CONFIG_CFQ_GROUP_IOSCHED disabled blkio.weight
doesn't exist.
If kernel is compiled with CONFIG_CPUSETS disabled cpuset won't be
supported.

We need to handle these conditions by checking sysinfo and verifying them.

Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b7599d58cb103e3b13b3a51553fd69f5f8b60893
Component: engine
2015-08-05 22:35:18 +08:00
cd1228889c Fix golint warning on pkg/sysinfo
Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: 7390cc5300d260a853c68d6eb25493fefaecca43
Component: engine
2015-08-01 18:24:49 +08:00
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
d9e652a366 Update libcontainer
Replaced github.com/docker/libcontainer with
github.com/opencontainers/runc/libcontaier.
Also I moved AppArmor profile generation to docker.

Main idea of this update is to fix mounting cgroups inside containers.
After updating docker on CI we can even remove dind.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c86189d554ba14aa04b6314970d3699e5ddbf4de
Component: engine
2015-07-16 16:02:26 -07:00
11e2c4a554 Add the memory swappiness tuning option to docker.
Memory swappiness option takes 0-100, and helps to tune swappiness
behavior per container.
For example, When a lower value of swappiness is chosen
the container will see minimum major faults. When no value is
specified for memory-swappiness in docker UI, it is inherited from
parent cgroup. (generally 60 unless it is changed).

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Upstream-commit: 921da495d24695dda66d3f58e78887dd0bc2402e
Component: engine
2015-07-12 13:16:33 +05:30
46e26ed16e Fix sysinfo regression
The cleanup to sysinfo package introduced a regression.

If memory cgroup isn't supported and --memory is specified when
starting a container, we should return info instead of nil in
checkCgroupMem(), otherwise we'll access a nil pointer.

Signed-off-by: Zefan Li <lizefan@huawei.com>
Upstream-commit: 439869320177f56a559ef189f5ce29f24cf99e12
Component: engine
2015-06-19 09:44:23 +08:00
73618ddb2e cleanup sysinfo package
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9b05aa6ee8e628695b3661b2c5a438f61330ba53
Component: engine
2015-06-17 20:41:14 -04:00
a2d8dcc9ab Add bridge-nf-call-iptables/bridge-nf-call-ipv6tables to docker info
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 57d12a0e0aca49ddd4baad3d37b77f31d63ff70b
Component: engine
2015-06-17 09:19:11 +08:00
fb9d7fcfdc Windows: Refactor sysinfo for compilation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7ee717a10db00858c441f78f2f1a47e2a9493a1
Component: engine
2015-05-14 09:44:51 -07:00
71b540c581 Remove redundant warning
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: a8250a0b20006bae669f9d127eaf00d4284e1d9f
Component: engine
2015-05-12 18:02:30 +08:00
560ba9b809 add cpu.cfs_period_us support
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dccb8b5c339e218222bae4ce74bbeccb9e020c82
Component: engine
2015-05-09 10:02:46 +08:00
ad3d66108b Feature: option for disable OOM killer
Add cgroup support for disable OOM killer.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: a4a924e1b6c50f0f02460489259d73468a6c282e
Component: engine
2015-05-04 21:11:29 +08:00
135331b0d1 Merge pull request #12664 from Mashimiao/sysinfo-support-ipv4_forward-check
sysinfo: add IPv4Forwarding check
Upstream-commit: fc9033a9c89a86e28d77053b0737aecbb068246d
Component: engine
2015-04-30 11:44:44 -04:00
22db717a0c simplify memory limit check
If memory cgroup is mounted, memory limit is always supported,
no need to check if these files are exist.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 667b1e220cf82fb77fd776426a4b712ae5fee0ae
Component: engine
2015-04-24 08:43:44 +08:00
af1b9c60d9 add devices cgroup check and errors
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 47e5acfbaefc45e536b953af6bf8a3993669c816
Component: engine
2015-04-24 08:37:59 +08:00
44bb7756b2 sysinfo: add IPv4Forwarding check
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 05418df539dfed118da099aacfe4250f2f6ad5e0
Component: engine
2015-04-23 12:19:46 +08:00
3a0cec3089 remove redundant warning
And warning is not supposed to have a prefix WARNING.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f3dc35169780e1555b4116986649b729cb80b5d1
Component: engine
2015-04-22 08:15:00 +08:00
f8f4bcdb38 Add support cpu cfs quota
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: dcc50e1d593fd7995189872791c6d7a013f16970
Component: engine
2015-04-20 08:16:47 -07:00
e9805495bf Update inline doc for New
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
Upstream-commit: 3716df57c097803dec220ff95fffdae8394145fc
Component: engine
2015-03-27 13:55:22 -04:00
cce1904e9d Add missing . in comment
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
Upstream-commit: 6abe160eaec49c693b69d14304fe39d78ea4abb4
Component: engine
2015-03-26 23:22:05 -04:00
b0def5e5a0 Add some basic doc for SysInfo
Signed-off-by: Eric Rafaloff <erafaloff@gmail.com>
Upstream-commit: 01bbc3fbb9c3ab3dec0f271710739465b0f80b7a
Component: engine
2015-03-26 23:05:07 -04:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
ad6ee8ec46 fix warning messages
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: bffe04b582d143f074297b260a359dfb54a7763b
Component: engine
2015-03-11 08:47:45 +08:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
1429a5fb4a update sysinfo to logrus
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 0a37f836adef969e9e5aa9ce7b2c465f9441c1a5
Component: engine
2014-10-27 18:59:02 +00:00
86a79a73e0 update MAINTAINERS files
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 06248d745a6a69b14595a699e0e5b3e883d8ea3a
Component: engine
2014-06-16 22:20:07 +00:00