Commit Graph

2103 Commits

Author SHA1 Message Date
711fedae4a Return pipeline errors correctly.
To use a deferred func to overwrite the returned error requires using
the 'named' error. So reuse err, instead of pipelineError. Also, the old
pipelineError will never be nil, since its executed before the error can
be set.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: af2e2562494a11ee8e6ede58a29cc250935e74c4
Component: engine
2016-09-23 13:09:56 -07:00
f07146ebf8 Make graphdrivers work with pluginv2.
As part of making graphdrivers support pluginv2, a PluginGetter
interface was necessary for cleaner separation and avoiding import
cycles.

This commit creates a PluginGetter interface and makes pluginStore
implement it. Then the pluginStore object is created in the daemon
(rather than by the plugin manager) and passed to plugin init as
well as to the different subsystems (eg. graphdrivers, volumedrivers).
A side effect of this change was that some code was moved out of
experimental. This is good, since plugin support will be stable soon.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: fefea805e930a67fb6327f8e59415932861358cb
Component: engine
2016-09-20 08:49:48 -07:00
90dfc08974 Merge pull request #26436 from stevvooe/remove-transport-package
client: remove transport package 
Upstream-commit: 7a86930c7452e19ee72557bb8264e81378ccfbb5
Component: engine
2016-09-20 16:43:56 +02:00
4cd6f89f27 Revert "Add default timeout to pkg/plugins/client"
This reverts commit 0699b00d26a60f4a8447572b34c4aad1ce73d2e1.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 5c35bfed3f4823e205c5d5b171f23972ff8b3de0
Component: engine
2016-09-20 10:01:03 +02:00
a54b053e2e Merge pull request #26662 from WeiZhang555/fix-flaky-unit-test
Fix flaky unit test
Upstream-commit: 56952e2159f464e2b3a038b81b8d11be45cee308
Component: engine
2016-09-17 18:32:11 -07:00
5049c43226 Merge pull request #25737 from Microsoft/jjh-statistics
Windows: Add support for docker stats
Upstream-commit: 4a0419f536ce3a7b1eade67440cfc84d6e486caf
Component: engine
2016-09-17 09:31:24 -07:00
1dc2c82ca8 Fix flaky unit test
Fix flaky test `TestHTTPTimeout` caused by precision problem.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: bc5768733db79874d8918e8499df01d68cae2d6e
Component: engine
2016-09-17 19:40:58 +08:00
7342ae40e2 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 340e5233b2fb95981ddea610c1667134ed3b2376
Component: engine
2016-09-16 11:56:15 -07:00
8f9c1794c9 Merge pull request #26512 from AkihiroSuda/fix-pkg-plugins-racy-test
[test] fix racy test in pkg/plugins
Upstream-commit: a1fc3852dace4b07996b8189a236938d9e0e21ae
Component: engine
2016-09-15 20:11:03 -07:00
6bbb3e807c fix racy test in pkg/plugins
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 4bc908ec8910468711960a4bcd4f3ec8dce909fb
Component: engine
2016-09-16 01:43:35 +00:00
1a62240ad4 Merge pull request #26511 from AkihiroSuda/fix-pkg-archive-racy-test
[test] fix racy tests in pkg/archive
Upstream-commit: b2263c111f1a0e8efc8646655c03fd73ce2d258b
Component: engine
2016-09-15 11:10:34 -07:00
4a3b9d42c8 progress: Rate limit progress bar output
ProgressReader outputs progress information every 500 KB. This could be
excessive if something is being transfered at a fast rate. Rate-limit
progress output to 10 per second.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f8eab6fea85f92aaa3c23bd0c87451a0811b5e3a
Component: engine
2016-09-14 17:23:16 -07:00
a658a7684d fix racy tests in pkg/archive
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 62cbd2589fb92c71711a323953f2713ab529e801
Component: engine
2016-09-14 04:17:23 +00:00
2f979c6743 Merge pull request #26514 from AkihiroSuda/fix-pkg-integration-race
[test] fix races in pkg/integration/cmd
Upstream-commit: 675144ff8d251a97322859a78f28ed4f988d3a74
Component: engine
2016-09-13 15:18:41 +02:00
d90edcd897 apparmor: do not save profile to /etc/apparmor.d
Writing the profile to /etc/apparmor.d, while also manually loading it
into the kernel results in quite a bit of confusion. In addition, it
means that people using apparmor but have /etc mounted read-only cannot
use apparmor at all on a Docker host.

