Commit Graph

1762 Commits

Author SHA1 Message Date
755087c2f9 Merge pull request #15420 from vlajos/typofixes-vlajos-20150807
typofix - https://github.com/vlajos/misspell_fixer
Upstream-commit: bf892dcfcc002ee374057033a940ce2250181066
Component: engine
2015-08-08 01:08:49 -07:00
3cfa964774 Merge pull request #14965 from stefanberger/nohidevols2
Have network files mounted read-only when -v parameter has 'ro' passed
Upstream-commit: 196aa6d62d7084033a37f7085c2b2f55cd744d34
Component: engine
2015-08-07 19:10:59 -07:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
502a6d4faf fix golint warnings/errors on package api/types/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3d6617ffe7d9242107ac09eab4f2d8ce87acb95c
Component: engine
2015-08-07 09:43:43 +08:00
70e2333c7e Have network files mounted read-only when -v parameter has 'ro' passed
Have network files mounted read-only when mounted using the -v
open and -v parameter has 'ro' passed.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 38295d4b48fed3d9569100543a25e46b21deba46
Component: engine
2015-08-06 20:37:28 -04:00
a1b4849c0d Merge pull request #15213 from Microsoft/10662-cliwindowsdaemon
Windows: Test infrastructure plumbing
Upstream-commit: 57c8f4244b6e6093ceeb58ac6ca53b2b95b26e2d
Component: engine
2015-08-06 11:25:22 -04:00
84f01a56ed Merge pull request #15353 from jlhawn/fixing-concurrency-trust
[graph] Use a pipe for downloads to write progress
Upstream-commit: af9dc3050bd17a4b2fa3e05835b39c865f6bdc31
Component: engine
2015-08-05 18:52:27 -07:00
a2702aceb2 Merge pull request #15352 from icecrime/fix_pause_tests
Use busybox in 'pause' tests
Upstream-commit: 6805241fe2a41dac88b45879eac9c013341f6f04
Component: engine
2015-08-06 03:14:44 +02:00
fc48931914 [graph] Use a pipe for downloads to write progress
The process of pulling an image spawns a new goroutine for each layer in the
image manifest. If any of these downloads fail we would stop everything and
return the error, even though other goroutines would still be running and
writing output through a progress reader which is attached to an http response
writer. Since the request handler had already returned from the first error,
the http server panics when one of these download goroutines makes a write to
the response writer buffer.

This patch prevents this crash in the daemon http server by waiting for all of
the download goroutines to complete, even if one of them fails. Only then does
it return, terminating the request handler.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: d80c4244d322fe0a9cbdd996d23e37fb5b089544
Component: engine
2015-08-05 18:13:39 -07:00
b8e884831a Use busybox in 'pause' tests
Don't assume that any random image will have 'top' and explicitely use
the busybox image for testing.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 3529e3dac78a18df46d4010a58c9f9d741b42fab
Component: engine
2015-08-05 17:35:20 -07:00
2bbb5f5c44 Windows: Test infrastructure plumbing
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: da44d0fccba3ace90face348a415632dee75d14e
Component: engine
2015-08-05 14:34:32 -07:00
9416fd6ce9 Windows: Workaround for CI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ac120567e8015a6a98f0aa7ac71f3ce2d5f36031
Component: engine
2015-08-05 11:20:30 -07:00
b6bee43e0c Another try to fix InspectExecID
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: fe6a7c8e57c1cf7cf7cbc501fa2006c8eaf412f1
Component: engine
2015-08-04 09:21:41 -07:00
ef1e59f5e4 Merge pull request #15222 from jlhawn/error_on_v2pull_hash_mismatch
[Re]Enforce manifest/layer digest verification
Upstream-commit: e84a938f2ee700886fa05f9f4970ac0e9b8f6231
Component: engine
2015-08-03 13:02:52 -07:00
d08d95f41d [graph] Enforce manifest/layer digest verification
We noticed a regression since the 1.7.1 patch after some refactoring. This
patch corrects the behavior and adds integration tests for modified manifest
and rootfs layer blobs.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: de52a3bcaa1742054be184cc3465f0933f6d383a
Component: engine
2015-08-03 11:41:23 -07:00
4cc2a3f443 Merge pull request #15215 from dmcgowan/notary-update
Notary updates
Upstream-commit: 67bca8ab8adf1e99c2be7f9b170a140b4c27ab3d
Component: engine
2015-08-03 09:06:09 -07:00
dc8515ec8a Merge pull request #15225 from runcom/add-restart-always-test-on-daemon-restart
test: daemon restart with containers running with restart always policy manually stopped
Upstream-commit: 69f3def58de3a4d8172f1c64996a2d2d117e4bd3
Component: engine
2015-08-03 08:40:44 -07:00
ba8c4244c7 test: daemon restart with containers running with restart always policy
manually stopped

