Commit Graph

140 Commits

Author SHA1 Message Date
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
f7e2fcdfb9 Make --tlsverify enable tls regardless of value specified
I also needed to add a mflag.IsSet() function that allows you to check
to see if a certain flag was actually specified on the cmd line.

Per #9221 - also tweaked the docs to fix a typo.

Closes #9221

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ae9bd580af55992974fcb94f73f72cc3b2257fec
Component: engine
2014-11-20 16:09:06 -08:00
9ed67f3c2f integ-cli: fix cleanup in test which mounts tmpfs
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 98307c8faefca5c4347288af18aee4dacbf8802c
Component: engine
2014-11-20 19:37:46 +02:00
21506f31ee Merge pull request #9226 from crosbymichael/container-net-test
Add test for --net container:<id>
Upstream-commit: 739d917d7094db822ecfe927e1e934c3c8ec4047
Component: engine
2014-11-19 17:57:45 -08:00
259b05fa1e Add test for --net container:<id>
This adds an integration test for checking that the network namespace
fds are the same when a container joins another container's network
namespace.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 71209f75791fdc1a2124682f50cd00a413ddb143
Component: engine
2014-11-19 17:43:04 -08:00
865600707c Make sure integration-cli test clean up
Common patterns:
- Multiple images were built with same name but only one cleanup.
- Containers were deleted after images.
- Images not removed after retagging.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: da3d3b97ebe1e6fe1254367521c725ca12a5e61d
Component: engine
2014-11-19 23:41:46 +02:00
40988ed79f Add --log-level support
Next steps, in another PR, would be:
- make all logging go through the logrus stuff
- I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see

Closes #5198

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2facc0467336a80f48c765dbdbd803055a431aa9
Component: engine
2014-11-15 09:00:48 -08:00
09b8238fe6 Allow IPC namespace to be shared between containers or with the host
Some workloads rely on IPC for communications with other processes.  We
would like to split workloads between two container but still allow them
to communicate though shared IPC.

This patch mimics the --net code to allow --ipc=host to not split off
the IPC Namespace.  ipc=container:CONTAINERID to share ipc between containers

If you share IPC between containers, then you need to make sure SELinux labels
match.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 497fc8876ede9924f61c0eee4dfadd71e5d9f537
Component: engine
2014-11-12 11:29:58 -05:00
811492e0cb See #8379 - if the container doesn't start I added code to make sure that if no other processing sets the container.exitCode to a non-zero value when we make sure its done before we return. I also made sure that while trying to start the CMD/ENTRYPOINT, if it fails, then we set the container.exitCode to the exitStatus from the exec().
Closes #8379

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 69a5b827dcf01a6de5949a161606058017014cdc
Component: engine
2014-11-05 18:23:42 -08:00
590a54ca61 enhancing set-macaddress docu
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: 971fc2253af77ae4a22a3741fff51d84cd9bc697
Component: engine
2014-11-03 11:43:27 +01:00
c0897a4514 Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: f2df38050e019c0db265e7c3e38ee0de8948ca77
Component: engine
2014-11-01 15:35:09 +01:00
b972337ce2 adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: fd774a818c7d8942922b4f74eabd2a4e14094e1a
Component: engine
2014-10-31 23:06:30 +00:00
4b66ac1426 Generalize consumeSlow and add stop support
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 417e48e4a00c891e8fe5614ac6a1ef12de951f72
Component: engine
2014-10-30 21:11:33 +02:00
55acba12a1 Move consumeSlow() under test utils
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: 8a81c462722c7158e481f974f628843e7c172158
Component: engine
2014-10-30 20:55:08 +02:00
08749b6912 Merge pull request #8571 from ncdc/3631-stdout-premature-eof
Fix stdout premature EOF
Upstream-commit: f936a10d8048f471d115978472006e1b58a7c67d
Component: engine
2014-10-29 11:36:32 -07:00
546bdc45f6 Merge pull request #8735 from estesp/fix-test-timeout-on-drone
Up test timeout to 10s based on recent drone.io timeout failures
Upstream-commit: 77dcab133c784fa04cd61ddd73661624628be0bf
Component: engine
2014-10-23 13:02:34 -07:00
66fd2e972d Up test timeout to 10s based on recent drone.io timeout failures
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: ee17b93df9ef2150d0ef25e077f1f87637a54508
Component: engine
2014-10-23 14:30:39 -04:00
6a65977701 Fix volume test using "find" to properly call find with /hello path
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 6589044b5b84f82a71a756708b4a77b0bc49db42
Component: engine
2014-10-23 14:13:11 -04:00
cd84666875 TestRunRedirectStdout kept failing with timed out.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 93e17b2ecadc4a409fc55b1460bc2721a4345716
Component: engine
2014-10-22 15:51:14 -07:00
7e904deb7c Fix stdout premature EOF
Never close attached stream before both stdout and stderr have written
all their buffered contents. Remove stdinCloser because it is not needed
any more as the stream is closed anyway after attach has finished.

