Commit Graph

2450 Commits

Author SHA1 Message Date
19bca77267 Merge pull request #34077 from justincormack/mount_remount_opts
In the case of remounting with changed data, need to call mount
Upstream-commit: f7ce35f47b1b8e029d7e572ef333cabba1b08e5b
Component: engine
2017-07-14 09:58:30 -04:00
d4d72fe32c In the case of remounting with changed data, need to call mount
The case where we are trying to do a remount with changed filesystem specific options was missing,
we need to call `mount` as well here to change those options.

See #33844 for where we need this, as we change `tmpfs` options.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 3a1ab5b479ce843648cf676fbaaf2bec9e040dce
Component: engine
2017-07-13 15:48:58 +01:00
0e754d487a Merge pull request #33539 from tklauser/x-sys-unix-symlink-xattrs
Use symlink xattr functions from x/sys/unix
Upstream-commit: 96bf279c7d03bc20dd2626535ff77d7efd66dd07
Component: engine
2017-07-12 18:04:33 -07:00
a6bf694e20 Merge pull request #33845 from cyphar/devicemapper-show-me-your-logs
devicemapper: rework logging and add --storage-opt dm.libdm_log_level
Upstream-commit: 00b218216d8a2075bf7200df74aa07b749f72f34
Component: engine
2017-07-12 17:46:14 -07:00
8e0ce0ecdb Merge pull request #33877 from rhvgoyal/sync-removal
devicemapper: Wait for device removal if deferredRemoval=true and deferredDeletion=…
Upstream-commit: e04dbe5ac287c2a856b7c96972d931ee5f0e288f
Component: engine
2017-07-12 17:35:45 -07:00
6ef5605557 system: Use symlink xattr functions from x/sys/unix
Use the symlink xattr syscall wrappers Lgetxattr and Lsetxattr from
x/sys/unix (introduced in golang/sys@b90f89a) instead of providing own
wrappers. Leave the functionality of system.Lgetxattr intact with
respect to the retry with a larger buffer, but switch it to use
unix.Lgetxattr. Also leave system.Lsetxattr intact (even though it's
just a wrapper around the corresponding function from unix) in order to
keep moby building for !linux.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: 4d966409bc7033e3bebe7deb921d8be8249f8d18
Component: engine
2017-07-12 14:52:42 +02:00
ea0a9a0e13 [pkg/term] temporarily use STD_*_HANDLE from syscall again
Due to the CL https://go-review.googlesource.com/c/39608/ in
x/sys/windows which changed the definitions of STD_INPUT_HANDLE,
STD_OUTPUT_HANDLE and STD_ERROR_HANDLE, we get the following failure
after re-vendoring x/sys/windows:

  07:47:01 # github.com/docker/docker/pkg/term
  07:47:01 pkg/term/term_windows.go:82: constant 4294967286 overflows int
  07:47:01 pkg/term/term_windows.go:88: constant 4294967285 overflows int
  07:47:01 pkg/term/term_windows.go:94: constant 4294967284 overflows int
  07:47:12 Build step 'Execute shell' marked build as failure

Temporarily switch back pkg/term to use these constants from the syscall
package and add a comment about it.

To really fix this, go-ansiterm should probably be switched to use
x/sys/windows.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Upstream-commit: ef5252fc5dcd83d1b8dfe173a68691c8a63e7e4a
Component: engine
2017-07-12 14:52:42 +02:00
e95f4619cd [project] change syscall to /x/sys/unix|windows
Changes most references of syscall to golang.org/x/sys/
Ones aren't changes include, Errno, Signal and SysProcAttr
as they haven't been implemented in /x/sys/.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>

[s390x] switch utsname from unsigned to signed