If a container is running with a restart policy of always and it's
manually stopped, then on daemon restart it will be running.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: af59c80b4afb2448927f56df2029eec0ae81b00c
Component: engine
2015-08-02 11:14:01 +02:00
9e93b28f16 skipping test TestRunCapAddSYSTIME on lxc
Signed-off-by: Mohammed Aaqib Ansari <maaquib@gmail.com>
Upstream-commit: 84c9a6684ff159081850a60dd9cfa1f4d50ee6b8
Component: engine
2015-07-31 22:07:40 -04:00
dd73699a9b Updated to use latest version of notary
Update UX to use aliases for root, snapshot, and target key

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 6ce76cd9ed0e014e109ec632fa21b7e853f56951
Component: engine
2015-07-31 17:32:35 -07:00
da82af9892 Merge pull request #15185 from aboch/vnd_lbn_1.8
Vendoring libnetwork 31139cdb513aea5ad1ed08b60d4350a68b4c96db
Upstream-commit: 9e9f3aa36b5286556c8f99557d8bcc66946598d3
Component: engine
2015-07-31 08:58:41 -07:00
f8cb968c76 Merge pull request #14463 from sunyuan3/TestRunCapAddSYSTIME
Add TestRunCapAddSYSTIME test case.
Upstream-commit: 5276655b694bec1125c4c119adb941a2b7531433
Component: engine
2015-07-31 09:40:12 -04:00
2f7ecc6177 Merge pull request #15193 from jfrazelle/fix-lxc
fix lxc test machine
Upstream-commit: 1032202b88145478c2206873056497a03a758bb9
Component: engine
2015-07-31 09:13:52 -04:00
8b2de70434 Merge pull request #15191 from duglin/TlsTest
Add a test to make sure that --tlsverify=false turns on tls in daemon
Upstream-commit: 468bc7d819f37badde32fd6e45dae41149695a92
Component: engine
2015-07-31 08:54:35 -04:00
e9bd79ecdf Add TestRunCapAddSYSTIME test case.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: a5e2fa2b2e30cf515d22dee532ae33d5ab695008
Component: engine
2015-07-31 12:53:46 +08:00
4d212c22a0 fix lxc test machine
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: f12e18d7ef9b1a354c10038874f0e7be0a8bb66f
Component: engine
2015-07-30 21:30:47 -07:00
1d4ee6ca42 Add a test to make sure that --tlsverify=false turn on tls in daemon
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5ced3ab3236bfe8ade1b5b6663599518086af7da
Component: engine
2015-07-30 21:21:24 -07:00
385c38be8c Merge pull request #15146 from kolyshkin/mkdirall
Simplify and fix MkdirAll usage
Upstream-commit: 8d2739df980a1af76ad50e5c423134815186b61c
Component: engine
2015-07-30 22:40:57 -04:00
40d1455b2e Add test code to cover issue #14859
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 4964ab08218f3b40f5c3a6bf19fe74f7fb39562a
Component: engine
2015-07-30 17:37:11 -07:00
0a7e55f30a Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 75f6929b449a59335572436862d644afacf55cdb
Component: engine
2015-07-30 12:14:28 -07:00
76f950f781 Merge pull request #15163 from crosbymichael/proc-ro
Don't mount /proc as ro
Upstream-commit: a687448c4dec200336ed28c5ef26c8198cc0505b
Component: engine
2015-07-30 15:12:29 -04:00
3c8e934faf Simplify and fix os.MkdirAll() usage
TL;DR: check for IsExist(err) after a failed MkdirAll() is both
redundant and wrong -- so two reasons to remove it.

