Commit Graph

4533 Commits

Author SHA1 Message Date
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
d262373ee7 Merge pull request #28907 from tonistiigi/cluster-refactor
Switch cluster locking strategy
Upstream-commit: eefbf1ddd3ee4e6b6e6dc7e938e77a96ceb40163
Component: engine
2016-12-06 10:02:23 -08:00
92a14fe836 Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
Upstream-commit: 745795ef2e0089c5001e5a2fc7ba8c1ab0234857
Component: engine
2016-12-06 11:03:45 +01:00
7eb856b2dd Merge pull request #28939 from duglin/HideDupWarnings
Only show global warnings once
Upstream-commit: e8a2c7196a2715c318bbfb2b57076fa1922a245f
Component: engine
2016-12-06 16:12:34 +09:00
35037b78fd Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a6be56b54e871c4e7a6e72881770a64676c27c3c
Component: engine
2016-12-02 20:08:49 -08:00
c0aa09b760 Merge pull request #28988 from vdemeester/28985-dont-validate-hostname
Remove hostname validation as it seems to break users
Upstream-commit: 3cb310c21049f652dd00d20899cb1ece1ee9aa8f
Component: engine
2016-12-02 21:16:56 -05:00
34d513c5af Merge pull request #29075 from cpuguy83/29070_fix_tmpfs_opts
Fix issue where TmpfsOptions are not sent to swarm
Upstream-commit: 0fb0d67008157add34f1e11685e23a691db92644
Component: engine
2016-12-02 13:40:20 -08:00
653a60cf01 Merge pull request #29039 from thaJeztah/fix-restart-limit-validation
Fix restartpolicy max-retry validation
Upstream-commit: 6e023ac7486edf7a2584cb918249b7e5fdaf91d2
Component: engine
2016-12-02 09:19:54 -08:00
0f9b87c8d5 Fix issue where TmpfsOptions are not sent to swarm
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a5b3649bfaca5958b25e42ab4f2fc5aa30929521
Component: engine
2016-12-02 11:43:47 -05:00
9e849b264c Fix restartpolicy max-retry validation
the restart policy validation was moved from
the client to the daemon in 94e95e4711643640701bd614902e75a2d01f12c5

As part of that change, retry-counts < 1
were marked as "invalid".

However, the default is 0 (unlimited), causing

    docker run -d --restart=on-failure nginx

To fail.

This changes the validation to only invalidate
retry-counts < 0.

