Commit Graph

2401 Commits

Author SHA1 Message Date
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
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
4fad4bb5eb Merge pull request #33451 from naveed-jamil-tenpearls/pkg/signal/signal
Add test coverage to pkg/signal
Upstream-commit: 1a2d2f75f42696d295392b939346ed4a36ac0bfc
Component: engine
2017-06-08 16:51:23 -07:00
8a1bab985d Merge pull request #33520 from naveed-jamil-tenpearls/pkg/term
Add test coverage to pkg/term
Upstream-commit: e57f8a78ae3291670c903784864d04139c821ea1
Component: engine
2017-06-08 13:41:49 -07:00
fef5c78683 Add test coverage to pkg/term/proxy.go
Signed-off-by: Naveed Jamil <naveed.jamil@tenpearls.com>
Upstream-commit: a267248b5af9e58f878b0e2ba604c7256d637be2
Component: engine
2017-06-08 12:48:33 +05:00
042ba9639d Merge pull request #33577 from crosbymichael/revert-ONCLR
Revert ONCLR and OPOST changes
Upstream-commit: cd35e4beee13a7c193e2a89008cd87d38fcd0161
Component: engine
2017-06-07 21:50:38 -07:00
f3ef17e47d Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: a5e83836a49547b2add871bb52cbd8bfedb57114
Component: engine
2017-06-07 13:14:52 -07:00
583893964e Remove error return from RootPair
There is no case which would resolve in this error. The root user always exists, and if the id maps are empty, the default value of 0 is correct.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 93fbdb69acf9248283a91a1c5c6ea24711c26eda
Component: engine
2017-06-07 11:45:33 -04:00
b35fc7f268 Remove MkdirAllNewAs and update tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6150ebf7b483197f4b8755df60e750b6410e95ca
Component: engine
2017-06-07 11:44:34 -04:00
f40a1d3270 Remove ToHost and replace it with IDMappings.ToHost
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: df248d31d9d61342575fc1b5d3d848f0b282bbc5
Component: engine
2017-06-07 11:44:34 -04:00
03637cd7aa Fix vfs unit test and port VFS to the new IDMappings
The test was failing because TarOptions was using a non-pointer for
ChownOpts, which meant the check for nil was never true, and
createTarFile was never using the hdr.UID/GID

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: acdbc285e29ddd92e7a1cc99daf8b16502204d2e
Component: engine
2017-06-07 11:44:34 -04:00
c41fc33a7a Convert tarAppender to the newIDMappings.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5672eeb5e06fe96451f36f35be7cfa18a4cf5063
Component: engine
2017-06-07 11:44:34 -04:00
5d87b0ddc9 Remove unused functions from archive.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 967ef7e6d2bd88a5d7010863f3d7138ca61b1939
Component: engine
2017-06-07 11:44:33 -04:00
779caabedf Partial refactor of UID/GID usage to use a unified struct.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09cd96c5ad2de369912cdf708c3c50f41e4586ac
Component: engine
2017-06-07 11:44:33 -04:00
451b8c0ac8 Merge pull request #33502 from crosbymichael/bsd-opost
Set OPOST on bsd
Upstream-commit: df423d57936bf6e94bb1e54892f5419e1d927708
Component: engine
2017-06-03 02:30:58 +02:00
b8e386fca4 Move pkg/gitutils to remotecontext/git
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b9d85ac58db8b8d4480fca93f8b952d084ea36f5
Component: engine
2017-06-02 16:54:50 -04:00
b9c4f53912 Remove the last of pkg/httputil
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4060d6ee0b130cf74294c309dfbd3c860fd2a7f8
Component: engine
2017-06-02 16:54:36 -04:00
16c0836e84 Move an error helper to registry/session.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a6ac5495e11d34b1887476ca89f841df1056249a
Component: engine
2017-06-02 16:10:40 -04:00
7636bfd2c7 Move httputils/reasumablerequestreader to the single consumer.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 65515af075ce5f8037750c253b2834008840afc1
Component: engine
2017-06-02 16:10:39 -04:00
04eec7106a Move httputils/mimtype to the single consumser, and remove unused function.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c91521be68182b450a22f018ccc9d780571a5936
Component: engine
2017-06-02 16:10:39 -04:00
899cb8ee5f Set OPOST on bsd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 17ec46a24316f59c808c112e3ca46d7c442a785a
Component: engine
2017-06-02 12:53:49 -07:00
013b9a64df Merge pull request #33485 from tpot/33484-fix-file-perm-octal
Use octal values for file mode in filenotify poller and sysinfo_linux tests
Upstream-commit: 91e0141784ab5570fd7f94ad4af399d23c827391
Component: engine
2017-06-02 11:15:42 -04:00
97873b880b Merge pull request #33479 from vieux/move_multireader
move multireader out of /pkg
Upstream-commit: 096eeb3e75e9c76ec30f35356b2a4e46b0b51ed2
Component: engine
2017-06-02 12:04:57 +02:00
f9502cbcaf Use octal values for file mode in filenotify poller and sysinfo_linux tests
Closes #33484.

