Sebastiaan van Stijn
9eba4b1b6c
Merge pull request #11034 from HuKeping/oom_kill_disable
...
enable cgroups memory.oom_control
Upstream-commit: ac324e5e52af1f2489320f3bdb7e2ebbd83ee869
Component: engine
2015-05-04 11:53:05 -04:00
unclejack
af54781255
Merge pull request #12943 from tianon/go-patricia-v2
...
Update go-patricia to 2.1.0
Upstream-commit: 175339ffb6c7d6e4c2aa78f01f227643a0d97c42
Component: engine
2015-05-04 16:28:03 +03:00
HuKeping
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
Doug Davis
6fb6ee62f9
Merge pull request #12888 from jmzwcn/patch-3
...
`docker images` friendly duration gets unfriendly after a while
Upstream-commit: e8bbd87ba831dbda27bad452cd367a8e7e34f584
Component: engine
2015-05-03 11:09:25 -04:00
Daniel Zhang
5b22f64f34
docker images friendly duration gets unfriendly after a while
...
fix #12852
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com >
Upstream-commit: 28ea4a63d00e9d0e28375adc80d24461193e7a28
Component: engine
2015-05-03 21:19:18 +08:00
Tianon Gravi
ba5fba5a8d
Update go-patricia to 2.1.0
...
This includes a fix for the minor v2 API change introduced by https://github.com/tchap/go-patricia/commit/341a37095fea62f400f449e4ec0192702d6e019e . 👍
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com >
Upstream-commit: b447fef7ecb740bc0f9ece75e10926fc5f121b5c
Component: engine
2015-05-02 23:25:57 -06:00
Tianon Gravi
7bd38d02c2
Finally remove our copy of "archive/tar" now that Go 1.4 is the minimum!
...
IT'S ABOUT TIME. 🎉
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com >
Upstream-commit: 576985a1dcd76a9af2c5c483e6f12035a1f47b96
Component: engine
2015-05-01 16:01:10 -06:00
Alexander Morozov
c72735069d
Fix race in FirewalldInit
...
It was possible that signalHandler won't start because connections is
not assigned.
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
Upstream-commit: a05bcd12c44b4daada51267d89fd9ac53812be02
Component: engine
2015-05-01 13:35:54 -07:00
Michael Crosby
b17cfc7a0a
Merge pull request #12841 from Mashimiao/use-CustomSize-to-replace-intToString
...
use CustomSize replace intToString
Upstream-commit: d2e380b687ddf7fa83ff3a17add41278300926b7
Component: engine
2015-04-30 17:24:41 -07:00
Michael Crosby
207d227709
Merge pull request #12900 from gaurav-gosec/master
...
Make use of iptablesPath variable which has the path of iptables, instea...
Upstream-commit: 5221fd2ba5fbf78ad7a5d4edf039d54ae32141ef
Component: engine
2015-04-30 16:12:03 -07:00
Tibor Vass
203abf3991
Merge pull request #12771 from runcom/say-bye-to-engine
...
Remove engine
Upstream-commit: 0d0b42547e74e183c7c459a13877bd27c21dba0c
Component: engine
2015-04-30 12:18:16 -04:00
Brian Goff
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
Gaurav
be98ccedad
Make use of iptablesPath variable which has the path of iptables, instead of using string iptables directly
...
Signed-off-by: Gaurav <gaurav.gosec@gmail.com >
Upstream-commit: 1d5f1bb0f5689be2f0262163ec05930e233f0ad0
Component: engine
2015-04-30 18:22:12 +05:30
Antonio Murdaca
016ac4bf61
Remove engine mechanism
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 531f4122bdcd4de289f613a5ef010f4c1989f098
Component: engine
2015-04-30 01:35:16 +02:00
Vincent Demeester
f9039974fb
Add coverage on pkg/fileutils
...
Should fix #11598
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
Upstream-commit: 8454e1a3b24e2e076bb08a2a6b1fcb56efe2924e
Component: engine
2015-04-29 16:27:12 +02:00
Ma Shimiao
382de8a5eb
use CustomSize replace intToString
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com >
Upstream-commit: 8a2f8992865a706df30eb23bd861444a5ecf6198
Component: engine
2015-04-29 08:30:25 +08:00
buddhamagnet
bc3d7f1531
add support for exclusion rules in dockerignore
...
Signed-off-by: Dave Goodchild <buddhamagnet@gmail.com >
Upstream-commit: 6fd8e485c85c4f8ca62578d0840bdeddc4cba151
Component: engine
2015-04-28 18:56:45 +01:00
Brian Goff
fb5280aecd
Merge pull request #11882 from hqhq/hq_warn_device_cg
...
add devices cgroup check as hard requirement
Upstream-commit: a07e96352600fe69ff82aeb39725f142dac06ac7
Component: engine
2015-04-27 18:42:57 -04:00
Phil Estes
0b5b481a6d
Merge pull request #12828 from tdmackey/trivial-spelling
...
trivial: typo cleanup
Upstream-commit: 0153edcda1527cd19f5952046b51c4e8358d01ed
Component: engine
2015-04-27 17:05:46 -04:00
David Mackey
ae74d9f34f
trivial: typo cleanup
...
Signed-off-by: David Mackey <tdmackey@booleanhaiku.com >
Upstream-commit: 3941623fbc3fa724d61f53121513ffd87d03b61c
Component: engine
2015-04-27 13:35:08 -07:00
Antonio Murdaca
954f940156
Small if err cleaning
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 844538142d95c1b7dda1bb2903179510105fe9b5
Component: engine
2015-04-27 21:50:33 +02:00
Antonio Murdaca
e5f7f8da6f
Replace json.Unmarshal with json.Decoder().Decode()
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 26543e03095eaa45d9afc12c029f07539323fee5
Component: engine
2015-04-26 15:02:01 +02:00
Vincent Demeester
3e9177d587
Add coverage on pkg/archive
...
Add tests on:
- changes.go
- archive.go
- wrap.go
Should fix #11603 as the coverage is now 81.2% on the ``pkg/archive``
package. There is still room for improvement though :).
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
Upstream-commit: c21d408ad24cf8e2b5bd761d562fae7e3ae1bc54
Component: engine
2015-04-24 17:03:33 +02:00
Qiang Huang
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
Qiang Huang
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
Tibor Vass
249f3df46c
Merge pull request #9397 from jpopelka/9395-firewalld
...
Firewalld support
Upstream-commit: 259effc6dfd901130ca6d2926090bddfe35f7cdc
Component: engine
2015-04-23 16:58:08 -04:00
Ma Shimiao
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
Brian Goff
f01047d748
Merge pull request #12543 from vdemeester/11584-pkg-stdcopy-test-coverage
...
Add some stdcopy_test (coverage)
Upstream-commit: 60ad23a7b3ea6a06cd8ded165ebaab5fd0cc3bd9
Component: engine
2015-04-22 22:03:15 -04:00
Qiang Huang
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
Jessie Frazelle
cff18dc122
Merge pull request #10736 from coolljt0725/add_cpu_limit
...
Add support cpu cfs_quota
Upstream-commit: 17d5450bc31e81c22e8ccba806294e4d744af275
Component: engine
2015-04-20 17:55:01 -07:00
Jessie Frazelle
df94aca214
Merge pull request #12566 from fntlnz/remove-go1.3.3-support
...
Removed go1.3.3 support
Upstream-commit: e1fd7e25de4574b78cce41becd8ee50bdff23f0c
Component: engine
2015-04-20 17:01:57 -07:00
Jessie Frazelle
6f3bec0db9
Merge pull request #12471 from coolljt0725/fix_weird_output_format
...
Fix weird terminal output format
Upstream-commit: df217120cdc2336181eb3c97fea5acd18ede4ed0
Component: engine
2015-04-20 17:01:02 -07:00
Lorenzo Fontana
88e80730cf
Removed go1.3.3 support
...
Signed-off-by: Lorenzo Fontana <fontanalorenzo@me.com >
Upstream-commit: 92849fdcce257dfd61a5c95f57cde085ff22b431
Component: engine
2015-04-20 23:09:08 +02:00
Vincent Demeester
17684bee7e
Add some stdcopy_test (coverage)
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
Upstream-commit: 2ed4ed50be3a0379d83b9267f62c4c7f665b849f
Component: engine
2015-04-20 22:58:22 +02:00
Alexander Morozov
6f3b598444
Merge pull request #12453 from runcom/style-minor-fixes
...
Add minor stylistic fixes
Upstream-commit: a7690076c955d242b4590fcf557f15e1029d0c8b
Component: engine
2015-04-20 11:51:04 -07:00
Lei Jitang
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
Alexander Morozov
2e27fa9e39
Make API server datastructure
...
Added daemon field to it, will use it later for acces to daemon from
handlers
Signed-off-by: Alexander Morozov <lk4d4@docker.com >
Upstream-commit: d9ed3165228b60cb89c31d0d66b99e01ab83eb3e
Component: engine
2015-04-20 08:13:39 -07:00
Jiri Popelka
1b462401fc
Firewalld tests
...
Signed-off-by: Jiri Popelka <jpopelka@redhat.com >
Upstream-commit: 379773905c7ff4db3c16e2235f831a9552b4e158
Component: engine
2015-04-20 13:02:09 +02:00
Jiri Popelka
fcda625311
React to firewalld's reload/restart
...
When firewalld (or iptables service) restarts/reloads,
all previously added docker firewall rules are flushed.
With firewalld we can react to its Reloaded() [1]
D-Bus signal and recreate the firewall rules.
Also when firewalld gets restarted (stopped & started)
we can catch the NameOwnerChanged signal [2].
To specify which signals we want to react to we use AddMatch [3].
Libvirt has been doing this for quite a long time now.
Docker changes firewall rules on basically 3 places.
1) daemon/networkdriver/portmapper/mapper.go - port mappings
Portmapper fortunatelly keeps list of mapped ports,
so we can easily recreate firewall rules on firewalld restart/reload
New ReMapAll() function does that
2) daemon/networkdriver/bridge/driver.go
When setting a bridge, basic firewall rules are created.
This is done at once during start, it's parametrized and nowhere
tracked so how can one know what and how to set it again when
there's been firewalld restart/reload ?
The only solution that came to my mind is using of closures [4],
i.e. I keep list of references to closures (anonymous functions
together with a referencing environment) and when there's firewalld
restart/reload I re-call them in the same order.
3) links/links.go - linking containers
Link is added in Enable() and removed in Disable().
In Enable() we add a callback function, which creates the link,
that's OK so far.
It'd be ideal if we could remove the same function from
the list in Disable(). Unfortunatelly that's not possible AFAICT,
because we don't know the reference to that function
at that moment, so we can only add a reference to function,
which removes the link. That means that after creating and
removing a link there are 2 functions in the list,
one adding and one removing the link and after
firewalld restart/reload both are called.
It works, but it's far from ideal.
[1] https://jpopelka.fedorapeople.org/firewalld/doc/firewalld.dbus.html#FirewallD1.Signals.Reloaded
[2] http://dbus.freedesktop.org/doc/dbus-specification.html#bus-messages-name-owner-changed
[3] http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-routing-match-rules
[4] https://en.wikipedia.org/wiki/Closure_%28computer_programming%29
Signed-off-by: Jiri Popelka <jpopelka@redhat.com >
Upstream-commit: b052827e025267336f0d426df44ec536745821f8
Component: engine
2015-04-20 13:02:09 +02:00
Jiri Popelka
8f2bd21917
Support for Firewalld
...
Firewalld [1] is a firewall managing daemon with D-Bus interface.
What sort of problem are we trying to solve with this ?
Firewalld internally also executes iptables/ip6tables to change firewall settings.
It might happen on systems where both docker and firewalld are running
concurrently, that both of them try to call iptables at the same time.
The result is that the second one fails because the first one is holding a xtables lock.
One workaround is to use --wait/-w option in both
docker & firewalld when calling iptables.
It's already been done in both upstreams:
https://github.com/docker/docker/commit/b315c380f4acd65cc0428009702f99a266f96c59
https://github.com/t-woerner/firewalld/commit/b3b451d6f8946986b8f50c8bcddeef50ed7a5f8f
But it'd still be better if docker used firewalld when it's running.
Other problem the firewalld support would solve is that
iptables/firewalld service's restart flushes all firewall rules
previously added by docker.
See next patch for possible solution.
This patch utilizes firewalld's D-Bus interface.
If firewalld is running, we call direct.passthrough() [2] method instead
of executing iptables directly.
direct.passthrough() takes the same arguments as iptables tool itself
and passes them through to iptables tool.
It might be better to use other methods, like direct.addChain and
direct.addRule [3] so it'd be more intergrated with firewalld, but
that'd make the patch much bigger.
If firewalld is not running, everything works as before.
[1] http://www.firewalld.org/
[2] https://jpopelka.fedorapeople.org/firewalld/doc/firewalld.dbus.html#FirewallD1.direct.Methods.passthrough
[3] https://jpopelka.fedorapeople.org/firewalld/doc/firewalld.dbus.html#FirewallD1.direct.Methods.addChain
https://jpopelka.fedorapeople.org/firewalld/doc/firewalld.dbus.html#FirewallD1.direct.Methods.addRule
Signed-off-by: Jiri Popelka <jpopelka@redhat.com >
Upstream-commit: 8301dcc6d702a97feeb968ee79ae381fd8a4997a
Component: engine
2015-04-20 13:02:03 +02:00
Doug Davis
9132395dda
Merge pull request #12438 from ourcolorfuldays/fixtypo
...
fix some typos
Upstream-commit: c158cdbe6f33667a49615c8ba1ff8e33e71d2228
Component: engine
2015-04-18 07:17:55 -04:00
bin liu
1e6d2d1fcb
fix some typos
...
Signed-off-by: bin liu <liubin0329@gmail.com >
Upstream-commit: 70f1910a8bbeb3727829070a2454a636a91e2d48
Component: engine
2015-04-17 08:12:13 +00:00
Lei Jitang
d17462b4c8
Fix weird terminal output format
...
Signed-off-by: Lei Jitang <leijitang@huawei.com >
Upstream-commit: 05a8de46853f8b3534ca6d0cb03121ae214e8a34
Component: engine
2015-04-17 15:28:12 +08:00
Antonio Murdaca
47592700e5
Add minor stylistic fixes
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 1c89c6ea2f34f51a05215279c9cdefca30bb13b1
Component: engine
2015-04-16 21:22:32 +02:00
Jason Smith and Arnaud Porterie
0d7f000ebe
added documentation for functions
...
Signed-off-by: Jason Smith <jasonrichardsmith@gmail.com >
Upstream-commit: dc104ccb40b66a89611f11737d78a2ad31102427
Component: engine
2015-04-15 19:28:01 -07:00
Alexander Morozov
72f22eceb7
Merge pull request #12369 from runcom/fix-links-graph-ref
...
Fix wrong graphdb refs paths purging
Upstream-commit: 5b048ab2f2aea807033eba7a0ac078303c050826
Component: engine
2015-04-15 11:34:58 -07:00
Phil Estes
292892934d
Merge pull request #12360 from yestin/11601-supplement-tests-part-2
...
Improve test accuracy for pkg/chrootarchive (part 2)
Upstream-commit: da697dbed6143761f585b3b2a35c6ef0b501dea8
Component: engine
2015-04-14 21:00:12 -04:00
Antonio Murdaca
0046932ffa
Fix wrong graphdb refs paths purging
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja >
Upstream-commit: 088e69da35525fdf380ae73046d999332ea977fa
Component: engine
2015-04-14 23:10:43 +02:00
Brian Goff
4f2dd32821
Merge pull request #12214 from ahmetalpbalkan/namesgenerator/localrand
...
names-generator: use local random instance
Upstream-commit: 040176f6e17d6c1cc2468377b57a8b61d101123c
Component: engine
2015-04-14 13:10:26 -04:00
Alexander Morozov
61e32357e7
Merge pull request #12374 from kostickm/12343-fix-vet-warning-archive
...
Fix vet warning in archive.go
Upstream-commit: 7b29a88146466a104a0bccfea8f1e7338ed18cc2
Component: engine
2015-04-14 10:06:04 -07:00