Commit graph

5698 commits

Author SHA1 Message Date
unclejack
db7fded17f integ-cli: fix cleanup in build tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-20 19:38:41 +02:00
unclejack
98307c8fae integ-cli: fix cleanup in test which mounts tmpfs
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-11-20 19:37:46 +02:00
Arnaud Porterie
7c225333f2 Allocate daemon listening ports
Mark the daemon listening ports as allocated in the portallocator in
order to prevent containers from exposing this port themselves.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-11-19 23:34:27 -08:00
Oh Jinkyun
4deac03c65 Fix for #8777
Now filter name is trimmed and lowercased before evaluation for case
insensitive and whitespace trimemd check.

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
2014-11-20 13:36:46 +09:00
Michael Crosby
739d917d70 Merge pull request #9226 from crosbymichael/container-net-test
Add test for --net container:<id>
2014-11-19 17:57:45 -08:00
Michael Crosby
d4ca9e5cce Merge pull request #9211 from mtesselH/login
Fixed a bug - no panic anymore when logining in without TTY
2014-11-19 17:52:35 -08:00
Michael Crosby
71209f7579 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>
2014-11-19 17:43:04 -08:00
Jessie Frazelle
eb3bbde6d1 Merge pull request #9251 from tonistiigi/use-format-logging-functions
Fix misuses of format based logging functions
2014-11-19 15:25:42 -08:00
Tonis Tiigi
6705477673 Fix misuses of format based logging functions
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-11-19 23:59:02 +02:00
Tonis Tiigi
bbb245defe Fix deleteImages() helper for multiple names
Pass every image name as separate argument.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-11-19 23:42:16 +02:00
Tonis Tiigi
da3d3b97eb 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)
2014-11-19 23:41:46 +02:00
Marianna
e6fd57b90b Fixed a bug - no panic anymore when logining in without TTY
Fixes #8956

Signed-off-by: Marianna <mtesselh@gmail.com>
2014-11-17 19:41:27 -08:00
Michael Crosby
17dfa126ba Merge pull request #9204 from jfrazelle/9056-rmi
Fix for rmi throws error "no such id".
2014-11-17 18:08:52 -08:00
Jessica Frazelle
a0605107d7 Add test for bug (9056) where rmi -f fails with "no such id".
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-11-17 15:12:55 -08:00
Srini Brahmaroutu
91fb9b2f5a Fix the documentation and integration test for container resize
Closes #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-11-17 18:38:08 +00:00
Doug Davis
2facc04673 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>
2014-11-15 09:00:48 -08:00
Brian Goff
7107898d5c Initialize volumes when container is created
Fixes #8942
Current behavior is that volumes aren't initialized until start.
Volumes still need to be initialized on start since VolumesFrom and
Binds can be passed in as part of HostConfig on start, however anything
that's already been initialized will just be skipped as is the current
behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2014-11-14 11:37:03 -05:00
Anthony Baire
b37fdc5dd1 fix missing layers when exporting a full repository
Therer is a bug in the 'skip' decision when exporting a repository
(`docker save repo`)

Only the layers of the first image are included in the archive (the
layers of the next images are missing)

