Commit Graph

14872 Commits

Author SHA1 Message Date
1b462401fc Firewalld tests
Signed-off-by: Jiri Popelka <jpopelka@redhat.com>
Upstream-commit: 379773905c7ff4db3c16e2235f831a9552b4e158
Component: engine
2015-04-20 13:02:09 +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
a45474f68d Merge pull request #12524 from RickWieman/12523-remove-redundant-else
Removes redundant else in registry/session.go
Upstream-commit: b7950b725b846564fc944279e9ae21f852b5dd94
Component: engine
2015-04-19 22:08:50 -07:00
0b57229dc6 Removes redundant else in registry/session.go
Fixes #12523

Signed-off-by: Rick Wieman <git@rickw.nl>
Upstream-commit: 5f2b051ec5a2f639857a1628f3c994fbfd0b3da0
Component: engine
2015-04-19 23:58:55 +02:00
523cbfc000 Merge pull request #12521 from runcom/else-nit
Refactor else branches
Upstream-commit: 24b89b70986c547b2dae15c5cf737fb7e8e416f3
Component: engine
2015-04-19 16:36:39 -04: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
cd0d00e4c3 Merge pull request #12518 from moxiegirl/fix-12516-registry-doc
Docker Registry Server > Docker Registry
Upstream-commit: 2e58350bd6f8c80f4d545bc00d83127d76ab991d
Component: engine
2015-04-19 07:14:09 -07:00
253cd30553 Merge pull request #12512 from ankushagarwal/document-binaries
Document the download location of Linux, Windows and Mac OS X binaries
Upstream-commit: 547ded5df7622d1caf2e096d5b32a21c44b17ae6
Component: engine
2015-04-19 07:12:45 -07:00
af8b6cc8bb Refactor else branches
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 8655214b3dc8abb4edbca3db3e04557e09a1149b
Component: engine
2015-04-19 15:32:54 +02: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
714aa2e550 Document the download location of binaries
Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 99251f60c2f554fc03ddc9e7b478de6bd5cf0b49
Component: engine
2015-04-19 01:51:03 -07:00
d18c57d820 Docker Registry Server > Docker Registry
Fixing registry index
Tested on beta and this redirect works

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 7b2b7df3866d0c0101e9367b7f4f63bfed5faac4
Component: engine
2015-04-18 19:19:48 -07:00
f90dca15af Merge pull request #12508 from Mic92/docs-speedup
docs: speed up build by reducing build steps
Upstream-commit: 2bc3fb5149bdc3b63c338e76ed821d2d5444e9c1
Component: engine
2015-04-18 10:41:31 -07:00
b527679d3d docs: speed up build by reducing build steps
- should be also easier to maintain

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: bbe6df128802b22605f9eb079f105460ec78ac6f
Component: engine
2015-04-18 13:28:52 +02:00
9132395dda Merge pull request #12438 from ourcolorfuldays/fixtypo
fix some typos
Upstream-commit: c158cdbe6f33667a49615c8ba1ff8e33e71d2228
Component: engine
2015-04-18 07:17:55 -04:00
ad529b2798 Merge pull request #12466 from robertabbott/fix_dockerCmd
Removed unnecessary error output from dockerCmd
Upstream-commit: 5fd378c0d1d97601c7cfab6a62bb8da031a0001d
Component: engine
2015-04-17 15:15:34 -07:00
ad230ae4a5 Merge pull request #12496 from moxiegirl/post-release-updates
Updates to Compose docs and ENV vars
Upstream-commit: a313b729e48d0ca9d0085f407b136def162eaf4c
Component: engine
2015-04-17 13:43:06 -07:00
f4a4f24956 Updates to Compose docs and ENV vars
- Compose teamhad forgotten some documentation
- Updated ENV for Distribution also
- Forgot one of the readability sections

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 3a883672417fcb2b3ac0d57d992285849840bfb2
Component: engine
2015-04-17 13:08:57 -07:00
41c63ff3d3 Merge pull request #12490 from LK4D4/carry_12396
remove job from pull and import
Upstream-commit: 055c6dbaefc61c597164aaedee4448bc32522b2e
Component: engine
2015-04-17 15:26:30 -04:00
8a7669d466 Merge pull request #12493 from kostickm/12491-update-message-graphdriver
Updated message severity in graphdriver
Upstream-commit: 9922122fd467b3ba384801a059b05b00fd65998e
Component: engine
2015-04-17 14:53:45 -04: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
53ad166d48 Merge pull request #12476 from pwaller/small-cl-improvement
Improve build cancelation description in CHANGELOG
Upstream-commit: d12a2d8aeb483870ae064f70308e6ec7109f2a06
Component: engine
2015-04-17 10:34:08 -07:00
969c19149d Merge pull request #12484 from superseb/12367-jessie-instructions
Added Debian 8 note for adding backports
Upstream-commit: 4492977437fe76e9984a5be2aba2c294c26b622b
Component: engine
2015-04-17 10:16:53 -07:00
6715c2c5be Merge pull request #12470 from zembutsu/patch-1
fix typo
Upstream-commit: ced638094f138ef7f552da1d34c26e3f70eaa8ab
Component: engine
2015-04-17 09:55:56 -07:00
0ff275f7b4 remove job from pull and import
Closes #12396

Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6e38a53f96403b4cbd38e49e6b294128ed054a20
Component: engine
2015-04-17 09:55:02 -07:00
cf639e2b30 Merge pull request #12486 from runcom/bye-builtins
Remove builtins
Upstream-commit: d845932a52ed7095490ead8dd9b17afb26c9b9ce
Component: engine
2015-04-17 09:52:43 -07:00
5e15f55a29 Removed unnecessary error output from dockerCmd
Changed method declaration. Fixed all calls to dockerCmd
method to reflect the change.

