Commit Graph

2677 Commits

Author SHA1 Message Date
61bb408463 Merge pull request #18531 from coolljt0725/update_container_networking_on_create
fix docker inspect return unconsistent network settings  of created container and stopped container
Upstream-commit: 812a7c204a2396700ca1e95d949659b16302a120
Component: engine
2015-12-15 08:47:54 -08:00
bc2d1566f2 devmapper: store base device fs type
After the very first init of the graph `docker info` correctly shows the
base fs type under `Backing Filesystem`. This information isn't stored
anywhere. After a restart (w/o erasing `/var/lib/docker`) `docker info`
shows an empty string under `Backing Filesystem`.
This patch records the base fs type after the first run in the metadata
or, to fix old devices that don't have this info in the metadata, just
probe the fs type of the base device at graph startup.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: f22ee02c6d6bd16f2179e71366ec641a7d234e96
Component: engine
2015-12-15 09:33:19 +01:00
909e4fb76a Merge pull request #18659 from Mashimiao/blkio-bps-tfix
tfix: modify internal variable name to be lower-case
Upstream-commit: 6c0c199103a40979340763467d23108553a350a6
Component: engine
2015-12-15 09:20:15 +01:00
f1d7c7a10b Make daemon/graphdriver/devmapper log messages with a common, consistent prefix.
Closes #16667

Uses the prefix "devmapper:" for all the fmt and logrus error, debug, and info messages.

Signed-off-by: Chris Dituri <csdituri@gmail.com>
Upstream-commit: 0aa6ace6e6e819551d21ebdcaa0c5802f76d7603
Component: engine
2015-12-14 21:35:13 -06:00
49f615806b tfix: modify internal variable name to be lower-case
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 38797ca61b6d88fe71615108897b1f7d1767f449
Component: engine
2015-12-15 09:50:16 +08:00
4b93eb25be Merge pull request #18612 from mrunalp/update_runc
Update runc/libcontainer to v0.0.6
Upstream-commit: ecc3717cb17313186ee711e624b960b096a9334f
Component: engine
2015-12-14 13:05:53 -08:00
6e0f72dc84 Merge pull request #18637 from dnephin/move_auth_config
Move more api types to api/types package
Upstream-commit: 75d69ce0da2e360773736502acd92d4a9cf7faa5
Component: engine
2015-12-14 11:53:30 -08:00
18aa0ef1ba Merge pull request #18393 from qzio/apparmor/ptrace-ubuntu14
Enable ptrace in a container on apparmor below 2.9
Upstream-commit: c38aa60180792210a21f162a57958bda86f9c381
Component: engine
2015-12-14 10:07:01 -08:00
7f5dff04d0 Move IndexInfo and ServiceConfig types to api/types/registry/registry.go
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 96c10098ac32f700f37358e2adc36c94741772bb
Component: engine
2015-12-14 11:28:02 -05:00
0d867da41c Move AuthConfig to api/types
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 5b321e328769cc93c3454e82ec3fe07672156f2e
Component: engine
2015-12-14 11:22:01 -05:00
07745f2aef Merge pull request #18618 from dnephin/refactor_resolve_auth_config
Refactor ResolveAuthConfig to remove the builder dependency on cli code
Upstream-commit: 5e0283effa73223e5528c61beb4e05b5018c5d6b
Component: engine
2015-12-14 15:23:36 +01:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
941029f664 update network settings on container creating
To make docker inspect return a consistent result of networksettings
for created container and stopped container, it's bettew to update
the network settings on container creating.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: c427131c94369d5c49a4f14d78e6ab9c678e12df
Component: engine
2015-12-13 02:34:44 -05:00
e8e575a14a Merge pull request #18270 from hqhq/hq_refactor_verify_config
Move verify container resources to a separate function
Upstream-commit: 51ffc088a55728b124045e297be216a83506a438
Component: engine
2015-12-12 12:47:19 +01:00
1d681e5873 Merge pull request #15365 from twistlock/14674-docker-authz
Docker authorization plug-in infrastructure
Upstream-commit: 1fffc0270ffb56d99a8440a10a0effdb3acd934d
Component: engine
2015-12-12 12:30:33 +01:00
9ef77e3f82 Merge pull request #18592 from hqhq/hq_fix_start
Add lock for container update
Upstream-commit: 241f6d71078916e987e131e3dd07beb0c5a1242e
Component: engine
2015-12-12 12:17:18 +01:00
5ff0f9ef5e Refactor ResolveAuthConfig to remove the builder dependency on cli code.
registry.ResolveAuthConfig() only needs the AuthConfigs from the ConfigFile, so
this change passed just the AuthConfigs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 920ea13516c24d00931cac42b608b5827986ede7
Component: engine
2015-12-11 19:31:24 -08:00
fbb93e6251 Update runc/libcontainer to v0.0.6
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: e8f7d5885dad5364b25a8f1efa8bb6b29afa89b1
Component: engine
2015-12-11 15:24:32 -05:00
f09e1890f6 Change authz plugin argument name
Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: de4ffdfe488494c9c300a785ad4f2263c6182988
Component: engine
2015-12-11 20:59:15 +02:00
2cee7ddb46 Rename Daemon.Get to Daemon.GetContainer.
This is more aligned with `Daemon.GetImage` and less confusing.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: d7d512bb927023b76c3c01f54a3655ee7c341637
Component: engine
2015-12-11 12:39:28 -05:00
46aa4e0b30 dont trim gelf log message
Signed-off-by: Marius Sturm <marius@graylog.com>
Upstream-commit: a31435c8a2c4560b6e1a0e84450c45490fa587be
Component: engine
2015-12-11 10:28:24 +01:00
4f0c8269f1 Move verify container resources to a separate function
Make the code easy to view.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: c6bfb54ac19ec8d2822ab4dae6123e705a299d73
Component: engine
2015-12-11 10:59:29 +08:00
88d252998b Add lock for container update
Container needs to be locked when updating the fields, and
this PR also remove the redundant `parseSecurityOpt` since
it'll be done in `setHostConfig`.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 464eefd7957c3e0c7bcfb80bdc96ef8790687615
Component: engine
2015-12-11 10:33:13 +08:00
87797addd5 Merge pull request #18580 from tophj-ibm/fix-typo-blkio-invalid-device
Fix typo in named test and docs.
Upstream-commit: b89676beadce5a078dd8fc8b37ce00729e6e7232
Component: engine
2015-12-10 15:19:41 -08:00
9847131043 Merge pull request #18353 from aaronlehmann/transfer-manager
Improved push and pull with upload manager and download manager
Upstream-commit: ac453a310bac6bdd7cd9d780a63d4168064570d1
Component: engine
2015-12-10 14:52:48 -08:00
1aaaffc214 Fixed typo change deivce to device.
This changes deivce to device in daemon, test and docs.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 7c077c2c3443fdb9b13b7790bc96cdaa287cf381
Component: engine
2015-12-10 15:23:05 -06:00
ff45cefcc9 Merge pull request #18555 from runcom/clean-devmapper
devmapper: remove unused var
Upstream-commit: 13155ac47ea27eceda2c59d42e05e4b6ab1f516a
Component: engine
2015-12-10 18:17:04 +01:00
db749df51c Merge pull request #18197 from nalind/workaround-go-libgcc
Work around a linking problem on 32-bit arches
Upstream-commit: 2ea48e9fc09ba83785355c5d073e9bfae81ea266
Component: engine
2015-12-10 11:50:03 -05:00
cb952213f7 devmapper: remove unused var
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 037cbcec989f7867b6062455e8b042b8d2b0ab18
Component: engine
2015-12-10 08:28:02 +01:00
72c8e6b470 Merge pull request #18550 from ibuildthecloud/panic
Don't dereference HostConfig.MemorySwapiness if nil
Upstream-commit: ff0e33824a09284084683d9e00f0f7bcc6950a76
Component: engine
2015-12-09 23:11:18 -05:00
547342d777 Improved push and pull with upload manager and download manager
This commit adds a transfer manager which deduplicates and schedules
transfers, and also an upload manager and download manager that build on
top of the transfer manager to provide high-level interfaces for uploads
and downloads. The push and pull code is modified to use these building
blocks.

