Commit graph

5512 commits

Author SHA1 Message Date
Alexander Morozov
606c71d424 Test for updating linked hosts on restart
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-21 14:34:40 -08:00
Michael Crosby
edaf23b7a7 Merge pull request #10145 from duglin/Issue10141
Docker run -e FOO should erase FOO if FOO isn't set in client env
2015-01-21 14:16:51 -08:00
Alexander Morozov
f72bcd3362 Merge pull request #10200 from cpuguy83/fix_racey_TestAttachAfterDetach
Fix racey TestAttachAfterDetach
2015-01-21 09:20:24 -08:00
Brian Goff
6ef8057700 Fix racey TestAttachAfterDetach
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-21 10:08:37 -05:00
Abin Shahab
3ca5af6b1a 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)
2015-01-21 06:08:00 +00:00
Michael Crosby
217a2bd1b6 Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby
76141a0077 Add documentation for stats feature
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:47 -08:00
Michael Crosby
5f5e02d22c Merge pull request #10122 from dqminh/execin-wait-cgroup
ExecIn process should wait for the parent signal before forking
2015-01-20 18:02:14 -08:00
Brian Goff
e744b0dcba Fix volume ref restore process
Fixes #9629 #9768

A couple of issues:

1) Volume config is not restored if we couldn't find it with the graph
driver, but bind-mounts would never be found by the graph driver since
they aren't in that dir

2) container volumes were only being restored if they were found in the
volumes repo, but volumes created by old daemons wouldn't be in the
repo until the container is at least started.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-20 15:54:56 -05:00
Tianon Gravi
142369456d Update TestBuildWithTabs to allow for the "\t"-equivalent "\u0009" (for Go 1.3 support)
This is literally the only failing test on Go 1.3.3: 🎉
```
--- FAIL: TestBuildWithTabs (0.43 seconds)
	docker_cli_build_test.go:4307: Missing tabs.
		Got:["/bin/sh","-c","echo\u0009one\u0009\u0009two"]
		Exp:["/bin/sh","-c","echo\tone\t\ttwo"]
```

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-20 12:11:59 -07:00
Daniel, Dao Quang Minh
9462dbb242 test that execin cgroups match container cgroups
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-20 13:51:15 -05:00
Alexander Morozov
e9d3e237e5 Merge pull request #10005 from estesp/fix-localhost-nameserver-cleanup
Clean up localhost resolv logic and add IPv6 support to regexp
2015-01-20 10:30:06 -08:00
Michael Crosby
7b48488c56 Merge pull request #10190 from ashahab-altiscale/9875-lxc-run-links
LXC needs stdin for container to remain up
2015-01-19 17:13:37 -08:00
Phil Estes
93d51e5e97 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)
2015-01-19 19:35:55 -05:00
Tibor Vass
50ff27caa1 Merge pull request #9826 from icecrime/8318_whitespace_add_copy
Support whitespace in paths for ADD and COPY
2015-01-19 18:37:53 -05:00
Jessie Frazelle
9b4cd01b21 Merge pull request #9730 from cpuguy83/9709_fix_volumes_from_missing_container
Fix volumes-from re-applying on each start
2015-01-19 14:00:53 -08:00
Michael Crosby
4c38045be1 Merge pull request #9968 from HuKeping/master
log: Add restart policy name to the inspect information of container
2015-01-19 11:08:32 -08:00
Jessie Frazelle
8b95ad230e Merge pull request #9784 from dmcgowan/v2-registry
Client Support for Docker Registry HTTP API V2
2015-01-19 10:46:38 -08:00
Michael Crosby
979a4cdacd Merge pull request #10152 from ashahab-altiscale/9875-cap-add-all
SEND CAPABILITY IDS TO LXC
2015-01-19 10:46:22 -08:00
Doug Davis
9ab73260f8 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>
2015-01-19 08:00:32 -08:00
Abin Shahab
79f17dcf74 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)
2015-01-18 04:07:20 +00:00
Brian Goff
a738df0354 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>
2015-01-17 07:14:25 -05:00
Brian Goff
b8f7526fc6 Make .dockercfg with json.MarshallIndent
Fixes #10129
Makes the .dockercfg more human parsable.