Fix this by writing the profile to a temporary directory and deleting it
after it's been inserted.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 2f7596aaef3a9f8ec1f2d0937462d9263bee8b6b
Component: engine
2016-09-13 16:25:16 +10:00
3e11675204 fix races in pkg/integration/cmd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: e17f77ec51f50f9c14c1acd36f1db6f5246b62e0
Component: engine
2016-09-13 04:23:36 +00:00
9a4ddab230 Add default timeout to pkg/plugins/client
Signed-off-by: Chun Chen <ramichen@tencent.com>
Upstream-commit: 0699b00d26a60f4a8447572b34c4aad1ce73d2e1
Component: engine
2016-09-12 10:39:32 +08:00
b73e4afba2 tlsconfig: move Clone into proper package
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 9d7be9df8f79b26a4b9778851cf19a6579f8bc61
Component: engine
2016-09-09 12:05:17 -07:00
5c50f1d40b Merge pull request #26428 from darrenstahlmsft/AddToSymlink
Don't attempt to evaluate drive root on Windows
Upstream-commit: c1f2776bf1e8997e44d3c244e99104b3511b7255
Component: engine
2016-09-09 09:09:24 -07:00
4e9c99c3b4 Don't attempt to evaluate drive root on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: fdce2a7775ec80d769f585c0a400c6cf6615776b
Component: engine
2016-09-08 13:52:54 -07:00
0238cc6815 Replace api/client imports with cli/command in experimental files.
Using