Quoting MkdirAll documentation:

> MkdirAll creates a directory named path, along with any necessary
> parents, and returns nil, or else returns an error. If path
> is already a directory, MkdirAll does nothing and returns nil.

This means two things:

1. If a directory to be created already exists, no error is returned.

2. If the error returned is IsExist (EEXIST), it means there exists
a non-directory with the same name as MkdirAll need to use for
directory. Example: we want to MkdirAll("a/b"), but file "a"
(or "a/b") already exists, so MkdirAll fails.

The above is a theory, based on quoted documentation and my UNIX
knowledge.

3. In practice, though, current MkdirAll implementation [1] returns
ENOTDIR in most of cases described in #2, with the exception when
there is a race between MkdirAll and someone else creating the
last component of MkdirAll argument as a file. In this very case
MkdirAll() will indeed return EEXIST.

Because of #1, IsExist check after MkdirAll is not needed.

Because of #2 and #3, ignoring IsExist error is just plain wrong,
as directory we require is not created. It's cleaner to report
the error now.

Note this error is all over the tree, I guess due to copy-paste,
or trying to follow the same usage pattern as for Mkdir(),
or some not quite correct examples on the Internet.

[v2: a separate aufs commit is merged into this one]

[1] https://github.com/golang/go/blob/f9ed2f75/src/os/path.go

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Upstream-commit: a83a76934787a20e96389d33bd56a09369f9b808
Component: engine
2015-07-30 11:48:08 -07:00
114011a355 Only explicitly deny ptrace for container-originated procs
The 'deny ptrace' statement was supposed to only ignore
ptrace failures in the AUDIT log. However, ptrace was implicitly
allowed from unconfined processes (such as the docker daemon and
its integration tests) due to the abstractions/base include.

This rule narrows the definition such that it will only ignore
the failures originating inside of the container and will not
cause denials when the daemon or its tests ptrace inside processes.

Introduces positive and negative tests for ptrace /w apparmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: f5c388b35a9ddd699b3dbbe85b80fa02234f8355
Component: engine
2015-07-30 14:40:28 -04:00
8461105dc9 Don't mount /proc as ro
This caused a regression with LSM labeling.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: bfc51cf6605ebcf7a4ec791fb0f3b5ae7b05c6fd
Component: engine
2015-07-30 10:57:50 -07:00
513c7293de Merge pull request #15132 from LK4D4/improve_test
Fix message and add additional check to test
Upstream-commit: b71cf6938040fc4ae190f3e7eb24d51f756c9e11
Component: engine
2015-07-29 17:36:11 -07:00
683390e0bc Merge pull request #14980 from jlhawn/build_tag_resolved_digests
[api/client] Tag resolved digest from Dockerfile
Upstream-commit: d94aeb28765635970e7cac605b85785212855438
Component: engine
2015-07-29 16:52:14 -07:00
1bd0671e56 Merge pull request #15098 from calavera/backwards_compat_kill_error
Keep backwards compatibility in kill api.
Upstream-commit: 4a71323ec3c00be48e3539a1da0444972f22c355
Component: engine
2015-07-29 16:42:36 -07:00
36993f8dbd Fix the proc integration test & include missing AA profile
Integration tests were failing due to proc filter behavior
changes with new apparmor policies.