per 33267e036f
char in s390x in the /x/sys/unix package is now signed, so
change the buildtags

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 069fdc8a083cb1663e4f86fe3fd9b9a1aebc3e54
Component: engine
2017-07-11 08:00:32 -04:00
4a3ac40163 Merge pull request #33956 from keloyang/fix-cp-with-hardlink
Fix docker cp dir with hard link
Upstream-commit: 9789530b46f36e2961113949f117f93c1fd4e60c
Component: engine
2017-07-10 14:11:26 -07:00
b8ebf7be04 Split homedir files by operating system
libcontainer/user does not build at all on Windows any more, and
this was breaking the client on Windows with upstream `runc`. As
these functions are not used anyway, just split out and stop
checking `runtime`.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: b7bd959294b5dc5b6e18b3fed5dde18f4f7f1d20
Component: engine
2017-07-10 14:10:43 +01:00
0887a18a3a Merge pull request #33575 from cpuguy83/plugins_on_swarm
Plugins on swarm
Upstream-commit: 05c7c311390911daebcf5d9519dee813fc02a887
Component: engine
2017-07-07 02:23:07 -07:00
9b7ee7b6ee Merge pull request #33935 from AkihiroSuda/pkg-archive-go1.9
pkg/archive.FileInfoHeader: fill file type bits
Upstream-commit: 0fcd082d886323b4506b28394ee28eaa5a5dfe7f
Component: engine
2017-07-06 14:22:45 -07:00
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04:00
7668114cba Fix docker cp dir with hard link
docker run --name=test ubuntu /bin/sh -c "cd /tmp && echo hi > a && ln a b" && docker cp test:/tmp tmp_
test
link /root/tmp/a /root/tmp_/b: no such file or directory

Signed-off-by: yangshukui <yangshukui@huawei.com>
Upstream-commit: d58ffa0364c04d03a8f25704d7f0489ee6cd9634
Component: engine
2017-07-06 17:03:38 +08:00
64645433a6 pkg/archive.FileInfoHeader: fill file type bits
Go 1.9 (golang/go@66b5a2f) removed file type bits from
archive/tar.FileInfoHeader().

This commit ensures file type bits are filled even on Go 1.9 for
compatibility.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 1a451d9a7bb9cd7d437b42d4e73b0560fbf84348
Component: engine
2017-07-05 05:24:32 +00:00
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -07:00
c2eb21415c gofmt: 5 files
gofmt from go1.8.3

hg locate '*.go' |xargs ~/go/bin/gofmt -s -w

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6284cf5e9a4bc121b73422c454cdbf8dc18f42f3
Component: engine
2017-07-03 10:32:47 -07:00
00264ebf6b devicemapper: change LogInit and move all callbacks to pkg
LogInit used to act as a manual way of registering the *necessary*
pkg/devicemapper logging callbacks. In addition, it was used to split up
the logic of pkg/devicemapper into daemon/graphdriver/devmapper (such
that some things were logged from libdm).

The manual aspect of this API was completely non-sensical and was just
begging for incorrect usage of pkg/devicemapper, so remove that semantic
and always register our own libdm callbacks.

In addition, recombine the split out logging callbacks into
pkg/devicemapper so that the default logger is local to the library and
also shown to be the recommended logger. This makes the code
substantially easier to read. Also the new DefaultLogger now has
configurable upper-bound for the log level, which allows for dynamically
changing the logging level.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: cfd39e8d6d79eee8a71fbe6820dd67babf05d951
Component: engine
2017-07-04 02:04:26 +10:00
01199b4ca4 devicemapper: actually remove DmLogInitVerbose
e07d3cd9a ("devmapper: Fix libdm logging") removed all of the callers of
DmLogInitVerbose, but we still kept around the wrapper. However, the
libdm dm_log_init_verbose API changes the verbosity of the *default*
libdm logger. Because pkg/devicemapper internally *relies* on using
logging callbacks to understand what errors were encountered by libdm,
this wrapper is useless (it only makes sense for the default logger
which we do not user).

Any user not inside Docker of this function almost certainly was not
using this API correctly, because pkg/devicemapper will misbehave if our
logging callbacks were not registered.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: c654147f0635736fff0035ecdfa53a41c7fad0d0
Component: engine
2017-07-04 02:04:26 +10:00
9421df98fb devicemapper: remove 256 character limit of libdm logs
This limit is unecessary and can lead to the truncation of long libdm
logs (which is quite annoying).

Fixes: b440ec013 ("device-mapper: Move all devicemapper spew to log through utils.Debugf().")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 63328c6882c3d1f54c66499ef9963adfbf1883f0
Component: engine
2017-07-04 02:04:26 +10:00
56378645d0 Wait for device removal if deferredRemoval=true and deferredDeletion=false
There have been some cases where umount, a device can be busy for a very
short duration. Maybe its udev rules, or maybe it is runc related races
or probably it is something else. We don't know yet.

If deferred removal is enabled but deferred deletion is not, then for the
case of "docker run -ti --rm fedora bash", a container will exit, device
will be deferred removed and then immediately a call will come to delete
the device. It is possible that deletion will fail if device was busy
at that time.

