Commit Graph

3302 Commits

Author SHA1 Message Date
b520646fdd The option --add-host and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--add-host` and `--net=host` to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 90bd41a74d57080711678bffa2bc4371020ee3a5
Component: engine
2016-05-24 18:49:11 -07:00
e230ff1485 The option --dns, --dns-search, --dns-opt and --net=host should not be mutually exclusive.
This fix tries to address the issue raised in #21976 and allows
the options of `--dns`, `--dns-search`, `--dns-opt` and `--net=host`
to work at the same time.

The documentation has been updated and additional tests have been
added to cover this change.

This fix fixes #21976.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 23821fe5867427fa36c265bc994b1a2c3cf9b21f
Component: engine
2016-05-24 16:03:26 -07:00
0ec1e0058a Merge pull request #22932 from chenchun/fix_build
Fix building image  error if bridge network is disabled
Upstream-commit: 38217d43531c721da952a9de2a89b08397f7c029
Component: engine
2016-05-24 10:33:34 -07:00
850246a4c4 Merge pull request #22590 from yongtang/22463-docker-daemon-events
Emit events for docker daemon
Upstream-commit: d76d38c7d028754c48f842e4631c2d897e63198d
Component: engine
2016-05-24 11:05:39 +02:00
6717a252a9 Fix building image error if bridge network is disabled
Signed-off-by: Chun Chen <ramichen@tencent.com>
Upstream-commit: a8d013495c479cdc18fa7751413ef67334f37ee6
Component: engine
2016-05-24 16:20:26 +08:00
d6f4430048 Merge pull request #22541 from crosbymichael/graph-restore
Implement graph driver restore on reboot
Upstream-commit: d7dfe9103bfc275494d936a5d89f3067b0aedbc9
Component: engine
2016-05-23 22:57:23 -07:00
fe4d79b993 Add filter for events emitted by docker daemon
This fix tries to cover the issue raised in #22463 by adding
filter for events emitted by docker daemon so that user could
utilize filter to receive events of interest.

Documentations have been updated for this fix.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 62014aaf9abeb4256cb66e7ae06bfdf5a77d1140
Component: engine
2016-05-23 19:00:47 -07:00
e954a0d7e9 Emit events for docker daemon
This fix tries to cover the issue raised in #22463 by emitting
events for docker daemon so that user could be notified by
scenarios like config reload, etc.

This fix adds the `daemon reload`, and events for docker daemon.

Additional tests have been added to cover the changes in this fix.

This fix fixes #22463.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 382c152a73dfa1d771334ffbe79759c5c3596144
Component: engine
2016-05-23 19:00:47 -07:00
f066a59cec Fix error channel size in seccomp test
This was not changed when the additional tests were added.
It may be the reason for occasional test failures.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 3598f2e33198686f0afa08aca640dbda8697fcb2
Component: engine
2016-05-23 18:14:55 -07:00
e6822e5504 Remove restart test
This test is not applicable anymore now that containers are not stopped
when the daemon is restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 31e903b0e17d01a4240f7890218a80088d32658c
Component: engine
2016-05-23 15:57:23 -07:00
4197623885 Reimplementing more builder integration tests as unit tests
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: cf2611f3239d18919e437e82554cec178028612e
Component: engine
2016-05-22 01:00:57 +02:00
214a2bf487 Add a --filter option to docker search
The filtering is made server-side, and the following filters are
supported:

* is-official (boolean)
* is-automated (boolean)
* has-stars (integer)

Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e009ebdf4c0bf0ff64da8d48eefad63d0644de3e
Component: engine
2016-05-20 13:41:28 +02:00
f66ae64dbf Merge pull request #22554 from justincormack/seccap
Align default seccomp profile with selected capabilities
Upstream-commit: 0e9009bae3a493cfce8a8334949b239efcb88f43
Component: engine
2016-05-20 12:58:28 +02:00
f157ec9b75 fixed spelling error in cli pull local test
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
Upstream-commit: f66f5d4bdc8ee12a2005df43bd279352705473d5
Component: engine
2016-05-19 17:52:42 -05:00
de1f1fb963 Merge pull request #22481 from mrunalp/pid_container
Add support for --pid=container:<id>
Upstream-commit: ebeb5a0422be47e703353e327606a380eb9962ab
Component: engine
2016-05-19 19:00:40 +02:00
a6422fdd0e fix typo in variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: aac6008800ab06047ff000d6af487f3b52ba3019
Component: engine
2016-05-18 15:26:16 +02:00
8fe06d66da Merge pull request #22785 from runcom/fix-flaky-network
TestPsGroupPortRange: allocate less ports
Upstream-commit: cbc404a0832bd95cce95783b87475d761be3a922
Component: engine
2016-05-18 11:08:10 +02:00
612ad97231 Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: fb43ef649bc6aa11ca19c0e046518e85e1c7e2fa
Component: engine
2016-05-17 13:49:05 -04:00
d4479244ab TestPsGroupPortRange: allocate less ports
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: bdb354f19b485238c42a86ff2a61fc7537da15ee
Component: engine
2016-05-17 12:23:37 +02:00
0a494f1920 Docker changes for libnetwork vendoring b66c038
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 6eb2b903a39f66ce88155eb1c062c085e4959e39
Component: engine
2016-05-16 15:04:01 -07:00
e033d6beca Merge pull request #22462 from Microsoft/jjh/22181unittests
Windows: Reduce CLI time, move some to unit tests
Upstream-commit: 9de21de4531e01169d903751ab48a29457769610
Component: engine
2016-05-13 00:27:29 +02:00
b511f6b16d Merge pull request #22636 from sean-jc/fix-oom-killer-tests
Add the swapMemorySupport requirement to OOM tests
Upstream-commit: 95872b65fb65bcc275b2fa141b6a991ee085a41a
Component: engine
2016-05-12 14:41:55 -07:00
3af8464259 Merge pull request #22445 from yongtang/20936-22443-concurrent-connection
Docker pull/push with max concurrency limits.
Upstream-commit: e9117578a7837eda31d690d5e51d09d43a6a8fca
Component: engine
2016-05-12 08:51:28 -07:00
e20fdf0d4f Merge pull request #22622 from tkopczynski/20784-builder-intg2unit-tests
Reimplement some builder integration tests as unit tests
Upstream-commit: 84a6818b11e6bf74d13222d0df2fe7d1ae811bb6
Component: engine
2016-05-12 10:29:39 +02:00
be88ed49c5 Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7368e41c07c21a1e2c6a49abecd1c2fc76404e49
Component: engine
2016-05-11 19:44:54 -07:00
af05fef951 Reimplementing builder integration tests as unit tests
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 18eeb399852b7efe9459a1d77b0a5032a6b88bba
Component: engine
2016-05-11 22:13:39 +02:00
c571f88b8d Align default seccomp profile with selected capabilities
Currently the default seccomp profile is fixed. This changes it
so that it varies depending on the Linux capabilities selected with
the --cap-add and --cap-drop options. Without this, if a user adds
privileges, eg to allow ptrace with --cap-add sys_ptrace then still
cannot actually use ptrace as it is still blocked by seccomp, so
they will probably disable seccomp or use --privileged. With this
change the syscalls that are needed for the capability are also
allowed by the seccomp profile based on the selected capabilities.

While this patch makes it easier to do things with for example
cap_sys_admin enabled, as it will now allow creating new namespaces
and use of mount, it still allows less than --cap-add cap_sys_admin
--security-opt seccomp:unconfined would have previously. It is not
recommended that users run containers with cap_sys_admin as this does
give full access to the host machine.

It also cleans up some architecture specific system calls to be
only selected when needed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: a01c4dc8f85827f32d88522e5153dddc02f11806
Component: engine
2016-05-11 09:30:23 +01:00
d3b9fbad27 Merge pull request #22511 from crosbymichael/update-runc-containerd
Update runc and containerd deps
Upstream-commit: af60a9e599543daa70da6d5d3b07343aa780c3ad
Component: engine
2016-05-10 15:06:23 -07:00
3ff3d68824 Add the swapMemorySupport requirement to OOM tests
Add the swapMemorySupport requirement to all tests related to the OOM killer.  The --memory option has the subtle side effect of defaulting --memory-swap to double the value of --memory.  The OOM killer doesn't kick in until the container exhausts memory+swap, and so without the memory swap cgroup the tests will timeout due to swap being effectively unlimited.

Document the default behavior of --memory-swap in the docker run man page.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Upstream-commit: adabb51311ecac031bd72378c5ed1669d1835d40
Component: engine
2016-05-10 11:28:00 -07:00
bf84b3cfbf Adds a correct error string for network validation
Fixes the negative networking test to include the new error string
from recent Windows builds.

Signed-off-by: Justin Terry <juterry@microsoft.com>
Upstream-commit: 47ef6d7969a3396f6ecc3bb27aac425b1a65b344
Component: engine
2016-05-09 16:37:14 -07:00
dbf25e32d6 Fix containerd proto for connection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 6889c3276c6895a8440dc8883b8cd608793199f3
Component: engine
2016-05-09 15:17:10 -07:00
496d63e99d Merge pull request #22562 from tonistiigi/fix-loopback-release
Clean loopbacks in TestDaemonNoSpaceLeftOnDeviceError
Upstream-commit: c5e3644f03acb71473a1c19437891f6903aca738
Component: engine
2016-05-09 13:28:08 -04:00
91eda97012 Merge pull request #22574 from yongtang/05072016-remove-deprecated-trust-env
Remove deprecated Docker Content Trust ENV passphrase variables
Upstream-commit: fad0305ee3f697c70654e4ade7dfdd92483eb3e1
Component: engine
2016-05-09 10:10:27 -07:00
9da7afb9c6 Err was never being returned
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0687d76ab1f54250ee7611822d4194a44217fa83
Component: engine
2016-05-08 05:51:59 -07:00
86911550d2 Remove deprecated Docker Content Trust ENV passphrase variables
Since 1.9, Docker Content Trust Offline key has been renamed to
Root key and the Tagging key has been renamed to Repository key.
The corresponding environment variables
`DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE`
`DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE`
have also been deprecated and renamed to
`DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE`
`DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE`

This fix removed the deprecated ENV passphrase variables for
1.12 and updated the docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1f0d5aba50803ff401197f96f6a830384d0c04c5
Component: engine
2016-05-07 14:25:28 -07:00
003c321b57 Merge pull request #21889 from cpuguy83/logscmd_add_attrs
Add support for reading logs extra attrs
Upstream-commit: 08ec3606f1656962084222412debf2888f15f553
Component: engine
2016-05-07 20:26:33 +02:00
697f71e4f2 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bd9d14a07b9f1c82625dc8483245caf3fa7fe9e6
Component: engine
2016-05-06 20:42:20 -04:00
066d1c9ee5 Clean loopbacks in TestDaemonNoSpaceLeftOnDeviceError
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 47c353eb4694a727e4fe4d6c1c2eedf1dc3c3aa8
Component: engine
2016-05-06 14:19:27 -07:00
d1aa34c3d1 Windows: Reduce CLI time, move some to unit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: faab71701f710a8862e71d4ecd6a86cef49f67b9
Component: engine
2016-05-06 12:26:08 -07:00
9f5c8a18bb Merge pull request #22501 from michael-holzheu/22477-TestApiStatsContainerGetMemoryLimit-add-mem-cgroup-test
TestApiStatsContainerGetMemoryLimit: Add cgroup memory test
Upstream-commit: f65f4dc76103986542bc5472c4ae992ecfa74c07
Component: engine
2016-05-06 09:12:27 +02:00
1ae186f482 Merge pull request #21961 from yongtang/21956-docker-inspect-log-default-options
Docker inspect gave default log options even when the option is emtpy.
Upstream-commit: e9bef66021a29c219c185e98db7f3017513f67a6
Component: engine
2016-05-05 21:02:39 -04:00
83644199c7 Merge pull request #21015 from cpuguy83/add_opaque_mount_id
When calling volume driver Mount, send opaque ID
Upstream-commit: bb125650c9fbff03d57c20fd8e4ecde90b3ec326
Component: engine
2016-05-05 18:00:15 +02:00
e5dc90cedd Merge pull request #22505 from runcom/authz-load-import
integration-cli: test load/import with authz plugins
Upstream-commit: 0d3d8d6416bdadf3a6e018a18cb97f5162da1fb1
Component: engine
2016-05-05 11:37:20 -04:00
576dc33c5e Merge pull request #22508 from Microsoft/jjh/arg
Windows: Support ARG in builder
Upstream-commit: 378a8e71755e86bab0e6c18022bf457a9c79e166
Component: engine
2016-05-05 09:09:55 +02:00
b06eb99229 Windows: Support ARG in builder
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6b5c83bf18fe406e397c001acb0a1d9d7e147fd9
Component: engine
2016-05-04 14:32:23 -07:00
e7e33c529a Merge pull request #22475 from Microsoft/jjh/twoconcurrentcontainers
Reduce time for TestRunTwoConcurrentContainers
Upstream-commit: e4a4570369d53adbf74b8cb84d8b7301a32689bd
Component: engine
2016-05-04 12:38:13 -07:00
11be2b26e1 TestApiStatsContainerGetMemoryLimit: Add cgroup memory test
Currently on kernels booted without the "cgroup_enable=memory" kernel
parameter the testcase TestApiStatsContainerGetMemoryLimit fails with:

FAIL: docker_api_stats_test.go:231: TestApiStatsContainerGetMemoryLimit.pN52_github_com_docker_docker_integration_cli.DockerSuite

docker_api_stats_test.go:256:
    c.Assert(fmt.Sprintf("%d", v.MemoryStats.Limit), checker.Equals, fmt.Sprintf("%d", info.MemTotal))
... obtained string = "0"
... expected string = "33759145984"

Fix this and skip the testcase if the kernel does not support cgroup memory
limit. In that case the output would be:

SKIP: docker_api_stats_test.go:231:
TestApiStatsContainerGetMemoryLimit.pN52_github_com_docker_docker_integration_cli.DockerSuite
(Test requires an environment that supports cgroup memory limit.)

ChangeLog:
----------
v4: Move TestApiStatsContainerGetMemoryLimit to docker_api_stats_unix_test.go
v3: Use existing "memoryLimitSupport" from requirements_unix.go
v2: Move check to requirements.go

Fixes #22477

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Upstream-commit: 8ba8189ee66fa36f7adb1f2bab6cc4c35ebfd8cd
Component: engine
2016-05-04 20:46:41 +02:00
cd0e933563 integration-cli: test load/import with authz plugins
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9613acbe5cd517f1fd4c8d405be3cfc24d249562
Component: engine
2016-05-04 18:45:22 +02:00
bbb9555a0a RunSleepingContainer consistency
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 481cc6716fdfda8db4481dd2a3dfde4d3d2edba5
Component: engine
2016-05-03 11:39:29 -07:00
368f007a03 Reduce time for TestRunTwoConcurrentContainers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 94f1e574b6469021c7c7fd3cad857a011cf93815
Component: engine
2016-05-03 10:55:20 -07:00