Commit Graph

4390 Commits

Author SHA1 Message Date
9601f4ac96 I found out this err var isn't being used, so underscoring it to preserve resources
Signed-off-by: DiSiqueira <dieg0@live.com>
Upstream-commit: 4bd1895241b7ad750f22b0ff18fd9a3eacfdb362
Component: engine
2017-01-31 19:48:15 -02:00
754408c859 Move secret name or ID prefix resolving from client to daemon
This fix is a follow up for comment:
https://github.com/docker/docker/pull/28896#issuecomment-265392703

Currently secret name or ID prefix resolving is done at the client
side, which means different behavior of API and CMD.

This fix moves the resolving from client to daemon, with exactly the
same rule:
- Full ID
- Full Name
- Partial ID (prefix)

All existing tests should pass.

This fix is related to #288896, #28884 and may be related to #29125.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa358a87571f9212f91d8fde6696926d76ecca64
Component: engine
2017-01-27 10:40:05 -08:00
1a024c5e04 Merge pull request #30157 from aboch/att
Remove attachable network on swarm leave
Upstream-commit: 43544cf2b4752e56066242ef71d06558f233fbc7
Component: engine
2017-01-26 17:03:23 -08:00
e827bea430 Merge pull request #30144 from dnephin/add-secrets-to-stack-deploy
Add secrets to stack deploy
Upstream-commit: 5706d8206bd41fca36ed634f80fe85f5ffbed71b
Component: engine
2017-01-26 14:54:04 -08:00
2613e5ae2f Remove attachable network on swarm leave
- When the node leaves the cluster, if any user run
  container(s) is connected to the swarm network,
  then daemon needs to detach the container(s) and
  remove the network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 3cedca5d532958ffc007d9b62cc871d3d113f054
Component: engine
2017-01-26 11:16:07 -08:00
bc911a640c Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
Upstream-commit: a69c4129e086e4e7b86cce7d2682685dfdc6f2d2
Component: engine
2017-01-26 10:35:34 -08:00
9e92b82db9 Remove secrets as part of stack remove.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f0a5531c46c3fe602b372de434125a3cd046a0b6
Component: engine
2017-01-26 11:33:15 -05:00
f693277e41 Test and fix external secrets in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b3427e43edc56824f762e964c955b906fa363a3a
Component: engine
2017-01-26 11:33:15 -05:00
5ed83fcbc5 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ec84ef76df30663d5728f903b314f4486587135
Component: engine
2017-01-26 11:33:15 -05:00
a818254bf8 Fix incorrect Scope in network ls/inspect with duplicate network names
This fix tries to address the issue raised in 30242 where the `Scope`
field always changed to `swarm` in the ouput of `docker network ls/inspect`
when duplicate networks name exist.

The reason for the issue was that `buildNetworkResource()` use network name
(which may not be unique) to check for the scope.

This fix fixes the issue by always use network ID in `buildNetworkResource()`.

A test has been added. The test fails before the fix and passes after the fix.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 05a831a775be5e8d752deaef620e629deb15cb89
Component: engine
2017-01-25 09:39:55 -08:00
0dedd22a73 Merge pull request #30043 from dmcgowan/distribution-reference-update-1
Distribution reference update
Upstream-commit: e9c0de0de65182915d1cd205f06f5c903c20a29f
Component: engine
2017-01-24 20:38:20 -08:00
751c4495a1 Merge pull request #30182 from AkihiroSuda/validate-tmpfs
validate mount path for tmpfs
Upstream-commit: d4cd4b2164317e93873f2a6a43d75b0658d32d60
Component: engine
2017-01-25 03:08:17 +01:00
3a33131bc7 Merge pull request #30291 from yongtang/30279-ps-format
Fix failure in `docker ps --format` when `.Label` has args
Upstream-commit: 42d25de1b75a1f5b0d8369889b00b83e212c1d92
Component: engine
2017-01-24 17:55:52 -08:00
3920d4e123 Merge pull request #30227 from thaJeztah/fix-ineffectual-assignments
fix some ineffectual assignments (and minor fixes)
Upstream-commit: 9b2dabbf1845d6730cf9d9b12c63fb4e94e0f886
Component: engine
2017-01-25 02:49:57 +01:00
f757a1d4b1 Minor GoDoc fixup in integration-cli
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 089e1c1c5b74dd794c4cb6db86240e175000edc0
Component: engine
2017-01-24 18:03:30 +01:00
406aff91c7 fix some ineffectual assignments
to make goreportcard a bit happier
https://goreportcard.com/report/github.com/docker/docker