Signed-off-by: Tim Potter <tpot@hpe.com>
Upstream-commit: c35ea6b2cda8ac68f2b4a9f6471ca7e09865a6ee
Component: engine
2017-06-02 12:27:10 +10:00
b6073e5ee6 Fix incorrect assert message in TestReadProcBool
Closes #33480.

Signed-off-by: Tim Potter <tpot@hpe.com>
Upstream-commit: cd457e7885ecb0b00e91162113ce597f131c8386
Component: engine
2017-06-02 10:15:58 +10:00
a1a5b0a48d move multireader out of /pkg
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 2445e6b99d4beecb25d556d9a099bdf47703e174
Component: engine
2017-06-01 16:22:00 -07:00
e17da42389 Add test coverage to pkg/signal
Signed-off-by: Naveed Jamil <naveed.jamil@tenpearls.com>
Upstream-commit: 4b0df45c1a261354f10abb151b9acfa6b61f517d
Component: engine
2017-06-01 14:53:15 +05:00
421a16553e Increase the Coverage of pkg/platform
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: bdc87676bfee0f9a26fe12323dbe6875af783645
Component: engine
2017-05-31 13:26:40 +05:00
f2f752196e Check for Windows 10 IoT Core to use process isolation on IoT
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 75f7f2a83a5a6fb276606a2fff4041da9bcd30a3
Component: engine
2017-05-30 12:01:38 -07:00
81bb7bdddf Do not reuse a http.Request after a failure in callWithRetry
Closes: #33412

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
Upstream-commit: 62871ef2fa52b0a2e426c30f36d35a9ba1e92fac
Component: engine
2017-05-26 18:02:31 -07:00
75a4055d7c Ensure that a device mapper task is referenced until task is complete
DeviceMapper tasks in go use SetFinalizer to clean up C construct
counterparts in the C LVM library.  While thats well and good, it relies
heavily on the exact interpretation of when the golang garbage collector
determines that an object is unreachable is subject to reclaimation.
While common sense would assert that for stack variables (which these DM
tasks always are), are unreachable when the stack frame in which they
are declared returns, thats not the case.  According to this:

https://golang.org/pkg/runtime/#SetFinalizer

The garbage collector decides that, if a function calls into a
systemcall (which task.run() always will in LVM), and there are no
subsequent references to the task variable within that stack frame, then
it can be reclaimed.  Those conditions are met in several devmapper.go
routines, and if the garbage collector runs in the middle of a
deviceMapper operation, then the task can be destroyed while the
operation is in progress, leading to crashes, failed operations and
other unpredictable behavior.

The fix is to use the KeepAlive interface:

https://golang.org/pkg/runtime/#KeepAlive

