Commit Graph

178 Commits

Author SHA1 Message Date
e0ebfad813 Remove word "fail" from tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: aadb6289ccd84b9997a43c8b74b2948236f30e76
Component: engine
2015-02-09 18:01:52 -05:00
123e8eff11 Clean up dup. volume test and add API test for the same
Handles missed comments in PR#10622 and adds an API test to validate
error returned properly for duplicate bind mounts for the same
container target path.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 35d48258384a07affac6f49b89a70dd7ffa60428
Component: engine
2015-02-09 12:33:58 -05:00
df52d83f51 Merge pull request #10622 from estesp/10618-err-ondup-bind-vols
Don't allow duplicate `-v` specifications for the same target
Upstream-commit: 271a073a04cdffbeda5f83d2d227c5e8c5f8ae86
Component: engine
2015-02-06 15:03:56 -08:00
acc900171e Merge pull request #10421 from noironetworks/10388-Specifying_confliting_options
Specifying -a and -d to docker run should throw an error
Upstream-commit: eb79acd7a0db494d9c6d1b1e970bdabf7c44ae4e
Component: engine
2015-02-06 14:58:08 -08:00
b33f390dce Don't allow duplicate -v specifications for the same target
Addresses: #10618

Given that the user has no notification that they tried to bind mount
different directories on the same target in the container, this errors
out in that case, without changing the current code allowing for
--volumes-from to trump -v/VOLUME specifications.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: d1f33d12d4126aae80c51ab1075a5b8323a5f957
Component: engine
2015-02-06 17:00:53 -05:00
ebc844c8a7 Fixes #10388
The cmd.Lookup should be "-attach" and not "attach", as seen in
docker/docker/runconfig/parse.go

Signed-off-by: André Martins <martins@noironetworks.com>
Upstream-commit: af90fe6a633be3a5bff4d20b0a59b9189a171176
Component: engine
2015-02-02 12:07:52 +00:00
764888405b Fixes symlink, container size, and kmsg tests
Changes symlink, container size and kmsg tests to account for lxc driver.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 29ac29a4361e0392979ad6a99341bff174f76967
Component: engine
2015-01-30 09:30:42 +00:00
e7f0104567 Move one last exec test :)
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 6a2c6e971d8b760931402e15513e91c71cba4b72
Component: engine
2015-01-26 17:17:08 -08:00
00cef48e11 Merge pull request #10295 from ashahab-altiscale/9875-lxc-exit-code
Adds ipc namespace capability to lxc, and fixes tests.
Upstream-commit: 364c64cf1aa912ea8197caa6b23b96e20ead64fb
Component: engine
2015-01-26 11:21:48 -08:00
36ea1c732a Move links exec test & exec dir test.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 43d1c2010125e3c1ef1013ee2e8b4d9371d70d77
Component: engine
2015-01-23 16:20:46 -08:00
32b5682b75 Merge pull request #10145 from duglin/Issue10141
Docker run -e FOO should erase FOO if FOO isn't set in client env
Upstream-commit: edaf23b7a7f71626bdafb4e3a9677ad05fa17cab
Component: engine
2015-01-21 14:16:51 -08:00
3d77110890 Adds ipc namespace capability to lxc, and fixes tests.
This fixes various tests by checking for non zero exit code, accounting for lxc-specific base-diffs, and by removing lxc specific environment vars.
It also adds the --share-ipc option to lxc-start for shared ipc namespaces.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 3ca5af6b1ab6d1b75e014265e1ad4f5e45960826
Component: engine
2015-01-21 06:08:00 +00:00
dbf7d610b8 Merge pull request #10005 from estesp/fix-localhost-nameserver-cleanup
Clean up localhost resolv logic and add IPv6 support to regexp
Upstream-commit: e9d3e237e5cffef0dfcd4949c31959cd25863f3f
Component: engine
2015-01-20 10:30:06 -08:00
73a96089ff Merge pull request #10190 from ashahab-altiscale/9875-lxc-run-links
LXC needs stdin for container to remain up
Upstream-commit: 7b48488c5641f092e111aa9d5562b368f7e66711
Component: engine
2015-01-19 17:13:37 -08:00
5e93ebec1e Clean up localhost resolv logic and add IPv6 support to regexp
Addresses #5811

This cleans up an error in the logic which removes localhost resolvers
from the host resolv.conf at container creation start time. Specifically
when the determination is made if any nameservers are left after
removing localhost resolvers, it was using a string match on the word
"nameserver", which could have been anywhere (including commented out)
leading to incorrect situations where no nameservers were left but the
default ones were not added.