Signed-off-by: Anthony Baire <Anthony.Baire@irisa.fr>
2014-11-14 14:41:35 +01:00
Daniel, Dao Quang Minh
29be7b439e add test for exposing large number of ports
this test checks if exposing a large number of ports in Dockerfile properly
saves the port in configs. We dont actually expose a VERY large number of ports
here because the result is the same and it increases the test time by a few
seconds

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-11-13 13:08:52 -05:00
Dan Walsh
497fc8876e 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)
2014-11-12 11:29:58 -05:00
Daniel, Dao Quang Minh
1e7ba09b60 add a test case for EXPOSE ports order
changing order of EXPOSE ports should not invalidate the cache as the content
doesnt change

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-11-12 09:14:35 -05:00
Doug Davis
0cef21cfba 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>
2014-11-11 08:44:32 -08:00
Tibor Vass
2a517fe103 Merge pull request #8726 from krallin/failed-start-breaks-volumes-from
Fix: a failed Start() breaks --volumes-from on subsequent Start()'s
2014-11-11 10:49:33 -05:00
Michael Crosby
84f25414c1 Merge pull request #9014 from LK4D4/fix_parent_failing
Not fail on updating parent links
2014-11-10 12:53:16 -08:00
Jessie Frazelle
4fcd3dd748 Merge pull request #8716 from duglin/Issue8331
Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
2014-11-10 13:03:57 -07:00
Thomas Orozco
fb62e18441 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>
2014-11-10 17:32:16 +01:00
Doug Davis
2e482c86bc 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>
2014-11-07 13:58:05 -08:00
Alexandr Morozov
b83fc07d88 Not fail on updating parent links
Fixes #8796

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-06 15:30:23 -08:00
Alexandr Morozov
734419e9c7 Merge pull request #8711 from duglin/Issue8160
Add import/pull events to the stream
2014-11-06 14:29:02 -08:00
Doug Davis
ef7415258b Add import/pull events to the stream
Closes #8160

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-06 12:12:41 -08:00
Michael Crosby
546884fd20 Merge pull request #8977 from LK4D4/vet_fixes
Fix vet errors
2014-11-06 11:59:05 -08:00
Doug Davis
69a5b827dc 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>
2014-11-05 18:23:42 -08:00
Erik Hollensbe
165624062e Close stdin after execution with docker exec -i
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-11-05 15:12:24 -08:00
Alexandr Morozov
18d9f1978b Fix vet errors
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-05 08:26:22 -08:00
Alexandr Morozov
9eb8fcd58a Merge pull request #8390 from MalteJ/set-macaddress
Adding docker-cli run param to set MAC address
2014-11-04 07:54:59 -08:00
Tibor Vass
b8ab729ae6 Merge pull request #8590 from jfrazelle/8307-iptables-d-restart-fix
On daemon shutdown iptables cleanup successfully
2014-11-03 18:29:51 -05:00
Tibor Vass
a85f58719f Merge pull request #8739 from duglin/CleanupDockerIgnores
Do some cleanup on .dockerignore paths
2014-11-03 16:05:24 -05:00
Alexandr Morozov
03ea2166b6 Fix deadlock in ps exited filter
Fixes #8909

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-11-03 10:51:03 -08:00
Malte Janduda
971fc2253a enhancing set-macaddress docu
Signed-off-by: Malte Janduda <mail@janduda.net>
2014-11-03 11:43:27 +01:00
Doug Davis
c0f0f5c988 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>
2014-11-02 11:29:46 -08:00
Malte Janduda
f2df38050e Adding docker-cli run param to set MAC address
Signed-off-by: Malte Janduda <mail@janduda.net>
2014-11-01 15:35:09 +01:00
Srini Brahmaroutu
fd774a818c adding support for port ranges on --expose
Closes #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2014-10-31 23:06:30 +00:00
Tonis Tiigi
c2cf97a074 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)
2014-10-30 22:24:57 +02:00
Tonis Tiigi
417e48e4a0 Generalize consumeSlow and add stop support
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-10-30 21:11:33 +02:00
Tonis Tiigi
8a81c46272 Move consumeSlow() under test utils
Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
2014-10-30 20:55:08 +02:00
unclejack
73057168fa Merge pull request #8046 from vbatts/vbatts-archive_preserve_hard_links
archive: preserve hardlinks in Tar and Untar
2014-10-29 22:04:23 +02:00
Vincent Batts
f9f8044363 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>
2014-10-29 14:52:52 -04:00
Jessie Frazelle
f936a10d80 Merge pull request #8571 from ncdc/3631-stdout-premature-eof
Fix stdout premature EOF
2014-10-29 11:36:32 -07:00
Jessica Frazelle
d98b117962 Add test for #8307.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-29 10:59:20 -07:00
Erik Hollensbe
24545c18c3 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)
2014-10-27 21:50:22 +00:00