The KeepAlive method is effectively an empy reference that fools the
garbage collector into thinking that a variable is still reachable.  By
adding a call to KeepAlive in the task.run() method, we can ensure that
the garbage collector won't reclaim a task object until its execution
within the deviceMapper C library is complete.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Upstream-commit: d764d8b16624e4924b3949273089f851efa0f717
Component: engine
2017-05-24 11:11:23 -04:00
a41009bb07 Merge pull request #33269 from tophj-ibm/switch-more-syscalls-pkg-term
[pkg/term] switch more syscalls to /x/sys/
Upstream-commit: dd27bbb41a7f98a0beea3d7f39da0dbb53e29ff5
Component: engine
2017-05-19 02:37:52 +02:00
6b7f9e397d Merge pull request #33250 from cyphar/apparmor-readonly-root-fix
apparmor: make pkg/aaparser work on read-only root
Upstream-commit: 6b262572028cc249b7da8cc55459197395fdb33e
Component: engine
2017-05-18 23:17:31 +02:00
f074fcfdd0 [pkg/term] switch more syscalls to /x/sys/
Switches the remaining syscalls except Errno to /x/sys/.
This was supposed to be part of 33180

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: df6dfcf198a769e7f411736e1abb93e1aabb2698
Component: engine
2017-05-18 09:02:42 -04:00
934384aeb2 Merge pull request #33180 from tophj-ibm/switch-pkg-term-syscalls-to-x/sys
[pkg/term] refactor and switch syscall to x/sys
Upstream-commit: 6f6ee6fd04b9a1ac91f24631cdea9453e9fd35f7
Component: engine
2017-05-17 07:41:18 -07:00
e7e4e93352 apparmor: make pkg/aaparser work on read-only root
This is necessary because normally `apparmor_parser -r` will try to
create a temporary directory on the host (which is not allowed if the
host has a rootfs). However, the -K option bypasses saving things to the
cache (which avoids this issue).

  % apparmor_parser -r /tmp/docker-profile
  mkstemp: Read-only file system
  % apparmor_parser -Kr /tmp/docker-profile
  %

In addition, add extra information to the ensureDefaultAppArmorProfile
errors so that problems like this are easier to debug.

Fixes: 2f7596aaef3a ("apparmor: do not save profile to /etc/apparmor.d")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: dd340c52cb37d29d8bae687fdc60e039341b4295
Component: engine
2017-05-18 00:05:13 +10:00
fa44d02011 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 4921171587c09d0fcd8086a62a25813332f44112
Component: engine
2017-05-16 15:11:39 -07:00
9ca246ac83 Merge pull request #32959 from simonferquel/tar-filemode-windows
Respect tar entries modes when rewriting them on Windows
Upstream-commit: ad846a136a75637c64423d7f9eb0f2f5e433a360
Component: engine
2017-05-16 11:45:42 -07:00
474b9fb5b6 Rename term to winsize, tc_other to tc
Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 1c94c264c489e1d5fdae7f41120574e0322ab31d
Component: engine
2017-05-16 11:46:17 -04:00
b0891a48c7 [pkg/term] Refactor BSD-specific files
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f8416e82d9152c7f833b9ea6ccb29cb221e14c16
Component: engine
2017-05-16 10:12:33 -04:00
b94eb3ae57 [pkg/term] switch syscall to x/sys
Switches calls to syscall to x/sys, which is more up to date.
This is fixes a number of possible bugs on other architectures
where ioctl tcget and tcset aren't implemented correctly.

There are a few remaining syscall references, because x/sys doesn't
have an Errno implementation yet.

Also removes a ppc64le and cgo build tag that fixes building on
ppc64le without cgo

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: f30b072b8157599cdd996b86d022117d2d55d1ce
Component: engine
2017-05-15 18:34:41 -04:00
8a368b7357 Merge pull request #33119 from nhorman/devmapper-fixes
Devmapper fixes for cookie generation and error reporting (fixes  #33050)
Upstream-commit: 2c45392b8fe134ef9689488d7e9e00ef711f9ee4
Component: engine
2017-05-15 13:18:52 -04:00
04ea6ad3f6 Merge pull request #32502 from tonistiigi/git-allow-pr-number
Allow specifying any remote ref in git checkout URLs
Upstream-commit: ba52bb0fd158dcd99ff65d0a422add8ecde01b3e
Component: engine
2017-05-15 09:34:54 -07:00
59422fa37f Update the stream formatter to display custom unit numbers.
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: a771c16834c92cb39142078c64e253423f0fb4e3
Component: engine
2017-05-11 11:13:11 -07:00
dc91a6dbf3 Merge pull request #33139 from stevvooe/remove-unused-functions
pkg/ioutils: remove unused functions
Upstream-commit: e8c2a33b747ac1f69d3992a47844abf1d7f58910
Component: engine
2017-05-10 16:48:14 -04:00
4f4a20dea3 Merge pull request #33128 from crosbymichael/update-containerd-2x
Update containerd for terminal updates
Upstream-commit: a46f7bd5bd5d1a0d5593034fc540193ef7ed3644
Component: engine
2017-05-10 16:45:11 -04:00
9e5ba6cea7 pkg/ioutils: remove unused functions
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: c546894aefbd661adc73ba3cf952d38f94627924
Component: engine
2017-05-10 08:34:16 -07:00