Commit Graph

1306 Commits

Author SHA1 Message Date
aac3868541 Fixed typo 'configuring'
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ae9905ef9c5e8fe793e6a6269bb720618f4fcaed
Component: engine
2015-04-24 16:52:32 -07:00
558ffb7c99 Merge pull request #12659 from dqminh/exec-interactive-hang
reuse same code for setting pipes in run/exec
Upstream-commit: c26695cf8a220bf33ba0efe729e2ab4b05089ea8
Component: engine
2015-04-23 16:37:49 -07:00
34f1a568b5 Merge pull request #12710 from runcom/bye-engine-from-graph
Remove engine/job from graph
Upstream-commit: 2ebfc7c874c26ab46fb93a2fca6fdcc9d2d808b1
Component: engine
2015-04-23 15:42:50 -07:00
0bd2f00743 reuse same code for setting pipes in run/exec
This also moves `exec -i` test to _unix_test.go because it seems to need a
pty to reliably reproduce the behavior.

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: ade8146aa82baa88bacdcf2d9c2559e8f47d71e4
Component: engine
2015-04-23 21:54:21 +00:00
41061500b4 Remove engine/job from graph
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: fa2c68a89e153cfc82c5af7cbb6d7f15b06e0a8c
Component: engine
2015-04-23 23:36:29 +02:00
249f3df46c Merge pull request #9397 from jpopelka/9395-firewalld
Firewalld support
Upstream-commit: 259effc6dfd901130ca6d2926090bddfe35f7cdc
Component: engine
2015-04-23 16:58:08 -04:00
75c324a9e3 Move setHostConfig to daemon file
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: dde0cc78bdec31be1ecbd7def6a83111224ccc55
Component: engine
2015-04-23 10:23:02 +08:00
078d379cc0 Merge pull request #12406 from runcom/remove-job-container-inspect
Remove job from container_inspect
Upstream-commit: 387227217004d4ea54e2d2405aaef761752e3bdc
Component: engine
2015-04-22 21:05:15 -04:00
03223ccad9 Merge pull request #12557 from rhatdan/journald
Add journald as a supported logger for containers
Upstream-commit: 3dc07162bdb457c86c0d5025d1d633131fadcfd1
Component: engine
2015-04-22 17:20:10 -07:00
628a79ad40 Cleanup daemon/volumes
- Mount struct now called volumeMount
- Merged volume creation for each volume type (volumes-from, binds, normal
  volumes) so this only happens in once place
- Simplified container copy of volumes (for when `docker cp` is a
  volume)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f3680e74946d3a773edb118ea3f508b8237e44a8
