Commit graph

29824 commits

Author SHA1 Message Date
Lei Jitang
e806821b53 fix #29199, reset container if container start failed
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-12-07 01:37:08 -05:00
allencloud
7bdd1a4f9c not export errors and forbid leave when unlocked
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-07 13:25:34 +08:00
Andrea Luzzardi
bbd2018ee1 service ps: Revert output to 1.12 behavior.
- Display the ID column
- Do not append the task ID in the name column
- (NEW): Truncate task IDs, unless --no-trunc is specified

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-12-06 18:52:47 -08:00
erxian
15be050fb3 refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-12-07 10:27:40 +08:00
John Howard
9249b29348 Merge pull request #29186 from yongtang/29185-docker-inspect-unknown-object
Fix `docker inspect <unkown object>` issue on Windows
2016-12-06 18:23:08 -08:00
Aaron Lehmann
d91ed88365 registry: Remove reference.go
This removes some very old vestigial code that really should have been
removed during the content addressability transition. It implements
something called "reference" but it behaves differently from the actual
reference package. This was only used by client-side content trust code,
and is relatively easy to extricate.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-06 15:53:21 -08:00
Vincent Demeester
aefbc03444 Make sure we don't run integration cli test if compilation fails
Otherwise, while using test-integration-shell, it runs the tests using
the previously compiled test binary.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-06 23:37:08 +01:00
Aleksa Sarai
567ef8e785
daemon: switch to 'ensure' workflow for AppArmor profiles
In certain cases (unattended upgrades), system services can disable
loaded AppArmor profiles. However, since /etc being read-only is a
supported setup we cannot just write a copy of the profile to
/etc/apparmor.d.

Instead, dynamically load the docker-default AppArmor profile if a
container is started with that profile set. This code will short-cut if
the profile is already loaded.

Fixes: 2f7596aaef ("apparmor: do not save profile to /etc/apparmor.d")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-07 08:47:28 +11:00
Anusha Ragunathan
b35490a8ba Make v2/Plugin accesses safe.
v2/Plugin struct had fields that were
- purely used by the manager.
- unsafely exposed without proper locking.
This change fixes this, by moving relevant fields to the manager as well
as making remaining fields as private and providing proper accessors for
them.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-12-06 13:23:41 -08:00
Yong Tang
88fcdb0a82 Fix docker inspect <unkown object> issue on Windows
This fix tries to address the issue raised on 29185 where
`docker inspect <unknown object>` on Windows will return:
```
Error response from daemon: plugins are not supported on this platform
```

The reason was that in case `--type` is not specified, `docker inspect`
will iterate through different types `container`, `image`, `network`,
`plugin` etc. The `plugin` object is the last type to check.

However, as `plugin` is not supported on Windows yet, the error message
is not very informative for `plugins are not supported on this platform`.

This fix tries to fix the issue by return a `not found` error on unsupported
platforms as well.

An integration test has been added to cover the changes for Windows/Linux.

This fix fixes 29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-06 12:05:59 -08:00
Evan Hazlett
f86db80b5f add headers when using exec
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

ensure headers are properly sanitized

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-12-06 14:27:34 -05:00
Tõnis Tiigi
eefbf1ddd3 Merge pull request #28907 from tonistiigi/cluster-refactor
Switch cluster locking strategy
2016-12-06 10:02:23 -08:00
Sebastiaan van Stijn
9ec471049d Merge pull request #29182 from albers/completion-network-create--attachable
Add bash completion for `docker network create --attachable`
2016-12-06 18:52:55 +01:00
Harald Albers
8d2e789bbc Add bash completion for docker network create --attachable
Signed-off-by: Harald Albers <github@albersweb.de>
2016-12-06 08:44:02 -08:00
Brian Goff
b7ab3276c2 Merge pull request #29081 from andrewhsu/fix-rhel73
add selinux policy for centos-7
2016-12-06 11:00:45 -05:00
Yong Tang
b0a7b0120f Fix issue for --hostname when running in "--net=host"
This fix tries to address the issue raised in 29129 where
"--hostname" not working when running in "--net=host" for
`docker run`.

The fix fixes the issue by not resetting the `container.Config.Hostname`
if the `Hostname` has already been assigned through `--hostname`.

An integration test has been added to cover the changes.

This fix fixes 29129.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-06 07:29:45 -08:00
Brian Goff
11702c66cf Merge pull request #28823 from AkihiroSuda/ensure-dev-pts-readonly
add a test for ensuring the behavior of read-only /dev/shm
2016-12-06 08:39:43 -05:00
Antonio Murdaca
fa45184713 Merge pull request #29153 from aaronlehmann/volume-refs-map
volume: Use a map of maps for VolumeStore.refs
2016-12-06 14:35:18 +01:00
Luiz Svoboda
63aaf5e316 Add variable DOCKER_BUILD_ARGS to build-deb script
Some containers were being built (`docker build`) without
the DOCKER_BUILD_ARGS variable, which was causing some
issues because of the lack of network proxy configuration.

Fixes #29132