Some benefits of the changes:

- Simplification of push/pull code
- Pushes can upload layers concurrently
- Failed downloads and uploads are retried after backoff delays
- Cancellation is supported, but individual transfers will only be
  cancelled if all pushes or pulls using them are cancelled.
- The distribution code is decoupled from Docker Engine packages and API
  conventions (i.e. streamformatter), which will make it easier to split
  out.

This commit also includes unit tests for the new distribution/xfer
package. The tests cover 87.8% of the statements in the package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 572ce802306a4e919802e5b77cbeca94acda7c0a
Component: engine
2015-12-09 19:13:35 -08:00
1c526ceb5c Move networking api types to the api/types/networking package.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: efda9618db07152ce6a94e0ac391ba58d1463fcd
Component: engine
2015-12-09 13:55:59 -08:00
19d19aefcd Don't dereference HostConfig.MemorySwapiness if nil
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: 5ac12c418f163a49ad3355506fc8ed632905dbd9
Component: engine
2015-12-09 14:47:51 -07:00
8a7da51391 Check minimum kernel memory limit to be 4M
Fixes: #18405

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 2347f98003af34dd1cfd290bf0f2cc7e6ae07b03
Component: engine
2015-12-09 14:26:41 +08:00
6021acc699 Fix overlay and user namespace permissions
All underlay dirs need proper remapped ownership. This bug was masked by the
fact that the setupInitLayer code was chown'ing the dirs at startup
time. Since that bug is now fixed, it revealed this permissions issue.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 191cefbaca45ba86341379d09d2f75d5fc1868fb
Component: engine
2015-12-08 14:28:28 -05:00
1c96ff9a0b Fixing documentation according to comments by @moxiegirl and @thaJeztah
Signed-off-by: Dima Stopel <dima@twistlock.com>
Upstream-commit: 8cc0892269fb532f117aadc0e8acf7a173fe4e1b
Component: engine
2015-12-08 17:34:15 +02:00
2491643ccf Docker authorization plug-in infrastructure enables extending the functionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted.
Each plug-in operates as a separate service, and registers with Docker
through general (plug-ins API)
[https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No
Docker daemon recompilation is required in order to add / remove an
authentication plug-in. Each plug-in is notified twice for each
operation: 1) before the operation is performed and, 2) before the
response is returned to the client. The plug-ins can modify the response
that is returned to the client.