resolves #12355

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 621b601b3c602aab5ef0f07903fdf413881bb261
Component: engine
2015-04-17 09:11:14 -07:00
ca55f76013 Added Debian 8 note for adding backports
Signed-off-by: Sebastiaan van Steenis <mail@superseb.nl>
Upstream-commit: 37b9ce61ac5aa762cf0ad34d84bc1924807a7617
Component: engine
2015-04-17 16:32:28 +02:00
f99a495136 Merge pull request #12436 from hqhq/hq_fix_inspect_doc
update docker-inspect man page
Upstream-commit: ddc842ca2a556657e95036f8d23e3c81c9f60996
Component: engine
2015-04-17 06:57:12 -07:00
6488f10044 Remove builtins
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: a0bf80fe0372196812a9cb295f209c08f8037601
Component: engine
2015-04-17 14:27:38 +02:00
e7b9b3570c Improve build cancelation description in CHANGELOG
The existing text didn't explain what had changed.

(See #9774)

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 609fa93aa2fd98f2eac30933623f15ece59e4527
Component: engine
2015-04-17 09:44:12 +01:00
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
28d382563f fix typo
Is this typo?

Signed-off-by: Masahito Zembutsu <m.zembutsu@gmail.com>
Upstream-commit: 3cdf94ed1a8a63c068e17310ffa764230b280cbe
Component: engine
2015-04-17 16:06:54 +09:00
9a1ff57e85 Merge pull request #12468 from icecrime/disable_test_pull_verified
Skip TestPullVerified
Upstream-commit: 5e40de92864009e7385300af1dd0a83bb4693126
Component: engine
2015-04-17 02:31:01 -04:00
711b5f704b Merge pull request #12465 from HuKeping/log-level
Change log severity for non-tlsverify bind
Upstream-commit: d47f3707c566b74a3e71dde9a18c264a33009183
Component: engine
2015-04-17 02:10:47 -04:00
9ae8147d1a Change log severity for non-tlsverify bind
closes #12459

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: b052f7a87cb73aa2b0d4827f6cf23b9eb0fdfa2e
Component: engine
2015-04-17 21:27:58 +08:00
7e8cef686e Skip TestPullVerified
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 9a4fa9c19167756cf39a4d002efe81d4bcd3bb75
Component: engine
2015-04-16 23:05:47 -07:00
52da95a5c0 Merge pull request #12446 from icecrime/please_go_away_testexp.tar
Always remove testexp.tar test file
Upstream-commit: 5207b3eb2b9894c282e46254b727aeee7e03e949
Component: engine
2015-04-17 01:58:29 -04:00
e095f708fe Improve export/import tests cleanup
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 4e356ee410e1abb86665ab15e4c4155d7c807866
Component: engine
2015-04-16 22:10:55 -07:00
b54e42e0d3 update docker-inspect man page
- sort inspect out
 - update output fields
 - format output
 - add doc about go template
 - other minor fix

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 01548ed1dc25e94bf6cc7decca1d2045069dc5b1
Component: engine
2015-04-17 09:25:06 +08:00
a2f522bead Merge pull request #12455 from bfirsh/remove-registry-redirect
Remove registry redirect
Upstream-commit: 24af87835842b2683a3862f7a32c726013d2a67a
Component: engine
2015-04-16 17:55:02 -07:00
ea3916b969 Merge pull request #12383 from jdivock/patch-1
Upstream-commit: b8530c6c5eff289b8393dd18a4d778c280511097
Component: engine
2015-04-16 14:45:36 -07:00
ce41b2a8bf Merge pull request #12452 from moxiegirl/release-versions-set
Updating with final version from Stephen
Upstream-commit: 2ba1244ad261a85888ede933267038e362ab1a0f
Component: engine
2015-04-16 14:31:45 -07:00
9839262e56 Merge pull request #12411 from sbasyal/patch-2
The link to issue 407 was broken
Upstream-commit: 96b5a3f562fd708fa3773acab4f358f83b97aeff
Component: engine
2015-04-16 13:32:02 -07:00
ea1d1ba304 Merge pull request #12454 from jfrazelle/bump_version
Bump version
Upstream-commit: 4325cbb47c77dac8968091c85d8737d0a14d1f43
Component: engine
2015-04-16 16:27:34 -04:00
d7c7374f11 bump version to 1.6.0-dev
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: e79c77fb8d16ba38387e43fbf9224e341f252b95
Component: engine
2015-04-16 12:56:02 -07:00
960ca96c7d Remove registry redirect
... it was causing an infinite redirect.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 4c6d5e3a25557b2a053e8f8e5aafc84f5f6aada8
Component: engine
2015-04-16 12:54:56 -07:00
fb913ffded Bump version to v1.6.0
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

(cherry picked from commit 47496519da9664202d900d3635bb840509fa9647)
Upstream-commit: 99d0413033e6ecf05a30eac18d51349ef859a9c7
Component: engine
2015-04-16 12:45:02 -07:00