Fixes #3631

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 5572dbb7504c951f4ddd2710a4037844a95caa6a
Component: engine
2014-10-22 16:34:42 -04:00
13b9038a18 Clean volume paths
Fixes #8659

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 964f9965c75b89f95060c62ba512ed6ceb525992
Component: engine
2014-10-20 19:07:56 -04:00
c9c863328e Don't write pull output to stdout on container creating
Fixes #8632

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: ad136e1ae3175bd30c87ccbde8e31f0e422ff5ec
Component: engine
2014-10-17 11:08:53 -07:00
99346a8e5f Cleanup errorOut resp run tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 66ac7420a90c832bacd0cb1832bf934b5420a311
Component: engine
2014-10-16 15:06:20 -07:00
edf116b62c Replace '%s' in run tests
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c091397d518408a7a9c493f066dc47438d588985
Component: engine
2014-10-14 10:59:19 -07:00
161436147c Disable stable IPs.
Stable IPs causes some regressions in the way people use Docker, see GH#8493.

Reverting it for 1.3, we'll enable it back for the next release.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 5b8379a4349105eb387a4b9836bbd1d83ebe6928
Component: engine
2014-10-09 15:15:17 -07:00
e30e6f7d0c Merge pull request #8457 from jfrazelle/pr_8455
Check /etc/resolv.conf every time for 127.* content
Upstream-commit: 4eb812e042e10e8158161ba7d6236a9ca8044ebe
Component: engine
2014-10-08 16:21:14 -07:00
d83fbbbf57 cleanup resolve.conf code
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: dbe6c6651e744bd6f6cab04fcaed2871779d36a0
Component: engine
2014-10-08 15:15:51 -07:00
939ae48706 Merge pull request #8450 from dqminh/fix-proxy-exit
dont close proxy's stdout/stderr prematurely
Upstream-commit: 0486bd022e7c51b23cc9b4d62b5faaf42ee9a101
Component: engine
2014-10-08 14:20:33 -07:00
a61100d91a Fixes re-creating volume on (re)start
When a container is restarted all the volume configs are parsed again.
Even if the volume was already handled in a previous start it was still
calling "FindOrCreateVolume" on the volume repo causing a new volume to
be created.

This wasn't being detected because as part of the mount initialization
it checks to see if the the _mount_ was already initialized, but this
happens after the parsing of the configs.
So a check is added during parsing to skip a volume which was already
created for that container.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c985302c5c2fb6d922acf29106b550cb36faaab6
Component: engine
2014-10-08 16:25:51 -04:00
3b41fdc9e8 pass extra file to child process as status handler
When stdout/stderr is closed prematurely, the proxy's writes to stdout/stderr
(i.e. `log.Errorf/log.Printf`) will returns with EPIPE error, and go runtime
will terminate the proxy when stdout/stderr writes trigger 10 EPIPE errors.

instead of using stdout/stderr as the status handler, we pass an extra file to
the child process and write `0\n` or `1\nerror message` to it and close it
after. This allow the child process to handle stdout/stderr as normal.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: 3b9d88210e763bebdfd7badb6ed3fd507d0f6513
Component: engine
2014-10-08 12:53:43 -04:00
4b817432e5 Test for check /etc/resolv.conf on every docker run for 127.* content.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: acd511786e5d9d2aa440f4265ed8d4dda149d1cc
Component: engine
2014-10-07 16:51:51 -07:00
3bb92dd8aa Merge pull request #8409 from unclejack/integcli_lint
integcli: lint fixes
Upstream-commit: a650ab7f29ea89d89a1bdee19823ca45fac4d4a4
Component: engine
2014-10-06 14:32:08 -07:00
16206f937c integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: c0e632246d821f3f70ffcf7244cf7a9b336b0344
Component: engine
2014-10-06 23:15:17 +03:00
ba6185d6ef Fix #8398 - volumes copying data unexpectedly
Prior to the volumes re-factor, data was not being copied on
volumes-from or host-mounted volumes.
After the re-factor, data was being copied for volumes-from.
This reverts this unintentional change in behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e95b6fb648ab6301b556192a9730a843fab7209f
Component: engine
2014-10-06 14:21:46 -04:00
505d3e474a Merge pull request #8392 from jfrazelle/pr_8389
Invalid mount mode for volumes in
Upstream-commit: 84d9fd37b05c22a61af2ab86c6783089b456790b
Component: engine
2014-10-03 17:22:21 -07:00
143d6d0145 Add test for invalid mount mode for volumes in.
Closes #8389.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: b10b458b6ef8327268676744a7c3230e33c9baf6
Component: engine
2014-10-03 16:17:51 -07:00
c05ce270f8 Fixes bad validMountMode check
Needed to check if the mode was invalid and return error, not valid and
return error.

This didn't get picked up because the existing integration-cli tests
were all either expecting errors when a valid mode was passed in (e.g.
"ro" passed in, we expected an error because it was testing write).  So
modified a test which was testing for "rw" to actually pass in "rw"
instead of assuming the "rw"

Docker-DCO-1.1-Signed-off-by: Brian Goff <bgoff@cpuguy83-mbp.home> (github: cpuguy83)
Upstream-commit: 007b4f63409c6c642fb075640a8ec7d58825edc8
Component: engine
2014-10-03 16:55:39 -04:00
bad1803f92 Stable MAC addresses: Add support for MAC address restoring.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: b669025949f1dba1ad3af9bab6711736863d6e24
Component: engine
2014-10-03 13:46:24 -07:00
5b30bf9410 Stable Networking: Keep the same network settings across container restarts.
This change will allocate network settings (IP and public ports) at
container creation rather than start and keep them throughout the
lifetime of the container (i.e. until it gets destroyed) instead of
discarding them when the container is stopped.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: a4875937293f3b0a8ffc569608bbca40a456e9c8
Component: engine
2014-10-03 13:46:24 -07:00