git grep -l 'client\.DockerCli' cli/command/stack/ | xargs sed -i -e 's/client\.DockerCli/command\.Dockercli/g'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9c2b9358125175db366ca000e6dae9af8dc88e2d
Component: engine
2016-09-08 15:46:48 -04:00
0b990a4b09 Merge pull request #26107 from dnephin/client_cleanup
Shrink the DockerCLI type
Upstream-commit: d959e7fac4345762d26083a5d694871377f6dc75
Component: engine
2016-09-08 12:18:46 -07:00
3b1269cdeb Merge pull request #25523 from dmcgowan/fsync-layer-filestore
Update layer store to sync transaction files before committing
Upstream-commit: bc06542a1715273acc087dadd8179a88386dd6fb
Component: engine
2016-09-08 10:03:12 -07:00
e0295afbc4 Extract stream output handling to a new type.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a0ab33124a52853af611254cd73838e3d4407f51
Component: engine
2016-09-08 12:33:41 -04:00
5c0c4a4b23 Merge pull request #25578 from rwilliams/conemu
Force input stream ANSI emulation for ConEmu.
Upstream-commit: 28d18b8205c813e18af96f0eb88850b2734077f4
Component: engine
2016-09-08 11:12:33 -04:00
669392fd60 Merge pull request #26281 from LK4D4/fix_multireader_offset
pkg/ioutils: fix multireader SEEK_CUR branch
Upstream-commit: 2381c7f18df98b3ccc0b5a1236cd8e4ae57ba912
Component: engine
2016-09-06 20:47:03 -04:00
5b622d9c5a pkg/ioutils: fix multireader SEEK_CUR branch
Before getReaderForOffset returned always nil and wrong offset.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f3627c37269d02bacec42831f5a791ae4fd0bc5e
Component: engine
2016-09-06 11:08:35 -07:00
833a33ebb8 Fix govet for go1.7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 7a8c7b47cffa8485b03db715f78c087b01ae5dfa
Component: engine
2016-09-02 19:07:54 -07:00
7c9671c819 fix spec file support for Windows plugin discovery (#25903)
Signed-off-by: Michal Wieczorek <wieczorek-michal@wp.pl>
Upstream-commit: 52c0daad82b424afc661c23c1d80784d014e1a58
Component: engine
2016-08-26 22:11:58 +02:00
e263ef28d9 Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 14712f9ff0d20a3b64a60103608b8cc998909242
Component: engine
2016-08-25 13:09:04 -04:00
501f88a28e Add testutil/tempfile
Improve error messages raised by assert.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7c556849aa7362cfa81ae316275e17eeb50bb52b
Component: engine
2016-08-25 13:09:03 -04:00
3a9a2cf24a Merge pull request #25967 from valgaze/feat/lewin
Add Daniel Lewin to names collection
Upstream-commit: 4d590ba44a983ad881a2b44d8cd6ad6ebc5c6935
Component: engine
2016-08-24 20:28:55 +02:00
598c701bb9 Merge pull request #25959 from estesp/fail-on-graphdir-perms
Don't start daemon in userns mode if graphdir inaccessible
Upstream-commit: 4a1b048c1539ca67c8be5fd3d12fe10f65ee600e
Component: engine
2016-08-24 20:15:58 +02:00
3db3e5b8dc Merge pull request #25426 from dnephin/better-int-testing-cmd
Remove duplicate RunCommand functions used for integration-cli
Upstream-commit: b29558ed5d68712a40d840e289ada232f912659f
Component: engine
2016-08-24 11:34:24 -04:00
b5333a8cfd Don't start daemon in userns mode if graphdir inaccessible
Warn the user and fail daemon start if the graphdir path has any
elements which will deny access to the remapped root uid/gid.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 43a1df6be2fa0c76b521680bbd5dc84db2cfd898
Component: engine
2016-08-24 11:25:30 -04:00
bc4f1a4d25 Add system.Stat support for darwin/macOS
darwin had unbuildable support for our system.Stat() implementation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 76a416ac37e5bd184990c93ed19aa6fa544b7b03
Component: engine
2016-08-24 11:25:26 -04:00
c95e648ece Add Joan Clarke to name collection
Signed-off-by: Victor Algaze <valgaze@gmail.com>
Upstream-commit: 479b793a3efa1b07a9620ddd60c065c6b06e07c3
Component: engine
2016-08-24 01:58:48 -07:00
cddca309b9 Add Daniel Lewin to names collection
Signed-off-by: Victor Algaze <valgaze@gmail.com>
Upstream-commit: bc0e2f1a6ebf6f9235ee8aa921570533db1ec57a
Component: engine
2016-08-23 23:24:29 -07:00
1a72f2bb5c Fix AuthZ plugins headers change issue
This fix tries to address the issue raised in 25927 where
the HTTP headers have been chaged when AUthZ plugin is in
place.

This issue is that in `FlushAll` (`pkg/authorization/response.go`),
the headers have been written (with `WriteHeader`) before all the
headers have bee copied.

This fix fixes the issue by placing `WriteHeader` after.

A test has been added to cover the changes.`

This fix fixes 25927

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9cb8fb6ea03fcd78010ce7dd33585d96cd73e38c
Component: engine
2016-08-23 21:08:23 -07:00
6f1ee045aa Merge pull request #25903 from anusha-ragunathan/windows_plugin_spec
Add spec file support for Windows plugin discovery.
Upstream-commit: 8c5c2842ba8a6d4ec74b20fc703730eca60aeffb
Component: engine
2016-08-23 19:45:54 -04:00
0d4234bb46 Change to use c.Assert() instead of result.Assert()
Fix delete containers and make sure it prints errors correctly.
Rename Result.Fails to Result.Assert()
Create a constant for the default expected.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 243885808f5c69143679d094d964d333c47e69bf
Component: engine
2016-08-23 15:12:36 -04:00
eaa727c6e2 Create a unified RunCommand function with Assert()
Remove some run functions and replace them with the unified run command.
Remove DockerCmdWithStdoutStderr
Remove many duplicate runCommand functions.
Also add dockerCmdWithResult()
Allow Result.Assert() to ignore the error message if an exit status is expected.
Fix race in DockerSuite.TestDockerInspectMultipleNetwork
Fix flaky test DockerSuite.TestRunInteractiveWithRestartPolicy

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d7022f2b46589cb9d860219e1d8278351ba147c3
Component: engine
2016-08-23 15:11:46 -04:00
2b0a71c4f1 Remove unnecessary json.Unmarshal wrapper.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb42e8477208badf0714a9d8ae20946a9b531dba
Component: engine
2016-08-23 15:11:46 -04:00
57eb7bf948 devmapper: prevent libdevmapper from deleting device symlinks in RemoveDeviceDeferred
if there is no cookie set in dm task, or flag DM_UDEV_DISABLE_LIBRARY_FALLBACK
is cleared for a DM_DEV_REMOVE task, libdevmapper will fallback to clean up the
symlink under /dev/mapper by itself, no matter the device removal is executed
immediately or deferred by the kernel.In some cases, the removal is deferred by the
kernel, while the symlink is deleted directly by libdevmapper, when docker tries to
activate the device again, the deferred removal will be canceld, but the symlink will
not show up again, so docker's attempt to mount the device by the symlink will fail,
and it will eventually leads to a `docker start/diff` error.

Fixes #24671

Signed-off-by: Ji.Zhilong <zhilongji@gmail.com>
Upstream-commit: 5e505d101f0201a4d045510d0a9b0c66697dedfe
Component: engine
2016-08-23 23:58:53 +08:00
cb628977aa Add spec file support for Windows plugin discovery.
Plugin discovery on Windows is not possible using named pipes. However,
it is possible using spec file (tcp based). This adds Windows specific
paths for discovery.

Fixes #23605

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 36cf93fb0c45ce62b3cb1e82e1ecae1486017c9b
Component: engine
2016-08-22 09:14:57 -07:00
4467c80b95 Use real chroot if daemon is running in a user namespace
The namespace unshare+pivot root is not possible when running inside a
user namespace, so fallback to the original "real" chroot code.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: dc950567c105153c0a2f8b40d16b989bbddcdb3c
Component: engine
2016-08-12 16:31:01 -04:00
cc5b6aa3dd Don't create devices if in a user namespace
If we are running in a user namespace, don't try to mknod as
it won't be allowed.  libcontainer will bind-mount the host's
devices over files in the container anyway, so it's not needed.

The chrootarchive package does a chroot (without mounting /proc) before
its work, so we cannot check /proc/self/uid_map when we need to.  So
compute it in advance and pass it along with the tar options.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Upstream-commit: 617c352e9225b1d598e893aa5f89a8863808e4f2
Component: engine
2016-08-12 16:26:58 -04:00
cde4831d1f Merge pull request #24717 from icaoweiwei/patch_2016-07-16_1
Add output of integer argument
Upstream-commit: 2c50035f93ec580fb1b901a2c99a2f95f525a796
Component: engine
2016-08-12 10:54:01 -07:00
8e29f88e6f Merge pull request #25568 from thaJeztah/enhance-string-truncate
Implement stringutils.Ellipsis()
Upstream-commit: 64f83cee43c6fc0785e2beeacc6432572130714b
Component: engine
2016-08-12 17:19:50 +02:00
2e55ebe213 Merge pull request #25561 from allencloud/make-more-pkgs-support-darwin
make more pkgs support darwin
Upstream-commit: 3011a41d3f3b525574407493696ea2391ecc0ff6
Component: engine
2016-08-11 14:17:57 -07:00