The authorization depends on the authorization effort that takes place
in parallel [https://github.com/docker/docker/issues/13697].

This is the official issue of the authorization effort:
https://github.com/docker/docker/issues/14674

(Here)[https://github.com/rhatdan/docker-rbac] you can find an open
document that discusses a default RBAC plug-in for Docker.

Signed-off-by: Liron Levin <liron@twistlock.com>
Added container create flow test and extended the verification for ps
Upstream-commit: 75c353f0ad73bd83ed18e92857dd99a103bb47e3
Component: engine
2015-12-08 17:34:15 +02:00
3291c35ddf Merge pull request #18108 from phemmer/no-mtu-discovery
don't try to use default route MTU as container MTU
Upstream-commit: b36b4920399cc95e1b357f60aa738e84bd970f47
Component: engine
2015-12-08 00:26:29 +01:00
f20b52f333 don't try to use default route MTU as bridge MTU
Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com>
Upstream-commit: fd9d7c02fcc8edd73d056f56f17e5cfe1760495b
Component: engine
2015-12-07 17:32:51 -05:00
d76bf17816 Merge pull request #18442 from MHBauer/move-configs
move configs structs to remove dependency on deamon
Upstream-commit: 41ae615aa13508b8f8958dc1c338fce5bccb8e6b
Component: engine
2015-12-07 13:38:43 -05:00
b12523fdf4 move configs structs to remove dependency on daemon
- Moved the following config structs to api/types
   - ContainerRmConfig
   - ContainerCommitConfig

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 63fb931a0b7298c6281898bcc5f53ab0655ad1a6
Component: engine
2015-12-07 09:03:25 -08:00
ecc37f59d7 Merge pull request #18451 from WeiZhang555/net-err
Better error message for network connect
Upstream-commit: 7d6a2e3cf5d172c21c831c3466e30d693e12e6fd
Component: engine
2015-12-07 09:17:48 -05:00
1af1c81aab Merge pull request #18123 from aidanhs/aphs-fail-on-broken-tar
Ensure adding a broken tar doesn't silently fail
Upstream-commit: 1f8efc687cdf8ba98a7332cf9d4401afb8108be6
Component: engine
2015-12-07 14:38:21 +01:00
dce7992408 Merge pull request #18329 from liusdu/mount_err
Fix rm container error in aufs and devicemapper after daemon crash
Upstream-commit: ba77a5b46fb86f6765fdab8a85f82266e1032efe
Component: engine
2015-12-07 12:47:52 +01:00
f628f2f8be Enable ptrace in a container on apparmor below 2.9
Ubuntu 14.04 LTS is on apparmor 2.8.95.
This enables `ps` inside a container without causing
audit log entries on the host.

Signed-off-by: Joel Hansson <joel.hansson@ecraft.com>
Upstream-commit: 6480feb7668851d3878bf36eedc5fd8ffa789e25
Component: engine
2015-12-07 11:08:49 +01:00
e5e9f03639 Better error message for network connect
Use better error message when user want to connect container with same
name to one network, this can help avoid confusion.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 8edb941b796cbdd2c9f3809a3290fcd4d8ae76ea
Component: engine
2015-12-07 17:39:13 +08:00
ab6c9709f6 Merge pull request #17989 from jfrazelle/initial-seccomp-support
Phase 1: Initial seccomp support
Upstream-commit: 87a614ed55f2a9076d8150f846b0d27fe60095a8
Component: engine
2015-12-05 08:33:58 -08:00
fee5b92987 Merge pull request #18436 from estesp/fix-initlayer-perms
Fix init layer chown of existing dir ownership
Upstream-commit: a56f258c8af4524f00750fbaa92d7b1f85981cef
Component: engine
2015-12-04 11:53:09 -08:00
d7dafeedd3 Merge pull request #18398 from calavera/system_backend
Move docker system information to a dedicated router and backend.
Upstream-commit: 51b0f23127f115ce24b45dac2d565db58d25458e
Component: engine
2015-12-04 12:56:57 -05:00
37ebaba7a1 Fix init layer chown of existing dir ownership
This solves a bug where /etc may have pre-existing permissions from
build time, but init layer setup (reworked for user namespaces) was
assuming root ownership.  Adds a test as well to catch this situation in
the future.

Minor fix to wrong ordering of chown/close on files created during the
same initlayer setup.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 23b771782ab7236ce5024ac5773a6ded9a2af753
Component: engine
2015-12-04 12:18:05 -05:00