Commit Graph

4587 Commits

Author SHA1 Message Date
f56b7023bb Merge pull request #28623 from cpuguy83/update_graphdriver_docs
Ensure graphdriver only loads with experimental flag
Upstream-commit: d3e3a97cb2b3d86587ae52e3d8247dc2ba4d2c4e
Component: engine
2016-12-24 11:59:24 +01:00
478844dff8 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
09a9069bac Merge pull request #29628 from liliVicky/my-feature4
modify some errors of plurality
Upstream-commit: 748a9a3f9cb804576a5fb58d11608d759160b3da
Component: engine
2016-12-22 15:40:30 -05:00
38849b2667 Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 677fa03654886ee776ff478c30681d5376cfc196
Component: engine
2016-12-22 15:30:25 -05:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
409b30fc55 modify some files
Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

update some files in the folder of distribution/xfer

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

correct again

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>
Upstream-commit: 128d07d3493aeee8ec6a044039f032aeb2adf699
Component: engine
2016-12-22 08:38:37 +08:00
36a05ce983 Move names to package api
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dba271a42ab4841dbcf2e953491e9ee728cd8e16
Component: engine
2016-12-21 22:42:47 +01:00
7056634df4 Move ReplaceOrAppendEnvValues to container package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7164b66cfc70b43bad98e156e72e305b66aa8ca4
Component: engine
2016-12-21 22:42:39 +01:00
41c71150d4 Merge pull request #28594 from Microsoft/jjh/fixtodo
Windows: Fix a longstanding TODO
Upstream-commit: b567e8777d585819bad7513e7d219f9c837825bf
Component: engine
2016-12-21 15:46:00 -05:00
60c04ae8d4 Merge pull request #28714 from thaJeztah/move-logdriver-check-to-daemon
move check for supported drivers to daemon
Upstream-commit: 267d6935c5dcb806d24df8dd78d3d053773f8c19
Component: engine
2016-12-21 13:47:30 -05:00
97f0ab72fa Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
Upstream-commit: b2e348f2a6ab2d5396acf4bb56aea7e49c3e2097
Component: engine
2016-12-21 13:15:00 -05:00
44fa4f8ae7 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
Upstream-commit: ea2dd4b5d0b41552d047814d9e39ddaa3662ab41
Component: engine
2016-12-21 20:16:19 +08:00
e877ead08e Merge pull request #29550 from LK4D4/fix_commit
commit: do not change container labels on commit
Upstream-commit: dc8a6d91fb154c96a34ea5e850b25f5c2e88fe19
Component: engine
2016-12-20 09:25:09 -05:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
ae0f2c64b3 Merge pull request #29339 from dmcgowan/plugins-abstract-download-manager
Abstract layerstore from pull/push distribution code
Upstream-commit: aecb79ff9866ec6b3536c50608706d2d4a6325df
Component: engine
2016-12-19 13:32:28 -08:00
c162add86f Abstract distribution interfaces from image specific types
Move configurations into a single file.
Abstract download manager in pull config.
Add supports for schema2 only and schema2 type checking.
Add interface for providing push layers.
Abstract image store to generically handle configurations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3c7676a057a4c0103895f793e407dc6736df139a
Component: engine
2016-12-19 10:55:00 -08:00
fde61754e9 commit: do not change container labels on commit
Fix #29547

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ca6c6f0765aeccdb2730d03c05bd965906df8cd4
Component: engine
2016-12-19 09:56:20 -08:00
4486744b4b Merge pull request #26576 from allencloud/change-cluster-response-status-code
update response status code for cluster request
Upstream-commit: a58b5830b175860e71174c93c6f3ec1cefcd5e0d
Component: engine
2016-12-19 18:31:45 +01:00
e43da16101 remove client-side for supported logging drivers
The `docker logs` command performed a
client-side check if the container's
logging driver was supported.

Now that we allow the client to connect
to both "older" and "newer" daemon versions,
this check is best done daemon-side.

