Commit graph

555 commits

Author SHA1 Message Date
John Howard
ddae91f21a Windows: Skip RunCidFileCleanupIfEmpty on RS1
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 20424fccdd)
2016-07-01 00:39:50 -07:00
Alvaro Saurin
c2b195d3c2 Make sure we are trying to unmount a mounted /etc/resolv.conf
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
(cherry picked from commit 41cc7c4d9d)
2016-06-30 16:47:47 -07:00
Alvaro Saurin
3e6c39e2ee Make sure we compare strings with the same capitalization
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
(cherry picked from commit ded347e744)
2016-06-30 16:47:47 -07:00
Kenfe-Mickael Laventure
77efe6dffc Skip TestRunResolvconfUpdate as it is unstable
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-06-14 07:47:31 -07:00
Vincent Demeester
4dafd107ad Merge pull request #22777 from WeiZhang555/wait-restarting
Bug fix: `docker run -i --restart always` hangs
2016-06-12 13:01:20 +02:00
Michael Crosby
393e97e435 Merge pull request #23002 from Microsoft/jjh/readonly
Windows: Support RO volumes 14350+
2016-06-08 11:18:48 -07:00
John Howard
8d174a43ba Windows: Support RO volumes 14350+
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-06-07 14:55:36 -07:00
Zhang Wei
c498d4700d 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>
2016-06-06 10:16:07 +08:00
Daniel Nephin
5ab2434225 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>
2016-06-04 13:57:30 +02:00
Vincent Demeester
edcc9577bf Merge pull request #22103 from coolljt0725/fix_22093
Fix docker create with duplicate volume failed to remove
2016-05-30 15:57:13 +02:00
John Howard
f7541b00b0 Better error on attach no tty
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-25 13:32:48 -07:00
Sebastiaan van Stijn
8c70ab803c Merge pull request #22953 from Microsoft/jjh/TestRunWorkingDirectory
Windows: Fix TestRunWorkingDirectory
2016-05-25 17:54:39 +02:00
Vincent Demeester
2a4b4a8133 Merge pull request #22962 from normalfaults/b
fixed spelling error in windows.go
2016-05-25 12:21:08 +02:00
Yong Tang
90bd41a74d 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>
2016-05-24 18:49:11 -07:00
Nirmal Mehta
f91acbaee4 fixed spelling error in docker cli run test
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
2016-05-24 21:43:22 -04:00
Yong Tang
23821fe586 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>
2016-05-24 16:03:26 -07:00
John Howard
257494bd0a Windows: Fix TestRunWorkingDirectory
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-24 15:13:06 -07:00
Vincent Demeester
ebeb5a0422 Merge pull request #22481 from mrunalp/pid_container
Add support for --pid=container:<id>
2016-05-19 19:00:40 +02:00
Sebastiaan van Stijn
aac6008800
fix typo in variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-05-18 15:26:16 +02:00
Mrunal Patel
fb43ef649b Add support for --pid=container:<id>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-05-17 13:49:05 -04:00
Alessandro Boch
6eb2b903a3 Docker changes for libnetwork vendoring b66c038
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-05-16 15:04:01 -07:00
Justin Terry
47ef6d7969 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>
2016-05-09 16:37:14 -07:00
Lei Jitang
5e5e1d7ada Fix docker create with duplicate volume failed to remove
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-05-06 22:48:02 -04:00
Alexander Morozov
e4a4570369 Merge pull request #22475 from Microsoft/jjh/twoconcurrentcontainers
Reduce time for TestRunTwoConcurrentContainers
2016-05-04 12:38:13 -07:00
John Howard
481cc6716f RunSleepingContainer consistency
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-03 11:39:29 -07:00
John Howard
94f1e574b6 Reduce time for TestRunTwoConcurrentContainers
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-03 10:55:20 -07:00
Vincent Demeester
78eb8a5fb9 Merge pull request #21641 from yongtang/21595-discrepancy-on-hostname-validation
API/CLI discrepancy on hostname validation (#21595).
2016-04-28 09:25:13 +02:00
Brian Goff
8adc8c3a68 Merge pull request #21901 from mavenugo/sid
Add container's short-id as default network alias
2016-04-19 08:16:41 -04:00
Madhu Venugopal
ea531f061d 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>
2016-04-18 14:45:16 -07:00
Christopher Jones
f84cabd3b8 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>
2016-04-15 09:33:51 -04:00
Aaron Lehmann
fa4fea3233 Merge pull request #21337 from yongtang/21247-TestRunAttachFailedNoLeak
Flaky test: TestRunAttachFailedNoLeak (#21247)
2016-04-12 17:40:16 -07:00
Vincent Demeester
a0e7e13766 Merge pull request #21818 from Microsoft/jjh/tp4fortests
Windows: Remove TP4 support from test code
2016-04-12 10:07:12 +02:00
John Howard
b0e24c7393 Windows: Remove TP4 support from test code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-11 15:36:31 -07:00
Yong Tang
ee4bd806ba 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>
2016-04-08 06:13:08 +00:00
Vincent Demeester
07f5804899 Merge pull request #21806 from Microsoft/RemoveSymlinkTests
Stop running symlink-volume tests on Windows
2016-04-07 22:03:44 +02:00
Darren Stahl
80d6f672f5 Stop running symlink-volume tests on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-04-05 16:37:00 -07:00
Tonis Tiigi
3f81b49352 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>
2016-04-04 18:55:55 -07:00
Antonio Murdaca
eb0f9f6641 integration-cli: add info to fatal log
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-03-31 12:38:47 +02:00
Antonio Murdaca
60821fe288 Merge pull request #21665 from cyphar/bump-runc
vendor: bump runc to 2441732d6fcc0fb0a542671a4372e0c7bc99c19e
2016-03-31 11:38:57 +02:00
Aleksa Sarai
da38ac6c79 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>
2016-03-31 11:20:38 +11:00
John Starks
86ab343c3e 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>
2016-03-30 12:59:50 -07:00
Yong Tang
2d03c54388 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>
2016-03-30 02:33:50 +00:00
Alexander Morozov
d7b341bc06 Merge pull request #21477 from cpuguy83/better_logging_on_integration
Better logging for errors in some tests
2016-03-25 09:16:18 -07:00
Brian Goff
42df9edc4a Better logging for errors in some tests
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-25 10:02:52 -04:00
Yong Tang
fa44b4e81e 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>
2016-03-24 17:42:28 +00:00
Phil Estes
a1d8441117 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)
2016-03-23 09:39:24 -04:00
Brian Goff
b0ac69b67e 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>
2016-03-21 20:38:44 -04:00
Yong Tang
800a7d513d 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>
2016-03-21 02:55:06 +00:00
Jess Frazelle
e5a3f86e44 Merge pull request #20662 from tonistiigi/containerd-integration
Containerd integration
2016-03-18 17:21:18 -07:00
Tonis Tiigi
9c4570a958 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>
2016-03-18 13:38:32 -07:00