Commit Graph

2534 Commits

Author SHA1 Message Date
db1910a30c Move responsibility of ls/inspect to volume driver
Makes `docker volume ls` and `docker volume inspect` ask the volume
drivers rather than only using what is cached locally.

Previously in order to use a volume from an external driver, one would
either have to use `docker volume create` or have a container that is
already using that volume for it to be visible to the other volume
API's.

For keeping uniqueness of volume names in the daemon, names are bound to
a driver on a first come first serve basis. If two drivers have a volume
with the same name, the first one is chosen, and a warning is logged
about the second one.

Adds 2 new methods to the plugin API, `List` and `Get`.
If a plugin does not implement these endpoints, a user will not be able
to find the specified volumes as well requests go through the drivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3eca4451d264aac564594fe46b8c097bd85a5cc
Component: engine
2016-01-05 16:28:38 -05:00
156d67e60e Merge pull request #18889 from aaronlehmann/v1-fallback-pull-all-tags
Allow v1 protocol fallback when pulling all tags from a repository unknown to v2 registry
Upstream-commit: 6c30931b06ff44e1ce002002430577b7135d2049
Component: engine
2016-01-05 16:20:04 -05:00
f688b73835 Use ImageBuildOptions in builder.
dockerfile.Config is almost redundant with ImageBuildOptions.
Unify the two so that the latter can be removed. This also
helps build's API endpoint code to be less dependent on package
dockerfile.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 5190794f1d85d5406611eb69c270df62ac1cdc7f
Component: engine
2016-01-05 10:09:34 -08:00
0c89fbf389 Add ability to set cgroup parent for all containers
Fix #18022

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 2e3186ab065a7130a6e6267d86750848d5eb7d80
Component: engine
2016-01-04 15:16:25 -08:00
89d18d78c9 Merge pull request #18208 from cpuguy83/restart_links
Daemon Restart: attempt to wait for container deps
Upstream-commit: 04234bd16a463af3b5e093ef180351d7b54b6a35
Component: engine
2016-01-04 14:36:00 -08:00
58e545b6bf Merge pull request #18888 from calavera/event_types
Event all the things!
Upstream-commit: 723be0a3325799fd6b2a6b689af54f5a07edf992
Component: engine
2016-01-04 13:07:33 -08:00
c2e5fdc393 Add filter by event type and documentation.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 851fe00c64ffafeb27b12f7b0ed8e41f7720b477
Component: engine
2016-01-04 14:58:04 -05:00
65930d6983 Merge pull request #19002 from jfrazelle/update-test-images
cleanup test images
Upstream-commit: fa57eedff409edb7a4ad926b365213a944a97954
Component: engine
2016-01-04 10:24:30 -08:00
1162375d21 Merge pull request #15666 from vdemeester/3519-configurable-escape
Implement configurable escape key for attach/exec
Upstream-commit: db738dd77f699e93f976441d5fc11ab48a2d6c68
Component: engine
2016-01-04 00:49:07 +01:00
5582f5eb83 Implement configurable detach key
Implement configurable detach keys (for `attach`, exec`, `run` and
`start`) using the client-side configuration

- Adds a `--detach-keys` flag to `attach`, `exec`, `run` and `start`
  commands.
- Adds a new configuration field (in `~/.docker/config.json`) to
  configure the default escape keys for docker client.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 15aa2a663b47b6126a66efefcadb64edfbffb9f5
Component: engine
2016-01-03 23:03:39 +01:00
8a76cb28e3 Merge pull request #18932 from wenchma/same_name_of_container_image
Update integration tests when container and image have same name
Upstream-commit: 1a5b97c76143b7d26006916b23daf8fde73c35ac
Component: engine
2016-01-01 21:40:51 +01:00
796aa9ca72 Merge pull request #19007 from aboch/npe
Properly initialize IpamConf structure in initBridgeDriver
Upstream-commit: e7c62065742ab59ad546d905c6349892011da9b2
Component: engine
2016-01-01 10:50:54 -08:00
902a67f4ef add more seccomp profile tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 327421d1df557e156b29d14359a2bfdc59cfb46f
Component: engine
2015-12-30 17:30:44 -08:00
b985b8195a cleanup jess/unshare image
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 626c933730cffb6ca9112271dc4df5a1e462cac1
Component: engine
2015-12-30 16:20:05 -08:00
40fe4ff4d5 Properly initialize IpamConf structure in initBridgeDriver
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: aa97eee1a3cf5c932bdd31535b1e82ca53347ca5
Component: engine
2015-12-30 15:44:50 -08:00
e16a7b429c Merge pull request #18999 from tonistiigi/fix-comment-in-inspect
Fix missing comment in docker inspect
Upstream-commit: 102eb03c680b2989efc1548ed1e28686a6aab4bd
Component: engine
2015-12-30 15:07:04 -08:00
e32ea4c0f9 Add network events.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f15af1eff75f920c956e7c437d1ef81f5c31129a
Component: engine
2015-12-30 17:39:33 -05:00
e54bb2b509 Add volume events.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9d12d093009d3c4bf3bd4ebad3f8327c36d2d584
Component: engine
2015-12-30 17:39:33 -05:00
3580481051 Add event types.
- Stop serializing JSONMessage in favor of events.Message.
- Keep backwards compatibility with JSONMessage for container events.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 72f1881df102fce9ad31e98045b91c204dd44513
Component: engine
2015-12-30 17:39:33 -05:00
75ad76df88 Add tests for docker events -f container.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 531ecf59f5bd92b12d4548617ca7bf179c8179a3)
Upstream-commit: 687ef0056204c487aa1a2aeb283e8bda37be74a1
Component: engine
2015-12-30 17:39:32 -05:00
5af0a64a16 Move test out of the windows build.
Because it can still run on windows server and fail because it doesn't
have `chown`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9aad7d209f8919726b40034a40e619f1efa46716
Component: engine
2015-12-30 16:36:48 -05:00
9cbaaf7f9f Fix missing comment in docker inspect
Fixes #18571

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d32f43013bf4c3aaa90c9ea409fbb9ade4105200
Component: engine
2015-12-30 11:52:53 -08:00
cd2f0504b4 Merge pull request #18158 from mauri/add_owner
ADD files to a folder doesn't set correct UID and GID
Upstream-commit: 56f8b051ebc423b188c4a9eb8c151a338a4cb042
Component: engine
2015-12-30 11:19:15 -08:00
440e6d5df7 Merge pull request #18714 from jecarey/16756-docker_cli_pull_test
Use of checkers in docker_cli_pull_test.go
Upstream-commit: 51fa287368205e1f043d632e5930b7cce08a2419
Component: engine
2015-12-30 10:00:41 -08:00
eb2413b744 Merge pull request #18952 from coolljt0725/fix_stats_update
Fix docker stats show wrong memory limit when do docker update
Upstream-commit: 708f98f5f9e0a8e957c689a15ca380b8e52f6269
Component: engine
2015-12-30 08:17:42 -08:00
cfc051fa3a Fix files ownership when ADD is used
Signed-off-by: Mauricio Garavaglia <mauriciogaravaglia@gmail.com>
Upstream-commit: b638bc6f17f7cef6534b20dd44845e5b066ae2cc
Component: engine
2015-12-30 11:35:19 -03:00
6c53da9054 Merge pull request #18985 from hqhq/hq_handle_dockerCmdInDir
Handle error for dockerCmdInDir
Upstream-commit: c4486e48f2911ad6269c4746fb5a0ae4ea2c5e73
Component: engine
2015-12-30 15:25:20 +01:00
b167eafbb8 Handle error for dockerCmdInDir
Only two of these are not handled, the one in `TestBuildForceRm`
is intended to not be handled, while the other one in
`TestBuildResourceConstraintsAreUsed` causes problem.

In test case `TestBuildResourceConstraintsAreUsed`, somehow we
are not able to access network to get base image, but the error
message is:

```
Error: failed to inspect container : Unable to read inspect data: json: cannot unmarshal array into Go value of type types.ContainerJSON
```

Totally confusion.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 1b34008532849467623039f78191e0f706fb34a5
Component: engine
2015-12-30 15:21:34 +08:00
eee4baf0b5 Fix docker stats show wrong memory limit when do docker update
When a container create with -m 100m and then docker update other
cgroup settings such as --cpu-quota, the memory limit show by
docker stats will become the default value but not the 100m.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 518ed75e1ab5b102fffd7fcbf046c127b44c7be7
Component: engine
2015-12-29 20:33:16 -05:00
51b37769f0 Remove usage of pkg sockets and tlsconfig.
- Use the ones provided by docker/go-connections, they are a drop in replacement.
- Remove pkg/sockets from docker.
- Keep pkg/tlsconfig because libnetwork still needs it and there is a
  circular dependency issue.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 8e034802b7ad92a29f08785e553415adcd1348a3
Component: engine
2015-12-29 19:27:12 -05:00
4b86854122 Update integration tests when container and image have same name
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 9fbb1306e83576086e924ff4fbf35b9a74beb28a
Component: engine
2015-12-29 11:08:31 +08:00
f07bb00458 Merge pull request #18780 from jfrazelle/seccomp-default
set default seccomp profile
Upstream-commit: 78ce43bad85fdf97d7c836315e46b531901c8ae7
Component: engine
2015-12-28 16:46:30 -08:00
3b4ed44ee4 Merge pull request #18897 from runcom/fix-net-none-build
integration-cli: fix --net=none build
Upstream-commit: 38440cadf3e27b32b3ee7b9011b1a0a87cbcca69
Component: engine
2015-12-28 10:51:18 -08:00
3f03a2c89c add docs and unconfined to run a container without the default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 15674c5fb74df00d7560fb35619a5372ea2ee74e
Component: engine
2015-12-28 10:26:51 -08:00
aac8048807 add default seccomp profile tests
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: a48fe6238494547f392b06adf9d48944b4dd8ac3
Component: engine
2015-12-28 10:26:48 -08:00
b5ffb5a2c4 set default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 947293a28084cb5ee2e10e4d128c6e2b9d9da89d
Component: engine
2015-12-28 10:18:47 -08:00
524c469eb3 Daemon Restart: attempt to wait for container deps
This provides a best effort on daemon restarts to restart containers
which have linked containers that are not up yet instead of failing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 19762da67e40879be77b1b55c21a9754235fbb78
Component: engine
2015-12-28 11:00:16 -05:00
c4af30652d Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8799c4fc0feadede6ae60e77bd7d9dfd7cc72a79
Component: engine
2015-12-28 19:19:26 +08:00
602cbecb67 integration-cli: fix --net=none build
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: bb8e1dc8fa7bda27592b140b433b5ffabdb44917
Component: engine
2015-12-24 16:36:37 +01:00
04c33e2ef9 Allow v1 protocol fallback when pulling all tags from a repository unknown to v2 registry
This is a followup to #18839. That PR relaxed the fallback logic so that
if a manifest doesn't exist on v2, or the user is unauthorized to access
it, we try again with the v1 protocol. A similar special case is needed
for "pull all tags" (docker pull -a). If the v2 registry doesn't
recognize the repository, or doesn't allow the user to access it, we
should fall back to v1 and try to pull all tags from the v1 registry.
Conversely, if the v2 registry does allow us to list the tags, there
should be no fallback, even if there are errors pulling those tags.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 589a5226e7d4880ab7afa9e31202849db08a4bfa
Component: engine
2015-12-23 15:21:43 -08:00
1d3ad033b8 Merge pull request #18810 from runcom/pkg-authz-fixes
pkg: authorization: do not register the same plugin
Upstream-commit: 914fad8b7d3426d9c637bfa07ccb47c141048163
Component: engine
2015-12-23 15:09:06 -08:00
547bf07eca pkg: authorization: do not register the same plugin
This patches avoids registering (and calling) the same plugin more than
once. Using an helper map which indexes by name guarantees this and keeps
the order.
The behavior of overriding the same name in a flag is consistent with,
for instance, the `docker run -v /test -v /test` flag which register
the volume just once.
Adds integration tests.

Without this patch:
```
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.080901676+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081213202+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081268132+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081699788+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.081762507+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.082092480+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.628691038+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
Dec 20 19:34:52 localhost.localdomain docker[9988]:
time="2015-12-20T19:34:52.629880930+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

With this patch:
```
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376523958+01:00" level=debug msg="Calling
GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376715483+01:00" level=debug msg="AuthZ
request using plugin docker-novolume-plugin"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.376771230+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.377698897+01:00" level=debug msg="GET
/v1.22/info"
Dec 20 19:37:32 localhost.localdomain docker[16620]:
time="2015-12-20T19:37:32.951016441+01:00" level=debug msg="AuthZ
response using plugin docker-novolume-plugin"
```

Also removes a somehow duplicate debug statement (leaving only the
second one as it's a loop of plugin's manifest):
```
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544090518+01:00" level=debug
msg="docker-novolume-plugin's manifest: &{[authz]}"
Dec 20 19:52:30 localhost.localdomain docker[25767]:
time="2015-12-20T19:52:30.544170677+01:00" level=debug
msg="docker-novolume-plugin implements: authz"
```

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: c28fc06e002e06deed3437da76bc213b7bd752ba
Component: engine
2015-12-23 21:08:40 +01:00
1cfbdcfe91 Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83237aab2b9430a88790467867505cc9a5147f3e
Component: engine
2015-12-23 13:27:58 -05:00
595a0cd27e Merge pull request #18839 from aaronlehmann/v1-fallback-404
When a manifest is not found, allow fallback to v1
Upstream-commit: 95b708cf19f24dcf0044f2f4e96db2579201cbeb
Component: engine
2015-12-23 10:01:39 -08:00
6f10e6b229 Add filter for network ls to hide predefined net
Add filter support for `network ls` to hide predefined network,
then user can use "docker network rm `docker network ls -f type=custom`"
to delete a bundle of userdefined networks.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 26dd026bd70c9c18a16b0e339821c309e56d8ff0
Component: engine
2015-12-23 13:26:40 +08:00
13048f0ce1 Merge pull request #18831 from calavera/test_event_observer
Extract event processing to a common function for testing.
Upstream-commit: eacedcbe21e15f396ea1d9f620047718cce03df7
Component: engine
2015-12-22 15:04:32 -08:00
143c9b690b Merge pull request #18762 from calavera/runconfig_to_types
Move container configuration types to api/types/container.
Upstream-commit: 030347c3c9505fa80eed0ecfde5d1e9af05c3cbc
Component: engine
2015-12-22 14:22:08 -08:00
dadaf8ff90 Extract event processing to a common function for testing.
We keep only one logic to test event related behavior that will help us
diagnose flacky event errors.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: af51df20bdd9962b1aaa79819cafefc715290d28
Component: engine
2015-12-22 17:10:06 -05:00
47e00eae65 No options to tmpfs is valid
If you run a

docker run command with --tmpfs /mountpoint:noexec

Or certain options that get translated into mount options, the mount command can get passed "" for mount data.
So this should be valid.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: 89a775d2dc596b9ac86873edf447fff2f7012ef3
Component: engine
2015-12-22 14:15:07 -05:00
027f002cb3 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00