This patch remove the check on the client
side, and leaves validation to the daemon,
which should be the source of truth.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05dc9846e1266e6a3629c26851acb633a380dd17
Component: engine
2016-12-19 14:30:01 +01:00
89240fcdc4 correct the spelling error of driver (#29523)
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 054e479bfae694194d40b4b68c63e5819a436b29
Component: engine
2016-12-19 07:33:36 -05:00
0a2ba8aaae Merge pull request #29378 from aaronlehmann/swarm-plugins
Support v2 plugins in swarm mode
Upstream-commit: eb59c6d587ab5d3a49f044b4399046c0979bd1af
Component: engine
2016-12-19 11:07:06 +01:00
a00daba226 Merge pull request #29441 from coolljt0725/fix_update_restart_policy
Fix docker update clear restart policy of monitor
Upstream-commit: 0f68ecd3f72ab336ffb6117ca9e9add9499309cf
Component: engine
2016-12-19 10:30:04 +01:00
4a0adf4beb update response status code for cluster request
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 29d4a7f512e3702ee4a2871dd84e3b24dd26477d
Component: engine
2016-12-19 10:21:10 +08:00
4b72b6dab3 Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 737b5b1781da9d7f286bb2425720add0ff69e3e3
Component: engine
2016-12-16 20:57:05 -05:00
5906dd918b Merge pull request #29459 from yongtang/29365-follow-up
Allow containers to continue even if mount failed after live restore
Upstream-commit: 110a95717d2d7e140c139a9f6b8fb7f72ec20dcb
Component: engine
2016-12-17 01:46:25 +01:00
343586bbdc Fix volume plugin refecounting on daemon restart
Ensures all known volumes (known b/c they are persisted to disk) have
their volume drivers refcounted properly.

In testing this, I found an issue with `--live-restore` (required since
currently the provided volume plugin doesn't keep state on restart)
where restorted plugins did not have a plugin client loaded causing a
panic when trying to use the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6ef1060cd0acb847e06db890abb335faa837a9e2
Component: engine
2016-12-16 10:14:06 -05:00
847dc629c8 Merge pull request #27938 from AkihiroSuda/ovlnw-27866
api: allow NW name that is the prefix of a swarm NW ID
Upstream-commit: 92e63977d9ed258c905ea5d073f9e04f631471f4
Component: engine
2016-12-16 10:40:46 +01:00
7b8a80a706 Allow containers to continue even if mount failed after live restore
This fix is a follow up to #29365. In #29365 a bug was fixed for
`docker exec -u user` after live restore by remounting.
However, #29365 will prevent containers from restored if mount failed.

In this fix, containers will be restored even if mount in that step failed.
Some functionalities might be missing (like `docker exec -u user`) but
at least it is possible to do certain operations like stop/restart/delete.

This fix is related to #29365.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3003ae1d8bd112e78bcc8c1c70efd9d3ef6f0ddc
Component: engine
2016-12-15 15:48:14 -08:00
b70f98ab3e Make graphdriver plugin use plugin BasePath
Also enables `PropagatedMount` for graphdrivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 500210475f6d841b2eacb42fb495e90108db2733
Component: engine
2016-12-15 16:22:13 -05:00
1f59facb6e api: allow creating a network of which name is the prefix of the ID of a swarm network
Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: edfbc3b8767ab2e89e73ba3142d2ddad295001e9
Component: engine
2016-12-15 15:09:06 +00:00
d40021472d Merge pull request #29422 from unclejack/daemon_return_directly
daemon: return directly without ifs where possible
Upstream-commit: 6e6016f5813ab99293c0d96c664b4f74ff561a1b
Component: engine
2016-12-15 09:46:53 +01:00
7c00bda66d Merge pull request #29365 from yongtang/29342-exec-user-after-restart
Fix `docker exec -u` issue after docker daemon restart
Upstream-commit: a60be6bfe38d70608bb389a14e3eb2357454099e
Component: engine
2016-12-15 09:16:17 +01:00
ce25e5f9c1 Publish installed v2 plugins to manager
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2a97ea9a6e03443d4d10fd2f440feb779ab8699e
Component: engine
2016-12-14 17:02:56 -08:00
62b7ace712 daemon: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 3a42518042b36ad90950a3abf0aa125c0342b2c4
Component: engine
2016-12-14 22:36:58 +02:00
8bf34c7522 cli: Pin image to digest using content trust
Implement notary-based digest lookup in the client when
DOCKER_CONTENT_TRUST=1.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d4d6f8c0d0c6cd0ba6dc96ab7a9ed07e1e766074
Component: engine
2016-12-14 10:49:33 -08:00
4bd3e0fe3d Fix docker exec -u issue after docker daemon restart
This fix tries to address the issue raised in 29342 where
`docker exec -u` after docker daemon restart returns an error:
```
unable to find user test: no matching entries in passwd file
```

The reason was that `container.BaseFS` is not present after restart.

This fix adds the `daemon.Mount` during the restore to bring up the
`container.BaseFS`.

An integration test has been added to cover the changes.

This fix fixes 29342.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7feb2a17e4b9d1a5305a8a44004e916b79cbdd97
Component: engine
2016-12-13 22:36:30 -08:00
b35ecdcd72 Merge pull request #29374 from mavenugo/exp
Add the missing experimental ipvlan network driver
Upstream-commit: 98fef1cb0b22b8dca2f88d637e01cf0a5df94798
Component: engine
2016-12-13 20:03:24 -08:00
f541c344f4 Merge pull request #29008 from cpuguy83/refcount_graphdriver
Refcount graphdriver plugins properly
Upstream-commit: af50cefe6cdf07e2028b9ad934a2cb5818a935eb
Component: engine
2016-12-13 19:24:46 -08:00
9e9a89f944 Pass daemon experiemental flag to libnetwork
Required to enable ipvlan experimental network driver

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: b0eef4e427fc87826dd8abd59d09365abdfbedbb
Component: engine
2016-12-13 14:22:54 -08:00
0bc3e1033e return not a swarm when unlock
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0270645c13647456834d86082470734e944fdd37
Component: engine
2016-12-13 10:38:45 +08:00
1b92196a34 Merge pull request #29130 from cyphar/29097-dynamically-reload-apparmor
daemon: switch to 'ensure' workflow for AppArmor profiles
Upstream-commit: 96a84ed85a010c2cf6dc3308ae30e6594a519e59
Component: engine
2016-12-12 13:32:36 -08:00
57d5fc9bfa Move templates to pkg/templates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 04f7a03359ac009ad2cd548fa93124a66e880ae5
Component: engine
2016-12-12 09:34:03 +01:00
38517bb088 Move debug functions to cli/debug package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce375503477c82a76ce8530e73655fbbf5046834
Component: engine
2016-12-12 09:33:58 +01:00
2ce45ea956 Fix missing IPAM options in swarm network mode
This fix tries to fix the issue raised in 29044 where
the IPAM options is missing in swarm network mode
after the service is deployed. Before the service
is deployed, the IPAM options is available.

The reason for the issue is that, before service is
deployed, `network inspect` is querying the swarm and
obtained the correct information.
However, after service is deployed, swarm executor
does not pass the IPAM options to the backend (daemon).
Also after service is deployed, `network inspect` is
actually querying the local daemon for information.
At this time the network information with missing IPAM
options is returned.

This fix fixes the issue by updating the swarm network
allocator and swarm executor.

A separate PR for swarmkit will be opened.

An integration test has been added to cover the change.

This fix fixes 29044.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4d958e99c178f7cd4196ed901c2834ae13f0f7d0
Component: engine
2016-12-10 09:29:50 -08:00
6dcc37964b Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f29bbd16f5d2bb82d815ea59f8ef85fe59384c89
Component: engine
2016-12-09 19:46:28 -05:00
3185ae49df Merge pull request #29041 from aaronlehmann/hide-updatestatus
api: Hide UpdateStatus when it is not present
Upstream-commit: e94a40cddaca7b920405a730d29892e49f1be19b
Component: engine
2016-12-08 13:55:13 +01:00
1ff39efbfb Merge pull request #29144 from yongtang/29129-hostname-in-host-mode
Fix issue for `--hostname` when running in "--net=host"
Upstream-commit: fee2bb26826ad2be21c66932de12e05a69275970
Component: engine
2016-12-08 12:57:53 +01:00
5c01c889af Merge pull request #29200 from coolljt0725/fix_attach
fix #29199, reset container if container start failed
Upstream-commit: a42ca21f50d79beae04df3ceb47496dbed7632fd
Component: engine
2016-12-07 15:21:28 -08:00
b1cf7fa923 fix #29199, reset container if container start failed
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: e806821b53f9ca1f1a3d933e7bbfe04a5566a3bf
Component: engine
2016-12-07 01:37:08 -05:00
ed60722124 not export errors and forbid leave when unlocked
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7bdd1a4f9c06ab4af8e652b7483104456e72c442
Component: engine
2016-12-07 13:25:34 +08:00