1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon
Jiri Popelka 8301dcc6d7 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>
2015-04-20 13:02:03 +02:00
..
events New package daemon/events 2015-04-07 08:43:14 -07:00
execdriver Ensure state is destroyed on daemont restart 2015-04-15 17:44:03 -07:00
graphdriver Updated message severity in graphdriver 2015-04-17 10:56:12 -07:00
logger Change syslog format and facility 2015-04-15 12:46:43 -07:00
network Remove jobs from daemon/networkdriver/bridge 2015-04-08 18:50:29 -04:00
networkdriver Support for Firewalld 2015-04-20 13:02:03 +02:00
attach.go Refactor utils/utils, fixes #11923 2015-04-14 01:37:36 +02:00
commit.go remove job from tag 2015-04-19 18:36:56 +08:00
config.go Merge pull request #12209 from ahmetalpbalkan/daemon/cli-help-log-driver-reword 2015-04-10 08:29:29 -07:00
container.go Merge pull request #12387 from x1022as/inspect-logpath 2015-04-15 14:28:39 -04:00
container_unit_test.go Ensure container names start with a-zA-Z0-9 2014-09-12 10:45:07 -07:00
create.go optimize code to clarify logic 2015-04-16 19:56:25 +08:00
daemon.go Merge pull request #12432 from Mashimiao/optimize-code-to-clarify-loagic 2015-04-19 07:39:24 -04:00
daemon_aufs.go Replace aliased imports of logrus, fixes #11762 2015-03-26 23:22:04 +01:00
daemon_btrfs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_devicemapper.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_no_aufs.go update go import path and libcontainer 2014-07-24 22:19:50 +00:00
daemon_overlay.go Remove the last references to overlayfs 2014-12-03 14:06:19 +01:00
daemon_test.go Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069 2015-01-21 17:11:31 -08:00
daemon_unit_test.go Move security opts to HostConfig 2014-11-25 01:02:30 +02:00
delete.go Remove job from rm 2015-04-09 18:46:24 +02:00
exec.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
export.go Remove job from export 2015-04-13 15:27:45 +02:00
history.go History.Swap Use parallel assignment to swap elements, as it's 2015-03-25 00:13:13 +03:00
image_delete.go 'docker rmi -f IMAGE_ID' untag all names and delete the image 2015-04-11 09:24:21 +08:00
info.go Refactor utils/utils, fixes #11923 2015-04-14 01:37:36 +02:00
inspect.go Remove job from execInspect 2015-04-12 00:15:34 +02:00
kill.go Remove Job from docker kill 2015-04-09 16:06:54 -07:00
list.go fix up Image-name related issues in docker ps and CI 2015-04-09 23:03:23 +08:00
logs.go Remove job from logs 2015-04-13 08:25:31 +02:00
monitor.go Replace aliased imports of logrus, fixes #11762 2015-03-26 23:22:04 +01:00
README.md Add readme for daemon directory 2014-05-17 17:56:02 +00:00
rename.go Remove Job from rename 2015-04-10 01:52:55 +08:00
resize.go Remove job from resize&execResize 2015-04-10 00:56:43 +02:00
restart.go Remove job from restart 2015-04-16 18:50:24 +02:00
start.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
state.go Fix a typo in docker/daemon/state.go 2015-04-16 10:56:15 -04:00
state_test.go Fix vet errors about unkeyed fields 2014-12-12 10:44:59 -08:00
stats.go Remove jobs from stats 2015-04-13 08:33:53 +02:00
stats_collector.go Replace aliased imports of logrus, fixes #11762 2015-03-26 23:22:04 +01:00
stop.go Remove job from stop 2015-04-12 00:41:16 +02:00
top.go Remove Job from docker top 2015-04-09 18:17:50 -07:00
utils.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
utils_linux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_nolinux.go --selinux-enabled flag should be ignored on Disabled SELinux systems 2014-09-23 13:21:25 -04:00
utils_test.go Decode container configurations into typed structures. 2015-04-15 10:22:07 -07:00
volumes.go Use getResourcePath instead 2015-03-31 15:10:30 -04:00

This directory contains code pertaining to running containers and storing images

Code pertaining to running containers:

  • execdriver
  • networkdriver

Code pertaining to storing images:

  • graphdriver