A device can't be deleted if it can't be removed/deactivated first. There
is only one exception and that is when deferred deletion is on. In that
case graph driver will keep track of deleted device and try to delete it
later and return success to caller.

Always make sure that device deactivation is synchronous when device is
being deleted (except the case when deferred deletion is enabled).

This should also take care of small races when device is busy for a short
duration and it is being deleted.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 36cb6efebc599900b691e206fb9e99d3aa2fb9a3
Component: engine
2017-06-30 14:27:26 -04:00
50b9ac741e Merge pull request #33690 from raja-sami-10p/pkg/authorization
Increase test Coverage of pkg/authorization
Upstream-commit: 48e625ccca176787d56a6e87a0e2cc779ce5b6d3
Component: engine
2017-06-27 10:09:13 -07:00
a8f8b4ccd8 Move IsGitTransport() to gitutils
This function was only used inside gitutils,
and is written specifically for the requirements
there.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d3d1aabcc68f65d40acbf1b3adc02d13997bb8e2
Component: engine
2017-06-26 10:07:04 -07:00
7efc650625 Merge pull request #33674 from raja-sami-10p/pkg/templates
Increase test Coverage of pkg/templates
Upstream-commit: 4964b092384a0e1c42b2db728aeeaf129a50f54f
Component: engine
2017-06-24 01:04:24 -07:00
9a5b3d1ecf Increase test Coverage of pkg/templates
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: 27e771b714b599c449c8fb8f01547454912aeb28
Component: engine
2017-06-23 12:38:33 +05:00
a79192f925 Increase test Coverage of pkg/authorization
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: f1eb0c0ebb85af2ae5373f16fd529588c07815cc
Component: engine
2017-06-23 12:35:46 +05:00
f3a5ac7e36 Merge pull request #33653 from raja-sami-10p/pkg/streamformatter
Increase the Coverage of pkg/streamformatter
Upstream-commit: db57b85fcbe01ab195b48da3d715fdb4e1d4f9e8
Component: engine
2017-06-22 19:52:02 -07:00
e529bcd027 Implement incremental file sync using client session
Also exposes shared cache and garbage collection/prune
for the source data.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5c3d2d552b0430672d5f481ab2d37036f6e92166
Component: engine
2017-06-22 11:52:35 -07:00
8aabb3651f Increase the Coverage of pkg/streamformatter
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: 956c5b61cea9e476847b9d2231ac66d3ec85f018
Component: engine
2017-06-22 12:29:10 +05:00
ad62bca460 Merge pull request #33241 from Microsoft/jjh/multi-layerstore
LCOW: Support most operations excluding remote filesystem
Upstream-commit: 930e6896685f614d8f15ed10207596b1a151cbc8
Component: engine
2017-06-21 15:45:23 -07:00
01b491fce5 LCOW: Create layer folders with correct ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ed10ac6ee93cf5c389a735c0c97b08d5d5dff3a9
Component: engine
2017-06-20 19:50:12 -07:00
94ce604e3d LCOW: OCI Spec and Environment for container start
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f1545882264e743fa6d6859ee8687407e28fc35c
Component: engine
2017-06-20 19:50:11 -07:00
97b623b9f6 LCOW: Graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>

