Commit graph

753 commits

Author SHA1 Message Date
Jessica Frazelle
dbe6c6651e cleanup resolve.conf code
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-08 15:15:51 -07:00
Michael Crosby
0486bd022e Merge pull request #8450 from dqminh/fix-proxy-exit
dont close proxy's stdout/stderr prematurely
2014-10-08 14:20:33 -07:00
Brian Goff
c985302c5c 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>
2014-10-08 16:25:51 -04:00
Daniel, Dao Quang Minh
3b9d88210e 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)
2014-10-08 12:53:43 -04:00
Jessica Frazelle
acd511786e 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)
2014-10-07 16:51:51 -07:00
Alexandr Morozov
a650ab7f29 Merge pull request #8409 from unclejack/integcli_lint
integcli: lint fixes
2014-10-06 14:32:08 -07:00
unclejack
c0e632246d integcli: lint fixes
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-10-06 23:15:17 +03:00
Brian Goff
e95b6fb648 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>
2014-10-06 14:21:46 -04:00
Andrea Luzzardi
84d9fd37b0 Merge pull request #8392 from jfrazelle/pr_8389
Invalid mount mode for volumes in
2014-10-03 17:22:21 -07:00
Jessica Frazelle
b10b458b6e 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)
2014-10-03 16:17:51 -07:00
Brian Goff
007b4f6340 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)
2014-10-03 16:55:39 -04:00
Andrea Luzzardi
b669025949 Stable MAC addresses: Add support for MAC address restoring.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-03 13:46:24 -07:00
Andrea Luzzardi
a487593729 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>
2014-10-03 13:46:24 -07:00
Brian Goff
882223c0f8 Fix #8259 - Can't reuse symlink'd bindmount
volumes.Get was not checking for symlinked paths meanwhile when adding a
new volume it was following the symlink.
So when trying to use a bind-mount that is a symlink, the volume is
added with the correct path, but when another container tries to use the
same volume it got a "Volume exists" error because volumes.Get returned
nil and as such attempted to create a new volume.

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-26 14:36:44 -04:00
Michael Crosby
0bb5f98731 Merge pull request #8233 from tiborvass/pr-7658
Fix Interactive container hangs when redirecting stdout
2014-09-26 11:31:29 -07:00
Tibor Vass
29a62ceefc Add DockerCli tests
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-25 20:58:43 +02:00
Victor Vieux
857b739e29 Merge pull request #8208 from estesp/7851-fix-hostname-fqdn
Provide full hostname with domainname to underlying container layer
2014-09-25 11:33:50 -07:00
Phil Estes
5239ba3d06 Provide full hostname with domainname to underlying container layer
Addresses #7851

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2014-09-25 09:23:39 -04:00
unclejack
f2fad5c290 Merge pull request #8173 from crosbymichael/update-mem-limit
Update memory limit for container
2014-09-24 20:55:25 +03:00
Michael Crosby
9b755412ab Update memory limit for container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-09-22 21:41:14 +00:00
Alexandr Morozov
652cd6a842 Test on execdriver dir behavior
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-22 22:49:21 +04:00
Brian Goff
45407cf00a Split volumes out from daemon
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-19 17:47:47 -05:00
Alexandr Morozov
aa536b27a7 Use prefix naming for docker_cli_run_test.go
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-09-19 21:56:24 +04:00
Jessica Frazelle
42dafe4bd8 test for panic on daemon restart
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-18 21:54:42 +00:00
Tim Hockin
68e48b65a6 Allow extra lines in /etc/hosts
This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
2014-09-16 23:38:23 +00:00
Brian Goff
0a3211f131 Fix #7792 - Order mounts
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-09-16 14:51:06 -07:00
Alexandr Morozov
00fd008170 Merge pull request #8062 from vishh/run_in_phase2
Add support for 'docker exec' - phase 2
2014-09-16 23:56:12 +04:00
Vishnu Kannan
d980589de6 Adding integration tests for docker exec feature.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-09-15 16:59:59 +00:00
Erik Hollensbe
09b700288e Allow /etc/hosts and /etc/resolv.conf to be updated both outside and
inside the container.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-13 11:27:34 -07:00
Michael Crosby
a96811272a Merge pull request #7934 from LK4D4/fix_double_allocation
Fix error propagation from userland-proxy
2014-09-12 11:39:10 -07:00
unclejack
3ec564bfda integ-cli: better debug output for run & import
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-12 16:51:21 +03:00
Alexandr Morozov
41e9e93e27 Fix my own comments from #7927
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-12 10:05:07 +04:00
Tibor Vass
3109fc9537 Add Test for port allocation bug (port already in use by other programs than docker)
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2014-09-12 09:51:14 +04:00
Alexandr Morozov
2e7cf6b0ce Deallocate port before trying to delete iptables chain
Fixes #7954
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-10 00:40:46 +04:00
unclejack
05a76477e6 integ-cli: increase verbosity for mem & cpu test
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-09-08 20:46:45 +03:00
Alexandr Morozov
ba24820284 Don't initialize network for 'none' mode
Fixes #7837

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-04 09:50:58 +04:00
Michael Crosby
c0a5ec75c5 Add more error info to TestDockerRunEchoStdoutWithMemoryLimit
This test fails on my CI server often so we need more info when it does
happen with this test.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-09-01 17:09:52 -07:00
Alexandr Morozov
195cee9983
Move TestRunCidFileCheckIDLength to integration-cli
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-01 20:15:20 +04:00
Alexandr Morozov
8892320835
Move TestRunCidFileCleanupIfEmpty to integration-cli
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-09-01 19:55:39 +04:00
Alexandr Morozov
3c984a6d15
Add logDone logs where it's missing
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-28 09:25:57 +04:00
Michael Crosby
2a5e29adc6 Merge pull request #7677 from erikh/update_hosts_linked_containers
Update /etc/hosts when linked container is restarted
2014-08-27 19:54:09 -07:00
Michael Crosby
77eefbc688 Merge pull request #7672 from cpuguy83/cleanup_volumes_from
Cleanup: applyVolumesFrom
2014-08-27 19:43:16 -07:00
Victor Vieux
450740c891 Update /etc/hosts when linked container is restarted
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-08-27 18:23:41 -07:00
Victor Vieux
5b27fbc0e2 move TestEntrypoint & TestBindMounts
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-08-28 00:25:10 +00:00
Brian Goff
7495fbc0e3 Cleanup: applyVolumesFrom
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-08-26 20:52:58 -04:00
Alexandr Morozov
17b95ecb08
Handle error from GetDevice early
Also more verbose error.

Fixes panic from #7701

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-24 14:09:30 +04:00
Victor Vieux
fc39f9c78d add tests
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-08-19 17:06:17 +00:00
Alexandr Morozov
c19e0fe7e2
Move TestRunExit to integration-cli
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-12 13:40:14 +04:00
Alexandr Morozov
a44f065f17
Move TestRunWorkdirExistsAndIsFile to integration-cli
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-12 12:22:25 +04:00
Michael Crosby
01022a305d Merge pull request #7405 from LK4D4/indicate_run_volume_test_pass
Print about "copy volume content" test passing
2014-08-07 15:09:41 -07:00