Also include the missing docker-unconfined policy resolving
potential startup errors. This policy is complain-only so
it should behave identically to the standard unconfined policy,
but will not apply system path-based policies within containers.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 5832715052e9e165cc40a5ac8178fa62685985aa
Component: engine
2015-07-29 17:08:51 -04:00
4e9957ee2d Merge pull request #15133 from dmcgowan/notary-fix-test-date
Skip notary tests which update system clock
Upstream-commit: 0f85fadb4ec1aa3d0270351fc72fa9a70cffd3b9
Component: engine
2015-07-29 12:51:05 -07:00
4c1bdea55d Skip notary tests which update system clock
Currently some notary tests change the system clock to check for expiration.
Skip these tests until the code can be refactored to not rely on updating the system clock.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bf3c1e6a3afc951e41643b8d55d4ac25fa9cb06d
Component: engine
2015-07-29 12:09:40 -07:00
6f4ce090eb Fix message and add additional check to TestBuildContainerWithCgroupParent
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 0d09439acea2ee1886d301c03e5e33abf8735896
Component: engine
2015-07-29 11:46:33 -07:00
7b7157591c Merge pull request #15099 from ewindisch/apparmor-restore-en
Restore AppArmor generation + fixes
Upstream-commit: d7661cb48b93978b4b30d2c60f3201d685af7f95
Component: engine
2015-07-29 09:36:59 -07:00
67bf5ba305 Replace GenerateRandomID with GenerateNonCryptoID
This allow us to avoid entropy usage in non-crypto critical places.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6bca8ec3c9ccc169c53b3d7060fe5c8ba8670aac
Component: engine
2015-07-28 22:31:01 -07:00
e057b33e06 [api/client] Tag resolved digest from Dockerfile
Builds where the base images have been resolved to trusted digest
references will now be tagged with the original tag reference from
the Dockerfile on a successful build.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: bb2e6c72d2fb3f1b64755bdf6d6269dbc6767f87
Component: engine
2015-07-28 17:54:48 -07:00
e9b83a5a26 Restore AppArmor profile generation
Will attempt to load profiles automatically. If loading fails
but the profiles are already loaded, execution will continue.

A hard failure will only occur if Docker cannot load
the profiles *and* they have not already been loaded via
some other means.

Also introduces documentation for AppArmor.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 3edc88f76df6a3bc9d887de8157ec71730c9057a
Component: engine
2015-07-28 17:45:51 -04:00
26753acfcd Keep backwards compatibility in kill api.
Return an error when the container is stopped only in api versions
equal or greater than 1.20 (docker 1.8).

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 621e3d8587bbee86b4e36d0b7822662bfbedd76c
Component: engine
2015-07-28 12:25:36 -07:00
6f7ccf2956 Skip DockerSuite.TestExecResizeImmediatelyAfterExecStart on lxc
Signed-off-by: Chris Seto <chriskseto@gmail.com>
Upstream-commit: 83cb28857551d0077b3877d1de1c3c44a39da705
Component: engine
2015-07-27 19:20:15 -04:00
e075bafeec Merge pull request #15039 from jlhawn/fix_build_context_is_symlink
[api/client] Fix build when context dir is symlink
Upstream-commit: bdc55be9b49bd4cdcc9373e2eb847b133532cedc
Component: engine
2015-07-27 15:11:36 -07:00
c3325b7678 Merge pull request #15045 from cpuguy83/fix_dockercmdwitherror
Don't pass check.C to dockerCmdWithError
Upstream-commit: 8c9cd0418d1baa5ceddec58e3a4873607e9cafcd
Component: engine
2015-07-27 16:04:16 -04:00
a5d4f063b0 [api/client] Fix build when context dir is symlink
Symbolic links in the context directory path are now evaluated.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 01d570ad30a794f2736b679700af91625e61bc85
Component: engine
2015-07-27 12:01:13 -07:00