Commit Graph

21804 Commits

Author SHA1 Message Date
47e2254d8e Make all http handlers api.server.Server methods
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: da7bca449652396dd8a4a0ff2e303d3d3c7a58a2
Component: engine
2015-04-20 09:45:31 -07:00
73aebaff91 change httpError logic
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Signed-off-by: Zhang Wei <zhangwei198900@gmail.com>
Upstream-commit: 66239ab5c914ce716c044b676ba1ad4757ce6f2b
Component: engine
2015-04-20 23:26:56 +08: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
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
932b7d41ce Make daemon initialization in main goroutine
It is simplifies code and lead to next refactoring step, where daemon
will be incorporated to some structure which represents API.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 181fea24aac7499a3d6dc0c8c9de67e6c0036140
Component: engine
2015-04-20 08:13:39 -07:00
3ad142821c Merge pull request #12537 from hqhq/hq_remove_unused_function
remove unused function in server_unit_test.go
Upstream-commit: b5584ec24a6c711a842605dd9fbf5535e77ae878
Component: engine
2015-04-20 07:51:53 -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
5f9567a9e8 Merge pull request #12266 from HuKeping/rmjob-info
Remove Job from Info API
Upstream-commit: dacc0507f08b54b506f832e100a1e27e389508e7
Component: engine
2015-04-20 07:10:57 -04:00
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
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
96f82039c1 Remove some unsupported instructions in the docs.
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 49be84842e41a612601ff9d0563ec30f138e95bc
Component: engine
2015-04-20 16:48:17 +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
5848586647 remove unused function in server_unit_test.go
After engine refactor, some functions are no longer used.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 641a7ec9ad61a42b255d203b7791198431761104
Component: engine
2015-04-20 16:27:47 +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
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
d4417b0225 Enhanced port integration-cli tests
THe port tests in integration-cli tests just for the port-mapping as
seen by Docker daemon. But it doesn't perform a more indepth testing by
checking for the exposed port on the host.

This change helps to fill that gap.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 448a1a7139cf89a0f4f985ec027a93799d0befb7
Component: engine
2015-04-19 06:15:23 -07: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
b2ac76cbc3 Update builder.md
Single value labels do not work in 1.6 and multi-label instructions only work when separated by non-EOL whitespace.
I also added an example snip from the inspect output with the labels that are included in this guide.

Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>
Upstream-commit: 89df65be5d3ee72cd6e1b4aa53953a62f4b5d00a
Component: engine
2015-04-18 11:38:20 -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