also found that `TestCpToErrDstParentNotExists()` was
partially broken, because a `runDockerCp()` was inadvertently
removed in f26a31e80cfcc77daba0872ddb14bf03f4398311

`TestDaemonRestartSaveContainerExitCode()` didn't verify
the actual _Error_ message, so added that to the test,
and updated the test to take into account that the
"experimental" CI enables `--init` on containers.

`TestVolumeCLICreateOptionConflict()` only checked
for an error to occur, but didn't validate if the
error was due to conflicting options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ba0afd70e89562aa3c668c87fb9191ed9edb7260
Component: engine
2017-01-24 11:16:19 +01:00
9cbd4394d2 Improve the error print of image inspect
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
Upstream-commit: cc9ed0a31b0656c58ad7953f2c54d46258380443
Component: engine
2017-01-24 11:07:20 +08:00
4f39eed3bd Fix failure in docker ps --format when .Label has args
This fix tries to fix the issue in 30279 where  `docker ps --format`
fails if `.Label` has args. For example:
```
docker ps --format '{{.ID}}\t{{.Names}}\t{{.Label "some.label"}}'
```

The reason for the failure is that during the preprocessing phase
to detect the existance of `.Size`, the `listOptionsProcessor`
does not has a method of `Label(name string) string`.

This results in the failure of
```
template: :1:24: executing "" at <.Label>: Label is not a method but has arguments
```

This fix fixes the issue by adding needed method of `Label(name string) string`.

This fix fixes 30279.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2cd4ba1e56222a938b2edaa7ad7981c9a2bc248f
Component: engine
2017-01-23 09:31:48 -08:00
5fa515a0ff Add --format flag for docker plugin ls
This fix tries to address the enhancement discussed in 28735 to add
`--format` for the output of `docker plugin ls`.

This fix
1. Add `--format` and `--quiet` flags to `docker plugin ls`
2. Convert the current implementation to use `formatter`, consistent with
   other docker list commands.
3. Add `pluginsFormat` for config.json.

Related docs has been updated.

Several unit tests have been added to cover the changes.

This fix is related to 28708 and 28735.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1c0d37fa7f04ade13e65aff74ea0495bb846d782
Component: engine
2017-01-20 15:59:44 -08:00
6421d00c6a Run TestBuildCopyWilcardInName only on linux daemon and unix client
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e47c46c713afc42430de339c6324632ef8830894
Component: engine
2017-01-20 16:10:28 +01:00
142454692f validate mount path for tmpfs
There was no validation for `docker run --tmpfs foo`.

In this PR, only two obvious rules are implemented:
 - path must be absolute
 - path must not be "/"
