Commit Graph

552 Commits

Author SHA1 Message Date
ac73c8e6d1 Skip TestRunResolvconfUpdate as it is unstable
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 77efe6dffcd337a45831c5294fc402627251e915
Component: engine
2016-06-14 07:47:31 -07:00
b9624c9967 Merge pull request #22777 from WeiZhang555/wait-restarting
Bug fix: `docker run -i --restart always` hangs
Upstream-commit: 4dafd107ad0cb89e1a7f9e3bcc66fb6a5a5c99c5
Component: engine
2016-06-12 13:01:20 +02:00
74d1f25f8f Merge pull request #23002 from Microsoft/jjh/readonly
Windows: Support RO volumes 14350+
Upstream-commit: 393e97e435e7c1629934d8042d1fb8e5bb7d61f9
Component: engine
2016-06-08 11:18:48 -07:00
9ca189a13d Windows: Support RO volumes 14350+
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8d174a43babd19e8c1166338b5aa5f1128914a96
Component: engine
2016-06-07 14:55:36 -07:00
87f6d1f046 Bug fix: docker run -i --restart always hangs.
e.g.
```
$ docker run -i --restart always busybox sh
pwd
/
exit 11

<...hang...>
```

This is because Attach(daemon side) and Run(client side) both hangs on
WaitStop, if container is restarted too quickly, wait won't have chance
to get exit signal.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: c498d4700df8216ccefd6d2f03b5ebe6d6e9fd47
Component: engine
2016-06-06 10:16:07 +08:00
27d26eeb56 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ab24342258c70438ab8edf708ebc466b1677f38
Component: engine
2016-06-04 13:57:30 +02:00
df33adb751 Merge pull request #22103 from coolljt0725/fix_22093
Fix docker create with duplicate volume failed to remove
Upstream-commit: edcc9577bf95c2eeaa15955e7b1c00a18cec7cb6
Component: engine
2016-05-30 15:57:13 +02:00
c1a0ccd035 Better error on attach no tty
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f7541b00b0f68a52195ed9bac967f8f08d96aa51
Component: engine
2016-05-25 13:32:48 -07:00
504a2ff9e3 Merge pull request #22953 from Microsoft/jjh/TestRunWorkingDirectory
Windows: Fix TestRunWorkingDirectory
Upstream-commit: 8c70ab803c49816de8124703db6635e9c5c7ce25
Component: engine
2016-05-25 17:54:39 +02:00
3e8a3ed291 Merge pull request #22962 from normalfaults/b
fixed spelling error in windows.go
Upstream-commit: 2a4b4a813342294a6191425caba471a94c8a39f6
Component: engine
2016-05-25 12:21:08 +02:00
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
3d16c1ca14 fixed spelling error in docker cli run test
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
Upstream-commit: f91acbaee452191f406d31e3f3fd44210aa17fbf
Component: engine
2016-05-24 21:43:22 -04: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
f99c99aaac Windows: Fix TestRunWorkingDirectory
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 257494bd0a017cad264609f1a77b9af3ab7f991c
Component: engine
2016-05-24 15:13:06 -07: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
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
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
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
18f57f3b68 Fix docker create with duplicate volume failed to remove
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5e5e1d7adae4af11dfa0b39ecc621b0c1fe3f85a
Component: engine
2016-05-06 22:48:02 -04: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
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
3cf7d71fdb Merge pull request #21641 from yongtang/21595-discrepancy-on-hostname-validation
API/CLI discrepancy on hostname validation (#21595).
Upstream-commit: 78eb8a5fb932c2b11df47e7a22c05fe485e03adb
Component: engine
2016-04-28 09:25:13 +02:00
c026bc562f Merge pull request #21901 from mavenugo/sid
Add container's short-id as default network alias
Upstream-commit: 8adc8c3a686be09212a894cc91dcd974b830f330
Component: engine
2016-04-19 08:16:41 -04:00
7e0d42a8a5 Add container's short-id as default network alias
link feature in docker0 bridge by default provides short-id as a
container alias. With built-in SD feature, providing a container
short-id as a network alias will fill that gap.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: ea531f061d3c511e376753f9863cb41f1b96d87e
Component: engine
2016-04-18 14:45:16 -07:00
d95baeb192 Fix flaky test TestRunExitOnStdinClose
This test was flaky on ppc64le, where the average time to close was
around 1 second. This bumps that timeout to 60 seconds which should be
plently.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: f84cabd3b8a737e7539d71773b842daa8f0dc66b
Component: engine
2016-04-15 09:33:51 -04:00
56e19c6402 Merge pull request #21337 from yongtang/21247-TestRunAttachFailedNoLeak
Flaky test: TestRunAttachFailedNoLeak (#21247)
Upstream-commit: fa4fea32330c11b337873698c4a79244aabef4d2
Component: engine
2016-04-12 17:40:16 -07:00
41e374e687 Merge pull request #21818 from Microsoft/jjh/tp4fortests
Windows: Remove TP4 support from test code
Upstream-commit: a0e7e1376605541d988387967f69469d25af060a
Component: engine
2016-04-12 10:07:12 +02:00
86ed4f4024 Windows: Remove TP4 support from test code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b0e24c73931d70ef543a3d69c41b0add7130cb80
Component: engine
2016-04-11 15:36:31 -07:00
37e6f95686 API/CLI discrepancy on hostname validation (#21595).
This fix tries to fix the discrepancy between API and CLI on hostname
validation. Previously, the hostname validation was handled at the
CLI interface in runconfig/opts/parse.go and return an error if the
hostname is invalid. However, if an end user use the remote API to
pass the hostname, the error will not be returned immediately.
Instead the error will only be thrown out when the container creation
fails. This creates behavior discrepancy between API and CLI.

In this fix, the hostname validation was moved to
verifyContainerSettings so the behavior will be the same for API and
CLI.

After the change, since CLI does not handle the hostname validation
any more, the previous unit tests about hostname validation on CLI
in runconfig/opts/parse_test.go has to be updated as well because
there is no validation at this stage. All those unit tests are moved
to integration test TestRunTooLongHostname so that the hostname
validation is still properly covered as before.

Note: Since the hostname validation moved to API, the error message
changes from `invalid hostname format for --hostname:` to
`invalid hostname format:` as well because `--hostname` is passed
to CLI only.

This fix fixes #21595.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ee4bd806ba6ccac0013eb812e7f30bfcfe12d22a
Component: engine
2016-04-08 06:13:08 +00:00
c81691ebc7 Merge pull request #21806 from Microsoft/RemoveSymlinkTests
Stop running symlink-volume tests on Windows
Upstream-commit: 07f580489908bf6a3373daac1473045406e1130d
Component: engine
2016-04-07 22:03:44 +02:00
90f778ad65 Stop running symlink-volume tests on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 80d6f672f5b5819aecf37ca902195558151cc87b
Component: engine
2016-04-05 16:37:00 -07:00
ac4137daba Define readonly/mask paths in spec
This vendors in new spec/runc that supports
setting readonly and masked paths in the 
configuration. Using this allows us to make an
exception for `—-privileged`.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3f81b4935292d5daedea9de4e2db0895986115da
Component: engine
2016-04-04 18:55:55 -07:00
3bf882d79f integration-cli: add info to fatal log
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: eb0f9f664116ca28d844144929f4b578fe2d1dc8
Component: engine
2016-03-31 12:38:47 +02:00
09b74b88c4 Merge pull request #21665 from cyphar/bump-runc
vendor: bump runc to 2441732d6fcc0fb0a542671a4372e0c7bc99c19e
Upstream-commit: 60821fe288ce1c53fdf5ab553b9f1d4571f1ec11
Component: engine
2016-03-31 11:38:57 +02:00
b856d3bee3 vendor: bump runc to 2441732d6fcc0fb0a542671a4372e0c7bc99c19e
Also modify an integration test that hardcoded the error string so it
uses the exported error variable from libcontainer/user.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: da38ac6c79fe902ed0687afc73d731c95c6d491a
Component: engine
2016-03-31 11:20:38 +11:00
403cc82fb3 Windows: fix tests depending on entrypoint split behavior
Existing tests assume that the entrypoint in a docker run command will be
split into multiple arguments, which is inconsistent with Linux. Fix the
tests depending on this behavior.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 86ab343c3e98ded1ee1b12f04396ae011a0e6de6
Component: engine
2016-03-30 12:59:50 -07:00
109440ee96 Flaky test: TestRunAttachFailedNoLeak (#21247)
This pull request tries to diagnosis and fix the flaky test of
TestRunAttachFailedNoLeak. The test failed several times in
Docker CI but is very difficult to repeat even in CI.

This pull request first try to repeat the issue at the Jenkins
server with some diagnosis message added to the output in case
the test fails again.

Since the added ouputs will only be invoked when test fails,
it will not add any unnecessary content in normal situations.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2d03c543888efbd634480ffc8ac5d2e09c8ea881
Component: engine
2016-03-30 02:33:50 +00:00
1ac9493cd9 Merge pull request #21477 from cpuguy83/better_logging_on_integration
Better logging for errors in some tests
Upstream-commit: d7b341bc06c880efbc015b6cf75e69638800ff4b
Component: engine
2016-03-25 09:16:18 -07:00
44532d43ae Better logging for errors in some tests
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 42df9edc4a6ccfff6869fd14b2128ca3312e99db
Component: engine
2016-03-25 10:02:52 -04:00
547c60d84c More descriptive error when running a container with a too long hostname (#21445)
This fix tries to fix issues encountered when running a container with a hostname
that is longer than HOST_NAME_MAX(64).

Previously, `could not synchronise with container process` was generated as the
length of the regex check was missing.

This fix covers the length check so that a hostname that is longer than
HOST_NAME_MAX(64) will be given a correct error message.

Several unit tests cases and additional integration test cases are added as well.

This fix closes #21445.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa44b4e81ee87f1c2b39ad335a22795415c8cdf2
Component: engine
2016-03-24 17:42:28 +00:00
dba13cd8af Re-enable shared namespace tests for userns CI runs
Allow --net=container and --ipc=container tests to run when user
namespaces are enabled.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: a1d84411178bdf72be83ad292543a1ea70aa3f69
Component: engine
2016-03-23 09:39:24 -04:00
308c81e7d4 Add explicit flags for volume cp/no-cp
This allows a user to specify explicitly to enable
automatic copying of data from the container path to the volume path.
This does not change the default behavior of automatically copying, but
does allow a user to disable it at runtime.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b0ac69b67ef79c6c937f84bee3df20a1924ad334
Component: engine
2016-03-21 20:38:44 -04:00
cd3a202f52 Fix one-character directory issue in the volume option (#20122).
The issue comes from the implementation of volumeSplitN() where a
driver letter (`[a-zA-Z]:`) was assumed to follow either `:`, `/`,
or `\\`.

In Windows driver letter appears in two situations:
a. `^[a-zA-Z]:` (A colon followed  by `^[a-zA-Z]:` is OK as colon is
the separator in volume option)
b. A string in the format like `\\?\C:\Windows\...` (UNC).
Therefore, a driver letter can only follow either a `:` or `\\`

This PR removes the condition of `/` before the driver letter so
that options like `-v /tmp/q:/foo` could be handled correctly. A
couple of tests has also been added.

This PR fixes #20122.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 800a7d513d3b80478a7996cb2c357b72f65e0b09
Component: engine
2016-03-21 02:55:06 +00:00
ba41c51be4 Merge pull request #20662 from tonistiigi/containerd-integration
Containerd integration
Upstream-commit: e5a3f86e447dd659da3c2e759f3c088a0bfcfe3d
Component: engine
2016-03-18 17:21:18 -07:00
8ba16d91c8 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9c4570a958df42d1ad19364b1a8da55b891d850a
Component: engine
2016-03-18 13:38:32 -07:00
cb854bf11c Consolidate security options to use = as separator.
All other options we have use `=` as separator, labels,
log configurations, graph configurations and so on.
We should be consistent and use `=` for the security
options too.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: cb9aeb0413ca75bb3af7fa723a1f2e6b2bdbcb0e
Component: engine
2016-03-17 13:34:42 -04:00
04c0a38220 Fix flaky test TestRunAttachFailedNoLeak in #21247.
The issue of the flaky test is because when the second container
starts, the first container in the detached mode may have only
been created and not yet entering the running state. So the
port 8000 might be used by the second container first.

This fix added a check to make sure the first container is already
in running state, before the second container is invoked.

This fix fixes #21247.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1a9f5f4c69451c580595d67844f41937b3293069
Component: engine
2016-03-17 03:14:59 +00:00
6b75bb519f Merge pull request #20177 from jheiss/12076-net_hostname
Allow --hostname with --net=host
Upstream-commit: 21e531014db65422e1a3000fd3596459f55870c4
Component: engine
2016-03-15 08:17:25 -07:00