This also adds some complexity to the regular expressions for finding
nameservers in general, as well as matching on localhost resolvers due
to the recent addition of IPv6 support.  Because of IPv6 support now
available in the Docker daemon, the resolvconf code is now aware of
IPv6 enable/disable state and uses that for both filter/cleaning of
nameservers as well as adding default Google DNS (IPv4 only vs. IPv4
and IPv6 if IPv6 enabled).  For all these changes, tests have been
added/strengthened to test these additional capabilities.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 93d51e5e971e001d80e9ffa863439f2d72215b5a
Component: engine
2015-01-19 19:35:55 -05:00
1d078b8407 Merge pull request #9730 from cpuguy83/9709_fix_volumes_from_missing_container
Fix volumes-from re-applying on each start
Upstream-commit: 9b4cd01b21a2553c46d5735d827d7b0f570e6cad
Component: engine
2015-01-19 14:00:53 -08:00
5d2fe159f4 Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 9ab73260f8e4662e7321b257c636928892f023cf
Component: engine
2015-01-19 08:00:32 -08:00
c909cbb34a LXC needs stdin for container to remain up
To run shell(and not exit), lxc needs STDIN. Without STDIN open, it will exit 0.
Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: 79f17dcf7404d0547db68dba8b629c9c1141e47b
Component: engine
2015-01-18 04:07:20 +00:00
7319c01771 Fix volumes-from re-applying on each start
Fixes #9709
In cases where the volumes-from container is removed and the consuming
container is restarted, docker was trying to re-apply volumes from that
now missing container, which is uneccessary since the volumes are
already applied.

Also cleaned up the volumes-from parsing function, which was doing way more than
it should have been.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a738df0354cc615c8d0fa3254621b3db811fe0b9
Component: engine
2015-01-17 07:14:25 -05:00
807f07b041 SEND CAPABILITY IDS TO LXC
Sending capability ids instead of capability names ot LXC for --cap-add and --cap-drop.
Also fixed tests.

Docker-DCO-1.1-Signed-off-by: Abin Shahab <ashahab@altiscale.com> (github: ashahab-altiscale)
Upstream-commit: bff3509e431ce6d68e2accbb842c99d4abe86e05
Component: engine
2015-01-17 04:01:52 +00:00
2a3eb3ae39 Merge pull request #10093 from crosbymichael/readonly-containers
Add --read-only for read only container rootfs
Upstream-commit: 95c0f07966035ce79c6b51a2eee8c60c59fb523c
Component: engine
2015-01-14 15:56:51 -08:00
2ef8faf6e3 Add --readonly for read only container rootfs
Add a --readonly flag to allow the container's root filesystem to be
mounted as readonly.  This can be used in combination with volumes to
force a container's process to only write to locations that will be
persisted.  This is useful in many cases where the admin controls where
they would like developers to write files and error on any other
locations.