We should add more rules carefully.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 4a8799dc0a000a74eae49a01b054ae687bc18f73
Component: engine
2017-01-20 06:01:48 +00:00
027b11b8c3 Remove use of forked reference package for cli
Use resolving to repo info as the split point between the
legitimate reference package and forked reference package.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0421f5173dbdcb4e4eade5267f274302bb6ab97c
Component: engine
2017-01-19 16:04:50 -08:00
d24367c4ff Merge pull request #30165 from xulike666/fix-typo-6/36
[combined] fix typo 
Upstream-commit: de0328560b818e86fd3eadc973f90341e5c33498
Component: engine
2017-01-19 17:21:22 +01:00
2db1bd6f28 fix typo
fix typo I found AMAP in integration-cli/*

fix typo mentioned by Allencloud

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 40af5691648c5b9d07b1231e3ed3be29fd66521a
Component: engine
2017-01-19 15:52:28 +08:00
898356a3e3 Merge pull request #30185 from vdemeester/integration-build-cmd-cleanup-take2
[test-integration] Clean more build utils
Upstream-commit: e1c5e72902f1ec020fd7e179846d1faf06b281c6
Component: engine
2017-01-18 15:12:03 +01:00
4173ac21ae Merge pull request #30219 from tonistiigi/test-port-leak
Switch TestSwarmPublishDuplicatePorts to different ports
Upstream-commit: 56b951fbe526eeacaca434dbbabb59b07d3ba13e
Component: engine
2017-01-17 17:16:14 -08:00
85210563e9 Switch TestSwarmPublishDuplicatePorts to different ports
There is an issue with the ports leaking to other tests.
This is a workaround until the actual problem is addressed.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 24cd5444f982fd295248006f44c6ec2f4ab7f1f8
Component: engine
2017-01-17 10:54:22 -08:00
9c9701a340 Block obsolete socket families in the default seccomp profile
Linux supports many obsolete address families, which are usually available in
common distro kernels, but they are less likely to be properly audited and
may have security issues

This blocks all socket families in the socket (and socketcall where applicable) syscall
except
- AF_UNIX - Unix domain sockets
- AF_INET - IPv4
- AF_INET6 - IPv6
- AF_NETLINK - Netlink sockets for communicating with the ekrnel
- AF_PACKET - raw sockets, which are only allowed with CAP_NET_RAW

All other socket families are blocked, including Appletalk (native, not
over IP), IPX (remember that!), VSOCK and HVSOCK, which should not generally
be used in containers, etc.

Note that users can of course provide a profile per container or in the daemon
config if they have unusual use cases that require these.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 7e3a596a63fd8d0ab958132901b6ded81f8b44c0
Component: engine
2017-01-17 17:50:44 +00:00
bdb483e4e4 Clean more build utils in integration cli
- Remove deprecated buildImage* functions
- Rename buildImageNew to buildImage
- Use *check.C in fakeContext* setup and in getIdByName

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c10f6ef43f884306eb3ef60b2d19fdc931cf34cc
Component: engine
2017-01-17 15:42:38 +01:00
c052aabd0e Merge pull request #30138 from vdemeester/integration-use-testenv
[test-integration] Use testEnv methods and remove most of the global variables
Upstream-commit: 4fdfcb36cd6ab3bdf78be522f43c0c2a2bd5c898
Component: engine
2017-01-17 14:31:49 +01:00
f7b8e381ec Use testEnv methods and remove most of the global variables
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c8016e669f9507480745a441ba4cd735150ebb85
Component: engine
2017-01-17 12:39:08 +01:00
a6532984af add integration test for FQDN hostname
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 950792dc6d26b6ec6d62579ada57570acedcd0ee
Component: engine
2017-01-17 11:01:59 +01:00
58253ac5ca Merge pull request #30058 from vdemeester/integration-build-cmd-clean
[test-integration] clean docker_cli_build_test.go
Upstream-commit: dcf1264f1cbf4c5af7450357fad027c9a910808d
Component: engine
2017-01-16 18:16:49 +09:00
9f48176b5c Merge pull request #30151 from tonistiigi/fix-defunct
Avoid defunct registry/notary processes during tests
Upstream-commit: ead8ce2431988170b8c89dbd8053d1824e9a919d
Component: engine
2017-01-16 08:55:16 +01:00
93d29be66d Refactor docker_cli_build_test.go
Use `testutil/cmd` for `buildCommand`.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c778f4b964934aeaf0d86d79ea7397940b303238
Component: engine
2017-01-15 16:48:08 +01:00
58316308f8 Merge pull request #29831 from vdemeester/integration-small-cleanups
[test-integration] Small cleanups on integration cli
Upstream-commit: 24c4226dc7675e114463654f138e00a229b73a02
Component: engine
2017-01-14 16:43:39 -05:00
fed9eaa59d Merge pull request #29856 from Microsoft/jjh/warntoout
Windows to Linux build warning to stdout
Upstream-commit: 7d24cc7710f49f1f3caadf15d9eddb7e3b7a5f0d
Component: engine
2017-01-14 16:37:31 -05:00
da84729671 Avoid defunct registry/notary processes during tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 09dbce5f5af99509a98827e1a8c34df3a00682eb
Component: engine
2017-01-13 17:45:14 -08:00
a9065717ae Merge pull request #30061 from yongtang/30027-docker-images-v1.12
Fix `Size` in `docker images` for v1.12 client to v1.13 daemon
Upstream-commit: 0b09d6bfa7af18763d0f4a74f179117a73e70e46
Component: engine
2017-01-13 02:11:48 +01:00
2cf38188cb Merge pull request #30039 from ripcurld0/specify_line_no_dockerfile_err
Specify in which line the Dockerfile parser failed
Upstream-commit: 597843e79040a4f00bfe2abd83343d43edd195f5
Component: engine
2017-01-12 19:48:45 -05:00
7a795dddeb Add test for image size for v1.12 and v1.13 clients against v1.13 daemon
This test checks to make sure both v1.12 and v1.13 client against v1.13 daemon get correct `Size` after the fix.

This test is related to 30027.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d9451f1c8c8a584053ef06e0801df14e37d43cbd
Component: engine
2017-01-12 08:12:39 -08:00
1334440bd8 Small cleanups on integration cli
- Join a few tests in one when it makes sense (reduce the number of
  container run and thus the overall time of the suites)
- Remove some duplication on several tests
- Remove some unused methods

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9af5d7c34039d5e9d8a7dca6ea148147dc482dee
Component: engine
2017-01-12 16:57:59 +01:00
a1c6880e0b Specify in which line the Dockerfile parser failed
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 8f282cdea5186896923da02f420e929c8ded61cb
Component: engine
2017-01-12 17:45:45 +02:00
5ce3711251 Merge pull request #30010 from thaJeztah/master-revert-27146
Revert "Require continuation char to be last char in a line"
Upstream-commit: bf71db7a12c6855720182d02af1a58c0b343468d
Component: engine
2017-01-12 09:17:08 -05:00
b003f7cdb4 Merge pull request #30077 from tonistiigi/fix-test-leaks
Fix leaked connections in integration tests
Upstream-commit: af5323f9583dbce0f6d8a43a2e442400b9e9b981
Component: engine
2017-01-12 11:35:02 +01:00
4481a136ca Merge pull request #30079 from tonistiigi/debug-trusttest
Print daemon stacktrace when trust test times out
Upstream-commit: 640a5c1a38b3d6128be27f15e823e7cb2ce7e323
Component: engine
2017-01-11 17:06:33 -08:00
8618f63e83 Print daemon stacktrace when trust test times out
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e533685d13251e5c7127f2d92636c7fa6393c06e
Component: engine
2017-01-11 15:14:36 -08:00
24c4a881f8 Fix leaked connections in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1e98fb5ad91b956005059ae2148b1dda6fdf372c
Component: engine
2017-01-11 14:48:48 -08:00
b8f872e90b Merge pull request #29891 from sanimej/libnvendor
vendorin libnetwork @f9fa6e0
Upstream-commit: de54284bd7cf4e1c8c255c61d0cf05533f3c2ba4
Component: engine
2017-01-11 19:55:00 +01:00
2b1a88aa3b Handle IPv6 enabling correctly in the tests
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: d5e8d8e1cfb65cab9a2a651fd30c50a06afb4e00
Component: engine
2017-01-10 16:34:23 -08:00