A test was added, and other tests renamed
to allow running just these tests :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9db5d649aea1c3d4728d0159bb5175a49f77748e
Component: engine
2016-12-02 02:39:16 +01:00
abe19725d9 Merge pull request #28996 from Microsoft/jjh/sqlite-remove-windows
Windows: Factor out sqlite
Upstream-commit: a756c1ac659468bb8d6ec9ee2e1182fc6cae4002
Component: engine
2016-12-01 13:56:11 -08:00
c3ca8eccc1 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3f6127b173949cb36557601a56bc15ae2c45a698
Component: engine
2016-12-01 09:38:08 -08:00
bcb5d5d669 Switch cluster locking strategy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b7ea1bdb0227a789a15e23821b8db4d5ddceb26e
Component: engine
2016-11-30 14:59:12 -08:00
bb58024492 Merge pull request #28797 from miaoyq/fix-a-err-of-logger
Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
Upstream-commit: 6151ad19ad2a5cd2ec2c3afc08ed07f64623ae36
Component: engine
2016-11-30 13:27:40 -08:00
ba962e129a Merge pull request #28487 from cpuguy83/stack_dumps
Move stack dump dir to exec root
Upstream-commit: 6367c67ab71916d677d3498f0bb536da9ae63597
Component: engine
2016-11-30 20:01:29 +01:00
c46ac53d0a Remove hostname validation as it seems to break users
Validation is still done by swarmkit on the service side.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ef39256dfb711f8382a5c021b85d6c7d613282b0
Component: engine
2016-11-30 19:22:07 +01:00
1dd32f1888 Merge pull request #28965 from cpuguy83/move_plugin_shutdown
Move plugin shutdown after layerstore shtudown
Upstream-commit: 9c2f1669a0b556115f543a0f02bf1ea5576b7f71
Component: engine
2016-11-30 10:15:49 -08:00
3077005306 Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ff42a2eb41a86217a440a1c4b2afd3c4cd1d48ac
Component: engine
2016-11-30 10:11:42 -08:00
741407c1aa Merge pull request #28725 from Microsoft/jjh/builderenvcaseinsensitive
Windows: Builder case insensitive env
Upstream-commit: 4a0e295cd1702c36d883b0d2e52c039f407097a2
Component: engine
2016-11-30 08:33:29 -05:00
d598152124 Merge pull request #28899 from aaronlehmann/dont-pull-image-id
Don't resolve or pull images referenced by ID
Upstream-commit: 768f4ce02b5a2a86ea100d0b875c5949ea652c7d
Component: engine
2016-11-30 10:08:43 +01:00
c805a193cc Move plugin shutdown after layerstore shtudown
This ensures that graphdriver plugins can properly cleanup on daemon
exit.
Also prevents errors during shutdown when it tries to send the plugin a
`Cleanup()` request but ultimately times out since it's already been
shutdown.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4b400ecc4df4bcf245f1f751a7fd0c9c193d9dbf
Component: engine
2016-11-29 20:00:02 -05:00
c0fecf9b2a Merge pull request #28721 from dongluochen/attachable_network
Fix network attachable option
Upstream-commit: 4fae94f6637bfbbeba809f930f2ecf1e36748882
Component: engine
2016-11-29 11:04:49 -08:00
17f785da28 Merge pull request #28905 from jlhawn/reject_unspecified_advertise_addr
Reject unspecified advertise addr on swarm init
Upstream-commit: 492bc8eb457cfbf914b762df0b584f668be4a628
Component: engine
2016-11-29 16:24:45 +01:00
852751f7da Merge pull request #28935 from likel/improve-style
Initialize field with name
Upstream-commit: 209c6a419aac4952bef2fedc8f941130305e6e54
Component: engine
2016-11-29 15:52:13 +01:00
bb120e07d5 Initialize field with name
Signed-off-by: Ke Li <kel@splunk.com>
Upstream-commit: da6944ec8747a50941c170186605c8cead517201
Component: engine
2016-11-29 19:36:56 +08:00
6eff6aab71 cluster: Refuse swarm spec not named "default"
If, using the API, a user submits an init request with a spec that has a
name other than "default", the engine will rename the "default" cluster
object. Some parts of swarmkit depend on having a cluster object named
"default". Reject any specs that use other names.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 9dba9e3248f8476d15242ce3ec0bf6d6d50c1a76
Component: engine
2016-11-28 17:19:29 -08:00
0e6be54ce9 Fix network attachable option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: abcb699ad175859ee192388c001f55df5f88e8cd
Component: engine
2016-11-28 16:54:56 -08:00
fc0f081a42 Reject unspecified advertise addr on swarm init
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: eeac8719466dbc42de7a9919d4f549863944aa19
Component: engine
2016-11-28 15:44:06 -08:00
4d8affc167 Don't resolve or pull images referenced by ID
If a swarm service is created using an image ID, it's useless to try to
pull this reference or resolve it to a manifest digest. Avoid doing this
when a fully qualified image ID is given.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 089842c4b47c262187b0b1a8d6d124f3faa03752
Component: engine
2016-11-28 13:53:52 -08:00
f53ec9c3d1 Windows: Builder case insensitive env
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 49f392ff6b528d571eac538f5365bd51c4c83e5c
Component: engine
2016-11-28 10:30:45 -08:00
ae5687c23e Merge pull request #28514 from Microsoft/jjh/workdir
Refix COPY file . after WORKDIR (now always created)
Upstream-commit: 937027a0cbaf256ca32664d8d64d1c8eda16eaa6
Component: engine
2016-11-28 12:58:17 -05:00
89a9795d2b Merge pull request #28710 from miaoyq/eliminate-redundant-parameters
Eliminate the redundant parameter
Upstream-commit: 76a0dfaa8e77fc04d97357fcb999d669b6485db2
Component: engine
2016-11-26 14:37:17 +01:00
2f9e7efdc3 Merge pull request #28829 from lixiaobing10051267/masterDaemon
check typos and fix in daemon directory
Upstream-commit: 022c13271b274074a6190952f1888b01c13c4a7c
Component: engine
2016-11-26 14:33:09 +01:00
115737bff2 check typos and fix in daemon directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: cf4f5b47710b3875767f997fc2eb3386cb0b66c0
Component: engine
2016-11-26 17:23:21 +08:00
0fab75c2a1 Fix grammar on error message
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: cd5c8e9c2dc181cd624bdb10947a19197215d730
Component: engine
2016-11-25 14:58:20 +00:00
94240c87f9 Merge pull request #28759 from miaoyq/optimization-context-name1
Optimize the function 'Context.Name()' and replace 'Context.Container…
Upstream-commit: e026f80a4d217eda5622c2b984fde2cdb8da0dc3
Component: engine
2016-11-25 13:25:17 +01:00
50e0ca5a47 Merge pull request #28804 from bfirsh/better-service-network-overlay-error-message
Improve error when connecting service to network
Upstream-commit: 8602d97835a1cb99943ca22c76d147944953f86a
Component: engine
2016-11-24 09:06:51 -08:00
64b693348d Improve error when connecting service to network
The error didn't hint at how to resolve it. Google auto-suggest
also implies that people have been Googling this error.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 70acb89fa2e889393d33664bc780cf116795f3e4
Component: engine
2016-11-24 14:43:24 +00:00
c3ca7189dc Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