Closes #7923
Closes #8752

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 409407091a7282d0c4086b71e86397e2d089ba13
Component: engine
2015-01-14 15:41:31 -08:00
8b29f19b21 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a75b02fe72f3da73f9788919ff2c22f183978db7
Component: engine
2015-01-14 14:12:03 -08:00
4bfc5b4983 Merge pull request #10056 from coolljt0725/add_link_accept_ID
Add --link accept container ID
Upstream-commit: 37b69408f84d970322e8620b6360bde70974e4b6
Component: engine
2015-01-14 12:50:10 -08:00
2df21c5a26 Merge pull request #10072 from LK4D4/fix_mutable_net_files
Rewrite TestRunMutableNetworkFiles to avoid races
Upstream-commit: 95fea08f7adabfb1b21a7716e36d8aeda51a37a1
Component: engine
2015-01-14 11:48:46 -08:00
1220f4f0e6 Merge pull request #10075 from LK4D4/test_for_maxcount
Test for restarting count
Upstream-commit: 5136b11514b4d891334c06a0692c5deeecfd5b32
Component: engine
2015-01-14 09:17:02 -08:00
65bf9de1e2 Add tests for --link
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2292167b02ce0489d38e0a6beeb792bcb7534f34
Component: engine
2015-01-14 15:25:58 +08:00
a01afb0b92 Test for restarting count
This test is for #10058
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 79d30364c95f13b9ff2ce3b4df9bb70d2ddd41f0
Component: engine
2015-01-13 20:28:44 -08:00
24529f4dc7 Add test for --pid=host
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 15e8f3fdd31dc498be106a69a7e29ba459c36c1a
Component: engine
2015-01-13 16:39:08 -08:00
6643773793 Rewrite TestRunMutableNetworkFiles to avoid races
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 492b18ac08e2652c1b95fd9f3c786e1fb1f28c3a
Component: engine
2015-01-13 14:14:36 -08:00
d6590e04a1 Test case for error code when exiting on OOM
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 9a9339d9a23e0005b769bd2f44c722c4a6be730f
Component: engine
2015-01-12 23:16:28 -08:00
8404235dd8 Merge pull request #9648 from estesp/9202-update-resolvconf
Update container resolv.conf when host network changes /etc/resolv.conf
Upstream-commit: 92af1f014520b4f75a6220478b01ed6a02ca5bfb
Component: engine
2015-01-08 14:06:55 -08:00
ae1406d798 Update container resolv.conf when host network changes /etc/resolv.conf
Only modifies non-running containers resolv.conf bind mount, and only if
the container has an unmodified resolv.conf compared to its contents at
container start time (so we don't overwrite manual/automated changes
within the container runtime). For containers which are running when
the host resolv.conf changes, the update will only be applied to the
container version of resolv.conf when the container is "bounced" down
and back up (e.g. stop/start or restart)

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 63a7ccdd2372d87f56f7a86da07c72ea51332c2a
Component: engine
2015-01-08 14:15:13 -05:00
986d8f11d2 add ability to publish range of ports
Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 2338a9cf5a1ba5576b92e49065335a9c9251ade0
Component: engine
2015-01-02 23:21:26 +00:00
3e645815a0 Rewrite TestRunNetHost to compare namespaces
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: e98c08a88fb5f3eedde158a3647a731c31bd4faa
Component: engine
2014-12-29 13:10:30 -08:00
94c4f7ea4b Fix done messages and error message for ipc tests
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 74ee405a27b19f2d91caaf50029cea3b13ddcaf2
Component: engine
2014-12-29 13:10:16 -08:00
6ef319bb81 Test for host networking
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 732c94a502cbda9a60d76e7af83c0569e919cdb9
Component: engine
2014-12-26 21:04:27 -08:00
2ef01256f0 Add test for non local mac address.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 98d5720594d275071f43fbf90daf5fcd1166df8b
Component: engine
2014-12-26 10:22:14 -08:00
5364411768 Merge pull request #7003 from porjo/6034-fowardChain
Move per-container forward rules to DOCKER chain
Upstream-commit: 04117e4021da9d7fcd376b345074b84ebbd4f0ce
Component: engine
2014-12-22 14:40:42 -08:00
4b105a7583 Create tests for pkg/iptables
Docker-DCO-1.1-Signed-off-by: Ian Bishop <ianbishop@pace7.com> (github: porjo)
Upstream-commit: 0da92633b4161ed1f8babe5ec4a9fe98257d34b5
Component: engine
2014-12-21 12:57:32 +10:00
e61e114873 Enable test-integration-cli for Windows platform
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: f3ed42286e7df3a35ca41a4d19fab2a53a08b382
Component: engine
2014-12-20 16:40:40 -08:00
6b6aa4bf22 Merge pull request #9643 from LK4D4/fix_vet_errors
Fix vet errors
Upstream-commit: 17cacf3326edde6d177e12132f74fc0174bda1d2
Component: engine
2014-12-16 12:04:15 -08:00
d89ea8b641 Fix missing logDone for TestRunMutableNetworkFiles
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 03bdacbb4e4bf2fabf67bfdb8b5118bc7ed1edd2
Component: engine
2014-12-15 13:44:22 -08:00
bebcb13002 Fix vet errors about formatting directives
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a7ae7fed7311551975d2bccb7417c328be3ea478
Component: engine
2014-12-12 10:58:56 -08:00
1d39a69298 Forbid client piping to tty enabled container
Forbid `docker run -t` with a redirected stdin (such as `echo test |
docker run -ti busybox cat`). Forbid `docker exec -t` with a redirected
stdin. Forbid `docker attach` with a redirect stdin toward a tty enabled
container.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 67e3ddb75ff27b8de0022e330413b4308ec5b010
Component: engine
2014-12-09 14:30:49 -08:00
9254581bd3 Try other port on any error from Map
Sometimes other programs can bind on ports from our range, so we just
skip this ports on allocation.

Fixes #9293
Probably fixes #8714

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a00a1a1fca020d21cb677439160e018bda5c3835
Component: engine
2014-12-01 16:26:30 -08:00
cd036c2490 Increase memory limit in test cases
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
Upstream-commit: 64fd3e89c7f6164b5522b5e611e7daf4a2bdae9c
Component: engine
2014-11-27 03:22:16 +09:00
8137d7940d Break some routines out of the mutable files test for future use
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 20575d20bad60172b9d1f40c9fe357b7c069f466
Component: engine
2014-11-25 16:46:09 -08:00
09af87d0eb remove deprecated cmd function in integration-cli
Remove deprecated cmd function in integration-cli
and change cmd to dockerCmd in all test files

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 7fbbd515b1018721e91199960d1933383a8262a1
Component: engine
2014-11-25 00:32:38 +09:00
8d3c39cea7 Merge pull request #9261 from unclejack/fix_test_tmp_cleanup
fix cleanup of /tmp in tests
Upstream-commit: 0f2de5158fe66b4906de176f90e3e6d813336450
Component: engine
2014-11-21 08:48:04 -08:00