e178abd17a
Merge pull request #5328 from crosbymichael/refactor-cgroups
...
Refactor cgroups into subsystems and support metrics
Upstream-commit: 781671245778c8cfdde1892204bb10899020b0d8
Component: engine
2014-04-21 14:06:17 -07:00
9f1c340e38
Merge pull request #5223 from crosbymichael/load-profile
...
Use apparmor parser directly
Upstream-commit: c0d5eac120913ac1c52f2abf41c454bbf0242263
Component: engine
2014-04-21 21:50:59 +03:00
1ea14534fa
Merge branch 'master' into load-profile
...
Conflicts:
daemon/execdriver/native/create.go
daemon/execdriver/native/driver.go
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net > (github: creack)
Upstream-commit: 813cebc64fb4b628e2938405d86144060c330eb9
Component: engine
2014-04-21 10:32:13 -07:00
eec18ea747
Make sure @proc is defined
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net > (github: creack)
Upstream-commit: ac814ee3c76a3851d361e8dddfed7ac93ddf10e2
Component: engine
2014-04-21 10:28:04 -07:00
7aff9b75c9
Use cgo to get systems clock ticks for metrics
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 004cf556e86a03d8961416b3e8a0a476a424b10f
Component: engine
2014-04-21 10:26:22 -07:00
f2dbe8f1d1
Refactor stat parsing to use only 8 fields
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: f59be989dc92503f29aa94ebf9ea4097ec28b8c9
Component: engine
2014-04-20 20:45:08 -07:00
3973334e17
work on cpu stats
...
Docker-DCO-1.1-Signed-off-by: Evan Hazlett <ejhazlett@gmail.com > (github: ehazlett)
Upstream-commit: 2f24b5a9dcc9ca5da07563fb0dd381e49ed844cc
Component: engine
2014-04-21 00:07:05 -04:00
d5fdf0aaaa
Add freezer stats
...
This one is a problem because the most useful stat is a string and not a
float like verything else. We may have to change the return type
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: bce49dff0d46dec620e755ed859efa791054a843
Component: engine
2014-04-20 18:35:33 -07:00
a0be7fcb46
Reuse cpuacct stats for cpu subsystem
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 3bfe13de2c38fda5b57e2499f474da701495c5ba
Component: engine
2014-04-20 18:20:44 -07:00
2f3e3558eb
Fix parsing of blkio files
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 37248039e186f57768bb5c4fad23b1bca65448f7
Component: engine
2014-04-20 18:18:17 -07:00
030a007d36
Add external function to get cgroup stats
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 7f12260fd13329f3bafe4b42ad4193ff963bb1e2
Component: engine
2014-04-20 17:36:20 -07:00
af2fbf289d
Refactor stats and add them to all subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 9b65f1635515fa35ed38f8a76b6d8f73ab3a1d02
Component: engine
2014-04-20 12:02:39 -07:00
1b76554adc
Squashed commit of the following:
...
commit 75af1649b063abbc5d662fd2f8bc4ff62c927687
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 01:32:42 2014 -0400
more refactor
commit 43b36d0f15d634497127bcb17dacaa70ae92e903
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 01:11:49 2014 -0400
refactored cgroup param parsing to util func
commit e3738b0168a075bd92ec828879b0e46bdbbe3845
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:57:19 2014 -0400
dat error checking
commit 57872bcc59403ecd308cfe97c78f73d6ca58d165
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:43:25 2014 -0400
proper use of fmt.Errorf
commit 43dad6acc0cb21aac2b04ce074699879898ee820
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:36:45 2014 -0400
proper placement of defer
commit b7f20b934b2bc92cd39397dbc608b77bff28493c
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:34:39 2014 -0400
defers, error checking, panic avoidance
commit 7a9a6ff267f8806dfe6676486f73fe89b72968fb
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:22:00 2014 -0400
data param to use container info instead of host
commit 0e0cf7309be1644687160d6519db792b23cd26e9
Author: Evan Hazlett <ejhazlett@gmail.com >
Date: Sun Apr 20 00:11:29 2014 -0400
added stats for cpuacct, memory, and blkio
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 86e34ce59fb7f6e6e284a33f2538bafdc9114c89
Component: engine
2014-04-20 11:34:28 -07:00
112b738831
Add remove method to subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 7fdeda87173ee6722ef1cbe7b21a13ac8b173365
Component: engine
2014-04-18 22:17:31 -07:00
39b03cf53c
Break down groups into subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: e92f2fd3950644a6e5eb38259cee9036648090cb
Component: engine
2014-04-18 22:10:30 -07:00
fec63c3950
Move raw cgroups into fs package (filesystem)
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 06db0604e5e5438dc14e13a069ebddcab7bb4bc6
Component: engine
2014-04-18 21:34:26 -07:00
91235494a6
Move systemd code into pkg
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: ec43ec50b44cff3f043c78cad97466c68e2ba8cd
Component: engine
2014-04-18 21:30:08 -07:00
0b62a2c5be
Refactor cgroups file locations
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 42fb2973c690fe4e4f65da235ce4dfa4c388e8a3
Component: engine
2014-04-18 21:14:58 -07:00
da097b4451
SQLite is also available in FreeBSD
...
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com > (github: kzys)
Upstream-commit: 92ea101bc4a498e952ede00bff53d0123f22f41c
Component: engine
2014-04-17 07:19:30 +09:00
d953b1e434
Generate imports based on what is avaliable
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 3061a6a2ab0395c626f9acaa2e5d9c17152b0475
Component: engine
2014-04-14 05:22:45 +00:00
fbaa43b382
Ignore not exist errors for joining default subsystems
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 184728e7bcf9af3224f53e8d5d38d44b08de24ec
Component: engine
2014-04-14 00:07:48 +00:00
0ac428f052
Merge pull request #5132 from crosbymichael/fix-cgroup-hiar
...
Setup cgroups for supported subsystems
Upstream-commit: 5fc1b4d2cd76cb0d04f66c85424d54408e70037f
Component: engine
2014-04-14 10:56:15 -07:00
156fab79f3
Merge pull request #4878 from kzys/freebsd-utimes
...
Support FreeBSD on pkg/system/utimes_*.go
Upstream-commit: f98ed28c1dd5766cb8c80f32418f13878df29e6c
Component: engine
2014-04-14 10:39:25 -07:00
4b3fd1c81f
Ignore is not exist error
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 6c26a87901d12188dfd9986d9211f6077a286f9d
Component: engine
2014-04-14 00:03:35 +00:00
ebb2ad0565
Move apparmor to top level pkg
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 052cc5a6378ee4bbe1ef79e5632e2439d68ddbde
Component: engine
2014-04-13 23:33:25 +00:00
b85f5791ad
Use apparmor_parser directly
...
The current load script does alot of things. If it does not find the
parser loaded on the system it will just exit 0 and not load the
profile. We think it should fail loudly if it cannot load the profile
and apparmor is enabled on the system.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 5f4bc4f916f433a4ba258980a6c2fbdbd76d64f3
Component: engine
2014-04-13 23:31:10 +00:00
5b7c5b263f
Join memory and cpu cgroup in systemd too
...
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com > (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com > (github: crosbymichael)
Upstream-commit: 4ddfffcab3edf3d05ee8319e87410fe747979a04
Component: engine
2014-04-11 17:29:40 +00:00
9ba641b0ce
Join cpuacct, freezer, perf_event, and blkio groups
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 505184d2dcb5d21834bcb2b108564fbdab733953
Component: engine
2014-04-11 17:28:27 +00:00
b455526c28
Setup cgroups for all subsystems
...
Fixes #5117
Fixes #5118
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 031fcb31d3a81fbd5c5ab8d898d53fbd486413e6
Component: engine
2014-04-11 17:28:27 +00:00
4ea377c1c7
Merge pull request #5143 from kzys/ns-nil
...
Avoid "invalid memory address or nil pointer dereference" panic
Upstream-commit: b8c10d8af254a6200de642e246b5a0d9de0dfca8
Component: engine
2014-04-10 11:07:35 -07:00
39bbc0e47b
Merge pull request #5131 from crosbymichael/shm-mode
...
Change shm mode to 1777
Upstream-commit: 042a50a8fe1e54ce602d1c517091381c209eabf3
Component: engine
2014-04-10 07:50:32 -07:00
b4f2aeb444
Merge pull request #5115 from alexlarsson/fix-libcontainer-network-rhel6
...
Fix libcontainer network support on rhel6
Upstream-commit: 5b242c95da303ee26d3119678340050670fed45a
Component: engine
2014-04-10 07:45:12 -07:00
9a57be369c
Avoid "invalid memory address or nil pointer dereference" panic
...
libcontainer.GetNamespace returns nil on FreeBSD because
libcontainer.namespaceList is empty. In this case, Namespaces#Get should
return nil instead of being panic.
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com > (github: kzys)
Upstream-commit: c5226d94fab4e261fe2407262d9b5177326d4062
Component: engine
2014-04-10 22:07:29 +09:00
5b3ff631ca
Support FreeBSD on pkg/system/utimes_*.go
...
Implement system.LUtimesNano and system.UtimesNano. The latter might be
removed in future because it's basically same as os.Chtimes. That's why
the test is mainly focusing LUtimesNano.
Docker-DCO-1.1-Signed-off-by: Kato Kazuyoshi <kato.kazuyoshi@gmail.com > (github: kzys)
Upstream-commit: 1c90a4dd9a83526ca3837ab9231ff6a9af07e072
Component: engine
2014-04-10 07:34:37 +09:00
7b99942ebd
Fix libcontainer network support on rhel6
...
It seems that netlink in older kernels, including RHEL6, does not
support RTM_SETLINK with IFLA_MASTER. It just silently ignores it, reporting
no error, causing netlink.NetworkSetMaster() to not do anything yet
return no error.
We fix this by introducing and using AddToBridge() in a very similar manner
to CreateBridge(), which use the old ioctls directly.
This fixes https://github.com/dotcloud/docker/issues/4668
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com > (github: alexlarsson)
Upstream-commit: 59c1b2880be8fb9d9a632fa42a10097c1580591a
Component: engine
2014-04-09 15:44:18 +02:00
6caf919b33
Revert "Support hairpin NAT without going through docker server"
...
This reverts commit b39d02b611f1cc0af283f417b73bf0d36f26277a.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 63c303eecdbaf4dc7967fd51b82cd447c778cecc
Component: engine
2014-04-09 11:55:08 +00:00
855754fa1c
Change shm mode to 1777
...
Fixes #5126
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 986cf931c38b8cdc51da44af0313502ca1156cfc
Component: engine
2014-04-09 10:53:32 +00:00
7d69f5cd99
Check for apparmor enabled on host to populate profile
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 87f0d63fb2ede63d263d8e8285b83a7f7d12bbf3
Component: engine
2014-04-09 10:22:17 +00:00
c2ee8e861a
Backup current docker apparmor profile and replace it with the new one
...
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net > (github: creack)
Upstream-commit: 4f828d67f00449182eaada50dfba37e00f8f01ef
Component: engine
2014-04-08 11:09:31 -07:00
06d3bd0a02
Merge pull request #5049 from Supermathie/aa-fix
...
apparmor: docker-default: Include base abstraction
Upstream-commit: 8cfbc4466151666417a1245422ce0cb773d6d260
Component: engine
2014-04-07 21:34:01 -07:00
a8f5408909
Merge pull request #5025 from dstine/readme-fix
...
fixed two readme typos
Upstream-commit: 1d2126be6cf9937ee5ec2174aa2e2d02c07eb40c
Component: engine
2014-04-07 19:31:16 -07:00
9045165305
fixed three more typos
...
Upstream-commit: 9c4d10b9a91b9f11794ceb094331496c733410bb
Component: engine
2014-04-07 22:09:15 -04:00
ba83763b84
Ensure that ro mounts are remounted
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: b6042f252dd8a0c7a75da481b667f89c2e4ab071
Component: engine
2014-04-07 18:23:22 -07:00
bbc3856401
Remove and unexport selinux functions
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 028d44d12683b170704537c3435361ae8a4e74d8
Component: engine
2014-04-07 14:59:44 -07:00
3a7c03a563
Ensure that selinux is disabled by default
...
This also includes some portability changes so that the package can be
imported with the top level runtime.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: 82f37b874ea17c5e0040f3e41dc761c88d576e33
Component: engine
2014-04-07 14:44:53 -07:00
b9794db272
Add more label checks for selinux enabled
...
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com > (github: crosbymichael)
Upstream-commit: aaf018017c88a707b35115a9411e4069d9356748
Component: engine
2014-04-07 14:44:53 -07:00
22496306d5
apparmor: pull in variables from tunables/global
...
The variables that were defined at the top of the apparmor profile are best
pulled in via the <tunables/global> include.
Docker-DCO-1.1-Signed-off-by: Michael Brown <michael.brown@discourse.org > (github: Supermathie)
Upstream-commit: 726206f2aa45b8a537ae6d6c819f21befc2e0aca
Component: engine
2014-04-07 03:04:27 -04:00
ee2b8b0673
apparmor: abstractions/base expects pid variable
...
Add 'pid' variable pointing to 'self' to allow parsing of profile to succeed
Docker-DCO-1.1-Signed-off-by: Michael Brown <michael.brown@discourse.org > (github: Supermathie)
Upstream-commit: 320b3e0d211d389addda02998a0f47839827b2af
Component: engine
2014-04-07 02:47:43 -04:00
70e9ec0c23
apparmor: docker-default: Include base abstraction
...
Encountered problems on 14.04 relating to signals between container
processes being blocked by apparmor. The base abstraction contains
appropriate rules to allow this communication.
Docker-DCO-1.1-Signed-off-by: Michael Brown <michael.brown@discourse.org > (github: Supermathie)
Upstream-commit: e35c23311fce853fab318527789f11cc8c150ea2
Component: engine
2014-04-07 02:19:38 -04:00
435555c277
fixed two readme typos
...
Upstream-commit: bea71245c8165e0dfdc6b2485c548c04f4d3edd3
Component: engine
2014-04-04 08:12:17 -04:00