Component: engine
2015-04-22 19:32:10 -04:00
2cd5fc4ea7 Merge pull request #10992 from cpuguy83/add_volume_mounting_for_cp
Make `docker cp` bind-mount volumes
Upstream-commit: 1d48cccc996885fe02b4824d9421735566a52088
Component: engine
2015-04-22 15:59:28 -07:00
fdf9a8d629 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 4b9fe9c298c8778855c1d14e978c791496dd7c42
Component: engine
2015-04-23 00:58:13 +02:00
54ac8d85af Merge pull request #12650 from LK4D4/carry_12472
remove execCreate & execStart from job
Upstream-commit: 3c9ae03a868bb86fdb3026a21ef1b9a3f6a75dfb
Component: engine
2015-04-22 15:32:14 -07:00
925bb7aac9 remove unused utils
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 71b5a754cec09b2f1bcef986bdd6fd109451b8f2
Component: engine
2015-04-22 21:53:45 +00:00
bfa8bbb7bb Merge branch 'master' of github.com:docker/docker into journald
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: b88b2fa72ea4ad579478080ce6f027e55cfd5c29
Component: engine
2015-04-22 17:37:26 -04:00
f089bf1e0a remove execCreate & execStart from job
Also removed the function ExecConfigFromJob

Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 24425021d26f29a475702064181e6c99fb6bd1c5
Component: engine
2015-04-22 13:51:57 -07:00
b6c443e015 Merge pull request #12564 from LK4D4/remove_jobs_trust
Remove engine from trust
Upstream-commit: b098a42559f8f70a56a587a06608ee00641ebdaf
Component: engine
2015-04-21 16:49:01 -04:00
7c675b1db2 Remove not needed call to container.readHostConfig()
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a3c4801c9291c0db78c5cc0748d5d2dd5e44a98f
Component: engine
2015-04-21 22:00:33 +02:00
b04ccc089c Add journald as a supported logger for containers
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 364287b74118de4f04d049426ef37fa9936d2065
Component: engine
2015-04-21 12:57:54 -04:00
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
bf5cc9f8c8 Merge pull request #12457 from calavera/remove_engine_job_builder
Remove engine.Job from Builder.
Upstream-commit: 82f75df9e9faceabd9a2653ac57ad17aeab5e44b
Component: engine
2015-04-20 17:27:17 -07:00
a2ec388af9 Merge pull request #12533 from ankushagarwal/gofmt-directory
gofmt 1.4.2  src directory
Upstream-commit: 4a25c5d25bad693f9e79a810d87f9103769f918c
Component: engine
2015-04-20 17:02:43 -07:00
9d30ecdb29 Merge pull request #9381 from lebauce/default-gateway
Proposal: Allow specifying a default gateway for bridge networking
Upstream-commit: 9838242db1890ae82dd63a6aae134147c74933ef
Component: engine
2015-04-20 15:50:35 -07:00
e0b5db7169 Merge pull request #12450 from brahmaroutu/integration_test3_12255
Port test from integration tests - test low memory on create
Upstream-commit: 435643545c4b2c90e2a0a264527f6cc190d925cb
Component: engine
2015-04-20 17:27:17 -04:00
16569396d9 Remove engine.Job from builder.CmdBuildConfig.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ae4063585e7936780154101f7fe416a080c6ff7c
Component: engine
2015-04-20 13:37:06 -07:00
0790d1610c Remove engine from trust
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 9e50bf6270f426f6ef6649b1985036988b207407
Component: engine
2015-04-20 12:48:33 -07:00
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
8301d9df26 Merge pull request #12545 from coolljt0725/remove_rudundant_enter
Remove redundant `\n` in daemon/daemon.go
Upstream-commit: 490a0bd697168997f21bd354a647df6eab2bd051
Component: engine
2015-04-20 14:32:27 -04:00
97fb2745d9 Port test from integration tests
Addresses #12255
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 1a35b16b08ef5a8b0764e5a383f36d5572f20dfe
Component: engine
2015-04-20 17:57:53 +00: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
6d0917e016 Merge pull request #12534 from Mashimiao/delete-unused-function-from-drive
clenaup: delete unused function getEnv
Upstream-commit: d2ce1076a453ac1c016e5637eabae1d8f26cda9e
Component: engine
2015-04-20 07:50:06 -07:00
2f9e9a0229 Remove redundant '\n' in daemon.go and correct the warning messages for memory swap
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2d5ede67c098dd11803d502865ab546388f2a553
Component: engine
2015-04-20 22:00:03 +08:00
6f062d5e99 Allow specifying a default gateway for bridge networking
Signed-off-by: Sylvain Baubeau <sbaubeau@redhat.com>
Upstream-commit: acb6127c1a3f7054c25d1468b67f2eb269f4ecbf
Component: engine
2015-04-20 15:13:30 +02:00
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
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:
b315c380f4
b3b451d6f8
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
899b777d56 Remove Job from Info API
Two main things
- Create a real struct Info for all of the data with the proper types
- Add test for REST API get info

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f4942ed864f00a31591ef0257a971ef41ddd4c70
Component: engine
2015-04-20 18:14:06 +08:00
8b9e25d786 clenaup: delete unused function getEnv
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: e607bb49c48e0478b07fceb640d3e765151050e4
Component: engine
2015-04-20 16:32:42 +08:00
396287023b gofmt whole directory
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: edf541c22b5253a980ee061b35110d0da8fdb905
Component: engine
2015-04-20 01:08:51 -07:00
14bae8f05b Merge pull request #12358 from ZJU-SEL/remove_job_from_tag
remove job from tag
Upstream-commit: b1d8ae3824d2902c86d63837b8d413952b546d62
Component: engine
2015-04-19 16:02:28 -04:00
9e36d6f575 Merge pull request #12432 from Mashimiao/optimize-code-to-clarify-loagic
change code to clarify logic
Upstream-commit: 89092252f07604b7bc1f24fcf3314ed0d43916de
Component: engine
2015-04-19 07:39:24 -04:00
dd5f4141fe remove job from tag
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 99f6309b97041bf82cc845340734dc8e47977c8a
Component: engine
2015-04-19 18:36:56 +08:00
26d411e68d Updated message severity in graphdriver
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
Upstream-commit: cdc63ce5d032de593fc2fd13997311b316c0103b
Component: engine
2015-04-17 10:56:12 -07:00
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
105ea026b0 Remove job from restart
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: e41192a3f8cbfbbfecde03f58a3b2be2b1afd836
Component: engine
2015-04-16 18:50:24 +02:00
6cf040802b Fix a typo in docker/daemon/state.go
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
Upstream-commit: 7e01ecc119ea3871058309a47a3f9cbf2a9483dd
Component: engine
2015-04-16 10:56:15 -04:00
00001e0281 optimize code to clarify logic
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 93cdb0071be29cde5e9f5574926ae628ef4cfc41
Component: engine
2015-04-16 19:56:25 +08:00
586b88bb0d Merge pull request #12423 from crosbymichael/idkbutitworks
Ensure state is destroyed on daemont restart
Upstream-commit: 1899b2f41a73a6596ba167c9c710affde3dae550
Component: engine
2015-04-15 21:19:38 -07:00
884bdce09a Merge pull request #12253 from calavera/remove_job_from_start_and_create
Remove engine.Job from Start and Create
Upstream-commit: de923f59b3860eba2c87e8a533b385ac5752243b
Component: engine
2015-04-15 21:49:25 -04:00
d0cae5a6bf Ensure state is destroyed on daemont restart
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a5f7c4aa31fa1ee2a3bebf4d38f5fda7a4a28a0d
Component: engine
2015-04-15 17:44:03 -07:00
9fa728d386 Merge pull request #12391 from ibuildthecloud/syslog-format
Change syslog format and facility
Upstream-commit: 2e4d36ed80855375231501983f19616ba0238a84
Component: engine
2015-04-15 14:47:12 -07:00