Signed-off-by: Luiz Svoboda <luizek@gmail.com>
2016-12-06 10:17:41 -02:00
Sebastiaan van Stijn
080d7a5543 Merge pull request #29145 from Microsoft/jjh/make
Windows: make.ps1 Throw exception on failure
2016-12-06 12:10:56 +01:00
Sebastiaan van Stijn
96a2d9e7d2 Merge pull request #29149 from Microsoft/jjh/dockerfileclarification
Windows: Dockerfile 2GB clarification Hyper-V
2016-12-06 12:10:03 +01:00
Sebastiaan van Stijn
f687eb576f Merge pull request #29166 from allencloud/add-403-for-network-create-endpoint
add 403 for endpoint network create
2016-12-06 11:47:28 +01:00
Vincent Demeester
7f9ba93914 Merge pull request #29073 from adshmh/28756-print-checkpoint-name-in-checkpoint-create-command
Print checkpoint id when creating a checkpoint
2016-12-06 11:06:29 +01:00
Vincent Demeester
57d77cc205 Merge pull request #28896 from yongtang/28884-secret-name-mask-ID
Fix issue where secret ID is masked by name
2016-12-06 11:05:30 +01:00
Vincent Demeester
745795ef2e Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
2016-12-06 11:03:45 +01:00
Vincent Demeester
08f0100d50 Merge pull request #28974 from AkihiroSuda/test-service-logs
improve TestServiceLogs for the goroutine issue #28915
2016-12-06 10:58:57 +01:00
Vincent Demeester
8326dcd2af Merge pull request #29159 from Microsoft/jjh/bumpgit
Windows: Bump to latest version of git
2016-12-06 10:30:33 +01:00
Vincent Demeester
67131bde6d Merge pull request #29096 from cyli/fix-swarmjoinpromote-test
Fix DockerSwarmSuite.TestSwarmJoinPromoteLocked flakiness
2016-12-06 10:19:36 +01:00
Sebastiaan van Stijn
b4618baf68 Merge pull request #29162 from friism/patch-8
Windows: make.ps1 - remove bonus whitespace
2016-12-06 10:18:42 +01:00
Akihiro Suda
e8a2c7196a Merge pull request #28939 from duglin/HideDupWarnings
Only show global warnings once
2016-12-06 16:12:34 +09:00
allencloud
0d21e24b9f add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-06 14:36:50 +08:00
Akihiro Suda
268991a9f5 Merge pull request #29136 from cpuguy83/pkgcache_use_volume
Use named volumes for docker pkg cache
2016-12-06 14:26:10 +09:00
Michael Friis
8d47858f96 remove bonus whitespace
Signed-off-by: Michael Friis <friism@gmail.com>
2016-12-05 20:21:25 -08:00
Akihiro Suda
f8a93d0c9d improve TestServiceLogs for the goroutine issue #28915
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-06 03:44:49 +00:00
Akihiro Suda
46ade6acb5 add a test for ensuring the behavior of read-only /dev/shm
The test ensures that `docker run --read-only -v /var/empty:/dev/shm:ro`
makes /dev/shm read-only

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-06 03:44:02 +00:00
zhangxianwei
2dfb57b670 Fix typo in integration-cli (#29160)
Signed-off-by: xianwei <xianwei.zw@alibaba-inc.com>
2016-12-05 22:23:41 -05:00
John Howard
8a45eea2dd Windows: Bump to latest version of git
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-05 18:40:31 -08:00
Brian Goff
c9623d1b76 Use named volumes for docker pkg cache
Changes the default when incremental build is enabled to use named
volumes instead of bindmounts.
The reason for this is, on Mac/Windows the bind mounts will go over the
shared fs, which is incredibly slow and itself uses lots of CPU.

Makes an incremental build on OSX go from ~40s to 10s.

To get the old behavior, can set `PKGCACHE_DIR=.go-pkg-cache`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-05 20:42:08 -05:00
Brian Goff
1f09d68a6e Merge pull request #29123 from vdemeester/29116-compose-to-swarm-logging
Handle logging in compose to swarm
2016-12-05 20:39:08 -05:00
Victor Vieux
29e728e9b2 Merge pull request #29082 from runcom/fix-rpm-buildtime
hack/make.sh: fix BUILDTIME
2016-12-05 16:31:29 -08:00
Aaron Lehmann
a762222396 volume: Use a map of maps for VolumeStore.refs
The current implementation of getRefs is a bit fragile. It returns a
slice to callers without copying its contents, and assumes the contents
will not be modified elsewhere.

Also, the current implementation of Dereference requires copying the
slice of references, excluding the one we wish to remove.

To improve both of these things, change refs to be a map of maps.
Deleting an item becomes trivial, and returning a slice of references
necessitates copying from the map.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-05 15:39:05 -08:00
John Howard
f7b4d65445 Windows: Dockerfile 2GB clarification Hyper-V
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-05 14:01:17 -08:00
cyli
e831a7cdb7 In DockerSwarmSuite.TestSwarmJoinPromoteLocked, actually wait for the node to
finish being demoted before restarting it and ensuring it isn't locked anymore
to reduce test flakiness.

Signed-off-by: cyli <cyli@twistedmatrix.com>
2016-12-05 13:21:27 -08:00
Tibor Vass
1c96879f1e Merge pull request #28963 from vieux/refactor_plugin_install
refactor plugin install
2016-12-05 12:00:29 -08:00
Brian Goff
04cd1990b4 Merge pull request #29117 from AkihiroSuda/vendor-swarmkit
[master] Vendor swarmkit
2016-12-05 14:11:21 -05:00
Vincent Demeester
ac9226d843 Merge pull request #29134 from unclejack/gofmt_fixes
api/types/container,client: gofmt
2016-12-05 19:26:25 +01:00
Sebastiaan van Stijn
6a8156d646 Merge pull request #29115 from andrewhsu/fix-vim-install
run dnf upgrade before installing in fedora
2016-12-05 19:05:14 +01:00
John Howard
8c22a00b77 Windows: make.ps1 Throw exception on failure
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-05 09:58:56 -08:00
Daniel Nephin
86faf137f9 Merge pull request #29121 from AkihiroSuda/fix-it-bundle
Fix bundle dir for integration-cli
2016-12-05 10:50:29 -05:00
unclejack
c1ce63b17b api/types/container,client: gofmt
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-05 17:00:36 +02:00