Commit Graph

528 Commits

Author SHA1 Message Date
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
0bfbaf6019 Cleanup some integration-cli output
I noticed a few things that were bugging me in the output
of the integration-cli tests.
- one of the tests used println to stdout so we had garage sent to the screen
- some of the test, in their final log message, didn't include the name of
  the group/file e.g.  daemon - run,iptables   was just   run,iptables

And yes, I noticed this because I'm anal :-)  but also because we should keep
the output of the tests as clean as possible so its easy to spot it when
things go bad.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0cef21cfba5b06ce7bd5d6b68865a9df0aca95fc
Component: engine
2014-11-11 08:44:32 -08:00
1ddc5019e6 Merge pull request #8726 from krallin/failed-start-breaks-volumes-from
Fix: a failed Start() breaks --volumes-from on subsequent Start()'s
Upstream-commit: 2a517fe103193e09474a4f67b60c09205042261e
Component: engine
2014-11-11 10:49:33 -05:00
8ee09ed8c7 Merge pull request #9014 from LK4D4/fix_parent_failing
Not fail on updating parent links
Upstream-commit: 84f25414c18f726bccac10710f5971f5c5d822cd
Component: engine
2014-11-10 12:53:16 -08:00
0cba5a8261 Merge pull request #8716 from duglin/Issue8331
Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Upstream-commit: 4fcd3dd7488ba779c48557e90598c81c94bf74e4
Component: engine
2014-11-10 13:03:57 -07:00
507970cff9 Fix: Failed Start breaks VolumesFrom
Running parseVolumesFromSpec on all VolumesFrom specs before initialize
any mounts endures that we don't leave container.Volumes in an
inconsistent (partially initialized) if one of out mount groups is not
available (e.g. the container we're trying to mount from does not
exist).

Keeping container.Volumes in a consistent state ensures that next time
we Start() the container, it'll run prepareVolumes() again.

The attached test demonstrates that when a container fails to start due
to a missing container specified in VolumesFrom, it "remembers" a Volume
that worked.

Fixes: #8726

Signed-off-by: Thomas Orozco <thomas@orozco.fr>
Upstream-commit: fb62e184412b6d2bf38975a7051738f05b1f413d
Component: engine
2014-11-10 17:32:16 +01:00
2f7c6a8c08 Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2e482c86bc14ddd4cfa45281dcf8f9ca141c9f14
Component: engine
2014-11-07 13:58:05 -08:00
8f685d0d4a Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: b83fc07d88175c32bb46368a07a9c9e277b22392
Component: engine
2014-11-06 15:30:23 -08:00
951245c785 Merge pull request #8711 from duglin/Issue8160
Add import/pull events to the stream
Upstream-commit: 734419e9c7541286e94f28c90d5ebea3a627aae5
Component: engine
2014-11-06 14:29:02 -08:00
7c60de6972 Add import/pull events to the stream
Closes #8160

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ef7415258ba5195af7a890d1d52214b3a181a379
Component: engine
2014-11-06 12:12:41 -08:00
973d8d4d59 Merge pull request #8977 from LK4D4/vet_fixes
Fix vet errors
Upstream-commit: 546884fd20b0a3e7692f1edf5415b48df65a2e7f
Component: engine
2014-11-06 11:59:05 -08: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
12147a008d Close stdin after execution with docker exec -i
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 165624062e1ac105b6e45beba51cec6439918f11
Component: engine
2014-11-05 15:12:24 -08:00
07c8c2eea7 Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 18d9f1978b311ff9cadce9f0237313db14502f9f
Component: engine
2014-11-05 08:26:22 -08:00
1ce2377d8b Merge pull request #8390 from MalteJ/set-macaddress
Adding docker-cli run param to set MAC address
Upstream-commit: 9eb8fcd58a5dc0a6fd812fc2bdc410f36dd63cc0
Component: engine
2014-11-04 07:54:59 -08:00
9bfa240ca3 Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix
On daemon shutdown iptables cleanup successfully
Upstream-commit: b8ab729ae63e3b21105ee00478995d8d81dc7d3d
Component: engine
2014-11-03 18:29:51 -05:00
d3c1cd34ce Merge pull request #8739 from duglin/CleanupDockerIgnores
Do some cleanup on .dockerignore paths
Upstream-commit: a85f58719f29f76f465747d095c85dbb8ba69d06
Component: engine
2014-11-03 16:05:24 -05:00
b9029ea913 Fix deadlock in ps exited filter
Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 03ea2166b66632ee7cdd824d7acd87b15c9bccb2
Component: engine
2014-11-03 10:51:03 -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
f115554d46 Do some cleanup on .dockerignore paths
While working on the fix for #8330 I noticed a few things:
1 - the split() call for the .dockerignore process will generate a blank
    "exclude".  While this isn't causing an issue right now, I got worried
	that in the future some code later on might interpret "" as something bad,
	like "everything" or ".".  So I added a check for an empty "exclude"
	and skipped it
2 - if someone puts "foo" in their .dockerignore then we'll skip "foo".
    However, if they put "./foo" then we won't due to the painfully
	simplistic logic of go's filepath.Match algorithm.  To help things
	a little (and to treat ./Dockerfile just like Dockerfile) I added
	code to filepath.Clean() each entry in .dockerignore.  It should
	result in the same semantic path but ensure that no matter how the
	user expresses the path, we'll match it.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c0f0f5c9887032c606750b645001829d9f14f47c
