Commit Graph

576 Commits

Author SHA1 Message Date
015d80b443 client: don't hide context errors
Instead of reformatting error from the request action, we wrap it,
allowing the cause to be recovered. This is important for consumers that
need to be able to detect context errors, such as `Cancelled` and
`DeadlineExceeded`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 8e5ef8af5c90a3fbc93173cb485d42e044ca56ae
Component: engine
2016-09-08 17:47:43 -07:00
955f123fe8 Fix ulimits in docker inspect when daemon default exists
This fix tries to fix 26326 where `docker inspect` will not show
ulimit even when daemon default ulimit has been set.

This fix merge the HostConfig's ulimit with daemon default in
`docker inspect`, so that when daemon is started with `default-ulimit`
and HostConfig's ulimit is not set, `docker inspect` will output
the daemon default.

An integration test has been added to cover the changes.

This fix fixes 26326.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7d705a7355d650feffc966e08efc0f92297145a8
Component: engine
2016-09-07 23:15:22 -07:00
4cf63a1696 Windows: Correct TestVolumesNoCopyData
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8a1fdce7fe991f64d7ba44ea39f6e9fe99199e0f
Component: engine
2016-09-06 15:38:19 -07:00
d5c2d4c2f5 Merge pull request #23830 from ardnaxelarak/23345_remove_name_from_volume_create
remove --name flag from volume create
Upstream-commit: 5168c93419547338b11f5d24d24a2a025ea64524
Component: engine
2016-08-26 21:52:07 +02:00
346f8a271b Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
Upstream-commit: ba3f0bf0e7d4f94eb94023278adcfad4ca8fe9d7
Component: engine
2016-08-25 14:20:06 -07:00
de17e6a998 Merge pull request #25354 from dnephin/remove-mflag-from-dockerd
Convert docker and dockerd commands to spf13/cobra
Upstream-commit: 25587906d122c4fce0eb1fbd3dfb805914455f59
Component: engine
2016-08-25 17:19:19 -04:00
4cad859c7a Merge pull request #25978 from justincormack/no-no-gccgo
Remove gccgo support
Upstream-commit: 8d99dfbc69a18cbf1e604b845df76fdedcf2e853
Component: engine
2016-08-25 12:12:29 -07:00
8ad0a6fe8f Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6e7405ebd4df360bc84f651c977ece31283eb3ee
Component: engine
2016-08-25 13:09:36 -04:00
4d71bb6be2 Remove gccgo support
Since Go 1.7, s390x uses upstream Go, so we have no reason to
support gccgo any more.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: eda90f63446253f97d2011926555306f2417d208
Component: engine
2016-08-24 11:09:35 +01:00
0d4234bb46 Change to use c.Assert() instead of result.Assert()
Fix delete containers and make sure it prints errors correctly.
Rename Result.Fails to Result.Assert()
Create a constant for the default expected.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 243885808f5c69143679d094d964d333c47e69bf
Component: engine
2016-08-23 15:12:36 -04:00
eaa727c6e2 Create a unified RunCommand function with Assert()
Remove some run functions and replace them with the unified run command.
Remove DockerCmdWithStdoutStderr
Remove many duplicate runCommand functions.
Also add dockerCmdWithResult()
Allow Result.Assert() to ignore the error message if an exit status is expected.
Fix race in DockerSuite.TestDockerInspectMultipleNetwork
Fix flaky test DockerSuite.TestRunInteractiveWithRestartPolicy

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d7022f2b46589cb9d860219e1d8278351ba147c3
Component: engine
2016-08-23 15:11:46 -04:00
2b0a71c4f1 Remove unnecessary json.Unmarshal wrapper.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb42e8477208badf0714a9d8ae20946a9b531dba
Component: engine
2016-08-23 15:11:46 -04:00
b27f1b6d73 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3c2886d8a45d8e79b00ab413d91f1af871b58d0a
Component: engine
2016-08-08 22:46:53 +08:00
0c94d9d1e8 Allow unset --entrypoint in docker run or docker create
This fix tries to address the issue raised in #23498 to allow unset
`--entrypoint` in `docker run` or `docker create`.

This fix checks the flag `--entrypoint` and, in case `--entrypoint=` (`""`)
is passed, unset the Entrypoint during the container run.

Additional integration tests have been created to cover changes in this fix.

This fix fixes #23498.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c8d3ee80933d6337382fb4a52d90835e263c1aaf
Component: engine
2016-08-05 16:35:20 -07:00
1c3431e16a fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4e959ef2f7f063803d04e06166f459257eb94b5c
Component: engine
2016-07-23 11:32:23 +08:00
86ccbc24d1 Windows: TestRunCleanupCmdOnEntrypoint for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0d4b8cbdac531058e76526adebb1b8258826d0cf
Component: engine
2016-07-22 09:05:38 -07:00
2390132a2f Windows: Fix TestRunLookupGoogleDNS for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 80a63e8a2126239cb06918da25b5ff22c2ad813b
Component: engine
2016-07-21 19:46:17 -07:00
e89f357b69 Windows: Skip RunCidFileCleanupIfEmpty on RS1
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 20424fccdd1ba874277eca7d9644b1ef98ac4b2e
Component: engine
2016-06-28 13:04:42 -07:00
1518772054 Merge pull request #23802 from inercia/fix_docker_cli_run_test
Make sure we compare string with the same capitalization
Upstream-commit: f6326d307667ea92ce6931985616d85d4e3248ed
Component: engine
2016-06-24 10:27:29 -04:00
fd4459c7c2 Merge pull request #23700 from Microsoft/jjh/fixrotestcases
Windows: Fix RO test cases
Upstream-commit: 7b2b4eb40cfd907f3aa20b630cc2feeb8460404a
Component: engine
2016-06-21 09:01:43 -07:00
877267ab98 Make sure we are trying to unmount a mounted /etc/resolv.conf
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
Upstream-commit: 41cc7c4d9ddb6d6b9e024f30806adc82f1bb1d4a
Component: engine
2016-06-21 10:38:45 +02:00
579e7587f8 Make sure we compare strings with the same capitalization
Signed-off-by: Alvaro Saurin <alvaro.saurin@gmail.com>
Upstream-commit: ded347e744e74b99c023b30b53fcabe2c3bde24c
Component: engine
2016-06-21 10:35:50 +02:00
c9913bf8dc Windows: Fix RO test cases
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 03816ad5b5a060449243d0e30fa396c2255ddacb
Component: engine
2016-06-20 10:15:20 -07:00
31e8392bc0 integration-cli: Change "Dns" to "DNS".
This fixes a minor lint/style issue, improves consistency.

According to Go style, which this project follows, acronyms should have
a consistent case. Source: https://github.com/golang/go/wiki/CodeReviewComments#initialisms

See https://github.com/docker/docker/pull/11310#discussion_r67394302.

Signed-off-by: Dmitri Shuralyov <shurcooL@gmail.com>
Upstream-commit: 8cf4133f3749d7fa99a56cde98676a161971fb71
Component: engine
2016-06-18 16:32:27 -07:00
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