Also cleaned up the (technically) racey login test.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-17 07:05:56 -05:00
Abin Shahab
bff3509e43 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)
2015-01-17 04:01:52 +00:00
Derek McGowan
f29aacbc48 Fix failing integration tests
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-16 11:34:45 -08:00
HuKeping
c3ed49dcdb restart: add test for recording restart policy name
Add test for recording restart policy name on
- restart=no
- restart=always
- restart=on-failure

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-01-16 17:58:26 +08:00
Arnaud Porterie
92d5eafe03 Test pulling image with aliases
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-15 14:05:06 -08:00
Arnaud Porterie
dbec2317e5 Add some push test coverage
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-15 14:05:06 -08:00
Alexander Morozov
f138f7bd50 Tests for push to registry v2
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-15 14:05:06 -08:00
Alexander Morozov
2fc2862a73 RegistryV2 datastructure for tests
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-15 14:05:06 -08:00
Doug Davis
88905793ad Build CMD/ENTRYPOINT cache strings properly
Make sure that as we build the CMD/ENTRYPOINT cache strings that we don't
treat ["echo","hi"] and ["echo hi"] as the same thing due to the fact that
we're just doing a strcat on the array.

Closes #10097

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-15 12:49:30 -08:00
Jessie Frazelle
eaecf741f0 Merge pull request #10108 from tiborvass/carry-9989
[Carry] Fix a panic where RUN [] would be supplied
2015-01-14 17:12:59 -08:00
Michael Crosby
c126a2303f Merge pull request #10106 from icecrime/win_integration_tests
Fix some Windows integration tests
2015-01-14 17:04:49 -08:00
Victor Vieux
27f69b0777 Merge pull request #10107 from jfrazelle/9328-fix-try-start-paused-container
Error should show when trying to start a paused container.
2015-01-14 17:02:23 -08:00
Erik Hollensbe
39343b8618 Fix a panic where RUN [] would be supplied.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-14 16:55:56 -08:00
Jessica Frazelle
02246d2d9f Error should show when trying to start a paused container.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 16:49:08 -08:00
Arnaud Porterie
e1ef33449f Take DOCKER_TEST_HOST into account
Tests no longer make the assumption that the daemon can be accessed
through unix:///var/run/docker.sock.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-01-14 16:14:27 -08:00
Alexander Morozov
95c0f07966 Merge pull request #10093 from crosbymichael/readonly-containers
Add --read-only for read only container rootfs
2015-01-14 15:56:51 -08:00
Michael Crosby
409407091a 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>
2015-01-14 15:41:31 -08:00
Michael Crosby
3118ccc6bc Merge pull request #10101 from LK4D4/fix_vet_errors
Fix vet errors
2015-01-14 15:18:20 -08:00
Jessica Frazelle
798215af24 Add build constraint.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 14:40:07 -08:00
Alexander Morozov
a75b02fe72 Fix format calls as suggested by vet
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:12:03 -08:00
Victor Vieux
f67c6d313b Merge pull request #10082 from jfrazelle/10081-fix-renaming
Renaming a container with an invalid name should fail
2015-01-14 13:12:36 -08:00
Jessica Frazelle
a92281637f Renaming a container with an invalid name should fail
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 12:54:23 -08:00
Michael Crosby
37b69408f8 Merge pull request #10056 from coolljt0725/add_link_accept_ID
Add --link accept container ID
2015-01-14 12:50:10 -08:00
Jessie Frazelle
95fea08f7a Merge pull request #10072 from LK4D4/fix_mutable_net_files
Rewrite TestRunMutableNetworkFiles to avoid races
2015-01-14 11:48:46 -08:00
Jessie Frazelle
5136b11514 Merge pull request #10075 from LK4D4/test_for_maxcount
Test for restarting count
2015-01-14 09:17:02 -08:00
Lei Jitang
2292167b02 Add tests for --link
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-01-14 15:25:58 +08:00
Alexander Morozov
79d30364c9 Test for restarting count
This test is for #10058
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-13 20:28:44 -08:00
Michael Crosby
47e3da848f Merge pull request #10080 from crosbymichael/pid-ns
Add --pid flag for staying in the host's pid namespace
2015-01-13 17:00:18 -08:00