Adds the graphdriver for Linux containers on Windows
Upstream-commit: ed4d2aa981a9057766a9cec53c3bd19be4eef059
Component: engine
2017-06-20 19:49:24 -07:00
6220fae10d Merge pull request #33097 from stevvooe/remove-random-pkg
pkg: remove random package
Upstream-commit: b5f68d7ed3a2a9db7bdbfd3bdee42d9d1a7e5423
Component: engine
2017-06-20 13:43:38 -07:00
cad0e361c3 LCOW: Add environment variable to enable
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: fe5b34ba8828dc2f2f7db180a102cee360fec6e0
Component: engine
2017-06-20 08:55:46 -07:00
8c7c972d20 Merge pull request #33454 from dnephin/refactor-builder-remove-copy-on-build
[Builder] Move file coping from the daemon to the builder
Upstream-commit: 99c72eb2682c0539ad3cc544eb28876af78b33a1
Component: engine
2017-06-20 10:12:57 +02:00
077c312216 Merge pull request #33725 from ripcurld0/deprecate_go16
Remove Go 1.6 code from moby
Upstream-commit: 93c06b801334713f88e92838f67cf322e6eb808b
Component: engine
2017-06-20 08:54:01 +03:00
0a8fc1d6f6 Merge pull request #33522 from naveed-jamil-tenpearls/pkg/promise
Added Test Case Coverage for PKG/PROMISE
Upstream-commit: 16380b3ee68c0da2fda036d7980129241957220c
Component: engine
2017-06-19 13:53:42 -07:00
37ac27cec4 devmapper: ensure that UdevWait is called after calls to setCookie
Recent changes to devmapper broke the implicit requirement that UdevWait be
called after every call to task.setCookie.  Failure to do so results in leaks of
semaphores in the LVM code, eventually leading to semaphore exhaustion.
Previously this was handled by calling UdevWait in a ubiquitous defer function.
While there was initially some concern with deferring the UdevWait function
would cause some amount of race possibiliy, the fact that we never return the
cookie value or any value used to find it, makes that possibility seem unlikely,
so lets go back to that method

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Upstream-commit: 23dcfec1404411489e23fb9b76fc7096db139d04
Component: engine
2017-06-19 13:50:57 -04:00
c832750e54 Remove Go 1.6 code from moby
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 6bfd0f6b5d08bcd609da11947432ad0f3aa3d8fd
Component: engine
2017-06-19 15:59:00 +03:00
3703860d4e Merge pull request #33517 from naveed-jamil-tenpearls/pkg/reexec
Added Test Case Coverage for PKG/REEXEC
Upstream-commit: acf23c736724c861236d8b5cbee339c812fe9d7f
Component: engine
2017-06-16 15:24:51 +02:00
75f90c1a7c Merge pull request #33655 from dsheets/authz-disable-race
Eliminate authz plugin disable race
Upstream-commit: 11293d91f94418a454006ee93e88aed1861fcf27
Component: engine
2017-06-14 11:07:23 +02:00
d6e9a073bf Merge pull request #33518 from naveed-jamil-tenpearls/pkg/sysinfo
Increased Unit Test Coverage for PKG/SYSINFO
Upstream-commit: 9c446a4d0061014390e938d01941aab976c38d11
Component: engine
2017-06-13 10:57:49 -07:00
142f748495 authz: remove and hide unused and local-only methods respectively
Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 24264697c54843ea8dbd30ac37652409943e7bf4
Component: engine
2017-06-13 13:51:11 +01:00
8857822260 authz: eliminate race during plugin removal from middleware
Also, this removes the use of a questionable golang range feature which
corrects for mutation of a slice during iteration over that slice. This
makes the filter operation easier to read and reason about.

Signed-off-by: David Sheets <dsheets@docker.com>
Upstream-commit: 7da3986297e04b419ce08b19766633dba36b7d30
Component: engine
2017-06-13 13:51:07 +01:00
101aa410f3 Added Test Case Coverage for PKG/PROMISE
Signed-off-by: Naveed Jamil <naveed.jamil@tenpearls.com>
Upstream-commit: cffa6d52a2819c126517333b8b31337ded5cc0d9
Component: engine
2017-06-13 15:17:40 +05:00
4356e0cf8e Merge pull request #33374 from raja-sami-10p/pkg/plugins
Increase the Coverage of pkg/plugins
Upstream-commit: 8183b9d12c786b4f7a844d0966df7acb1e78ff1d
Component: engine
2017-06-13 02:50:54 +02:00
2621eb6511 Merge pull request #33414 from darrenstahlmsft/IoTServerContainers
Check for Windows 10 IoT Core to use process isolation on IoT
Upstream-commit: 2ae085f3092325e15c76cf4b24e9d5f2bc400d59
Component: engine
2017-06-12 18:02:15 -05:00
dd21307557 Increase the Coverage of pkg/plugins
Increases the test coverage of pkg/plugins.
Changed signature of function NewClientWithTimeout in pkg/plugin/client, to
take time.Duration instead of integers.

Signed-off-by: Raja Sami <raja.sami@tenpearl.com>
Upstream-commit: 8dd100a2297a34a0aef422383117fb0c3314fba1
Component: engine
2017-06-12 12:23:10 +05:00
b183d65011 pkg/pools: add buffer32KPool & use it for copy
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: ba40f4593f79a653f1e3a8b9597b7900fb68a564
Component: engine
2017-06-10 21:12:48 +03:00