Component: engine
2014-11-02 11:29:46 -08: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
72f16e522e Fix panic on slow log consumer.
Fixes #8832

All stdio streams need to finish writing before the
connection can be closed.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: c2cf97a0747976c2307e991028dc703b2b430d80
Component: engine
2014-10-30 22:24:57 +02: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
842e60dcd8 Merge pull request #8046 from vbatts/vbatts-archive_preserve_hard_links
archive: preserve hardlinks in Tar and Untar
Upstream-commit: 73057168fa6f8852c52cdc92f790446da865f2e7
Component: engine
2014-10-29 22:04:23 +02:00
87d83cfa00 archive: preserve hardlinks in Tar and Untar
* integration test for preserving hardlinks

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Upstream-commit: f9f80443638fc2d703ee6205c8ef3db8e38db9a3
Component: engine
2014-10-29 14:52:52 -04: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
6ab2c0d2ce Add test for #8307.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: d98b117962a7178154e775b8b283744841a10e3b
Component: engine
2014-10-29 10:59:20 -07:00
b3f73f86dd builder: Restore /bin/sh handling in CMD when entrypoint is specified with JSON
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 24545c18c35620c211003561dc482d66ee6d0306
Component: engine
2014-10-27 21:50:22 +00:00
8aa0b668bd builder: whitelist verbs useful for environment replacement.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 4e74cd498b66e494b3336118a19c02000b282251
Component: engine
2014-10-27 17:38:25 +00:00
a3019fc24f builder: handle escapes without swallowing all of them.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: be49867cab663b5bdcf7804f3d2504f056db9db1
Component: engine
2014-10-27 17:38:24 +00:00
9609160b54 Merge pull request #8321 from erikh/ui_save_output
docker save: Do not save to a terminal.
Upstream-commit: 350e1b783d4deafbb62ede4d17df37dbaffa373a
Component: engine
2014-10-24 19:37:14 -04:00
bd2b080653 Merge pull request #8744 from erikh/empty_entrypoint_inheritance
builder: some small fixups + fix a bug where empty entrypoints would not override inheritance.
Upstream-commit: c681bea0620d24e9df370147a13a98f94bc66ee0
Component: engine
2014-10-24 15:31:15 -07:00
29e2118279 Merge pull request #8315 from dqminh/save-start-error
Save start error into State.Error when the container fails to start
Upstream-commit: 9094c19a6d69f5adf438463f6a3c19f5dad42bd9
Component: engine
2014-10-24 13:13:00 -07:00
dc1bcb95a0 builder: some small fixups + fix a bug where empty entrypoints would not override inheritance.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: cdd6e97910c50e5766c8bec2121f906e9ee2d119
Component: engine
2014-10-24 00:23:25 +00:00
f5318af0df Merge pull request #8737 from brahmaroutu/resize_uponstart_8728
Allowing resize tty to only work when container is started
Upstream-commit: a71b2ec54ad7b5f809176c023ab22c7e062ad909
Component: engine
2014-10-23 17:20:10 -07:00
d9b4e1dcc3 Allowing resize tty to only work when container is started
Addresses #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 78a272ce14a43f81a79f1b948d5cfd120405f8c9
Component: engine
2014-10-23 21:31:34 +00:00
deaa163ba3 Gracefully handle network bridge without IP association at startup
Addresses #8444

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 1262b5f605e8f897acb2b9ee261edbab7f1f8947
Component: engine
2014-10-23 16:19:12 -04: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
98a7bd658b save start error into State.Error
when a container failed to start, saves the error message into State.Error so
that it can be retrieved when calling `docker inspect` instead of having to
look at the log

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Upstream-commit: fb6ee865a949905f678aa7c7066c809664a8a4aa
Component: engine
2014-10-22 22:42:37 -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
7cf2ccbcaa Merge pull request #8691 from crosbymichael/fix-integration-race
Fix racy integration tests
Upstream-commit: 47cb56f20f65ade23fed1eec8bb9f2645e31300a
Component: engine
2014-10-21 21:06:01 -04:00
4be53dd15f Merge pull request #8661 from estesp/8555-start-exit-code
Return container exit code with start -a/-i
Upstream-commit: 95d1cd0bdead2a1a1d4e70d2f7259d7575761af6
Component: engine
2014-10-21 16:22:15 -07:00
2446634ffa Fix racy integration tests
Do not run containers in the background in the integration tests if you
depend on the run completing.  It is better especially if you just want
to ensure that the run has completed with a `true` to just run in
foreground and use a known name for the container to query it after it
has stopped.

The failures can be reproduced on most machines by giving your dind
container one core and a cpushare.

docker run -c 200 --cpuset 0 -ti --rm --privileged -e
DOCKER_GRAPHDRIVER=vfs docker hack/make.sh binary test-integration-cli

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: ba5370c116e3879c88736d3456586ec5703f581b
Component: engine
2014-10-21 22:51:09 +00:00
4efe32a77f builder: handle cases where onbuild is not uppercase.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: a34831f0168156ded7ecf96a1734c2735fede1ca
Component: engine
2014-10-21 20:17:37 +00:00
f69339516b Merge pull request #8665 from cpuguy83/8659_clean_paths_for_volumes
Clean volume paths
Upstream-commit: cf44d6f9cc8f1a84ea6e3c35a9f2d9b232d08d9b
Component: engine
2014-10-21 11:17:03 -04:00