add a test for 'CopyMessage'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 3b82eac65fc365a89f64ccaba98f8f3b5c9c5787
Component: engine
2016-11-24 20:08:54 +08:00
475c963e9d Optimize the function 'Context.Name()' and replace 'Context.ContainerName' that need to remove slash with 'Context.Name()'.
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 52fd6e46645de098d803bfc510c4c24af1099def
Component: engine
2016-11-24 09:24:29 +08:00
154b3f0e4f Restrict checkpoint name to prevent directory traversal
This fix tries to address the issue raised in 28769 where
checkpoint name was not checked before passing to containerd.
As a result, it was possible to use a special checkpoint name
to get outside of the container's directory.

This fix add restriction `[a-zA-Z0-9][a-zA-Z0-9_.-]+` (`RestrictedNamePattern`).
This is the same as container name restriction.

This fix fixes 28769.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c90ec0517544e7d054d79f71f4d24d9ebbad7408
Component: engine
2016-11-23 13:23:07 -08:00
e12f9af05e COPY file . after WORKDIR (now always created)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 286ab6d69bb999f5fcbdfdcac50bb8d65bb50c56
Component: engine
2016-11-23 09:56:02 -08:00
905aa6bfbb daemon: remove not needed unmarshal
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 30b8712e93819b2da77e67e16f9c7b81fd3a0cb4
Component: engine
2016-11-23 12:53:25 +01:00
9b69a300d4 Eliminate redundant parameters
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: 58028a2919f1ee794a058fb3451a5145a6382b4d
Component: engine
2016-11-23 09:28:13 +08:00
167591374d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
Upstream-commit: 5c1826ec4de381df9f739ce0de28e37d4f734d47
Component: engine
2016-11-22 16:58:30 -08:00
e92b610690 Merge pull request #28727 from cyli/do-not-display-secret-digest
Do not display the digest or size of swarm secrets [1.13] 
Upstream-commit: 22ba220e864d6d30ce1ed56a5461b96dbade844f
Component: engine
2016-11-22 16:44:06 -08:00
e746d79ff3 Merge pull request #28601 from tiborvass/plugin-misc-fixes
Plugin miscellaneous fixes
Upstream-commit: 23ea9e45fd6281e82c389e6112457a7bb70f8d89
Component: engine
2016-11-22 16:12:37 -08:00
2e3fe52bff Do not display the digest or size of swarm secrets
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 2c0613540a25d45069d142542e572bb6338e4155
Component: engine
2016-11-22 18:13:27 -05:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
8236c4e19a plugins: misc fixes
Rename variable to reflect manifest -> config renaming
Populate Description fields when computing privileges.
Refactor/reuse code from daemon/oci_linux.go

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 6547609870b66f9dfb1894a4987c42608f856f3e
Component: engine
2016-11-22 14:32:07 -08:00