Commit Graph

7111 Commits

Author SHA1 Message Date
unclejack 25f7b3fbb7 Merge pull request #4926 from tianon/add-cli-tests-to-default-bundles
Add "test-integration-cli" to our DEFAULT_BUNDLES list (make all)
2014-03-31 21:09:44 +03:00
unclejack b936f4f5e1 Merge pull request #4752 from crosbymichael/fix-volumes-from-files
Allow volumes from to be individual files
2014-03-31 21:07:05 +03:00
Tianon Gravi 2543912e7b Add "test-integration-cli" to our DEFAULT_BUNDLES list (make all)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-31 11:55:55 -06:00
Michael Crosby 28015f8e57 Add integration test for volumes-from as file
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-31 17:42:34 +00:00
Michael Crosby a57900e35f Allow volumes from to be individual files
Fixes #4741
Right now volumes from expected a dir and not a file so when the drivers
 tried to do the bind mount, the destination was a dir, not a file so it
 fails to run.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-31 17:27:38 +00:00
Michael Crosby 7727c817fb Merge pull request #4505 from unclejack/cli_integration_tests
cli integration tests
2014-03-31 10:26:38 -07:00
unclejack 883649ffe7 Merge pull request #4922 from creack/reduce_error_lvl
Reduce error level form harmless errors
2014-03-31 20:05:25 +03:00
Guillaume J. Charmes a2487aa683
Reduce error level form harmless errors
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-31 09:07:56 -07:00
Sven Dowideit c8ae307bab Merge pull request #4900 from WarheadsSE/fix-bip-docs
Fix daemon's documentation for -bip flag
2014-03-30 10:38:36 +10:00
Sven Dowideit eaf2dd0839 Merge pull request #4887 from jameshfisher/nat
Add missing port NAT configuration
2014-03-30 10:28:59 +10:00
Tianon Gravi 3fb1fc0b7b Small tweaks to the hack scripts to make them simpler
Please do with this as you please (including rebasing and/or squashing it), especially under clause (c) of the DCO.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-29 23:09:45 +02:00
unclejack 6db32fdefd initial version of cli integration tests
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-03-29 23:09:40 +02:00
Victor Vieux c705e4a80b Merge pull request #4884 from rhatdan/remount-var-lib-docker
Remount /var/lib/docker as --private to fix scaling issue
2014-03-28 17:15:32 -07:00
Jason Plum 36dfa0c4ec Fix daemon's documentation for -bip flag 2014-03-28 18:02:17 -04:00
James Turnbull 058cc8818a Merge pull request #4862 from jsimonelis/dockerfile_reference_typofix
documentation typo fix -- Dockerfile reference
2014-03-28 16:18:45 -04:00
Justin Simonelis 7d750180e4 Update AUTHORS 2014-03-28 15:15:54 -05:00
Victor Vieux e13b4fd869 Merge pull request #4836 from atlassian/master
Use environmental proxy when doing a ping to the remote repo
2014-03-28 10:24:16 -07:00
Michael Crosby 755cd48258 Merge pull request #4895 from alexlarsson/dm-clean-shutdown
devmapper: Ensure we shut down thin pool cleanly.
2014-03-28 09:49:04 -07:00
Alexander Larsson 66c5e19f9b devmapper: Ensure we shut down thin pool cleanly.
The change in commit a9fa1a13c3
made us only deactivate devices that were mounted. Unfortunately
this made us not deactivate the base device. Which caused
us to not be able to deactivate the pool.

This fixes that by always just deactivating the base device.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-28 15:58:14 +01:00
Dan Walsh 792bb41e52 Remount /var/lib/docker as --private to fix scaling issue
If an admin mounts all file systems as -rshared (Default on RHEL and Fedora)
we see a scaling problem as the number of container increase.

Basically every new container needs to have it new mounts in /var/lib/docker
shared to all other containers, this ends up with us only able to scale to
around 100 containers, before the system slows down.

By simply bind mounting /var/lib/docker on its and then setting it private,
the scaling issue goes away.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-03-28 09:19:21 -04:00
unclejack 5b9c8607d9 Merge pull request #4759 from crosbymichael/comments-in-buildfile
Strip comments before parsing line continuations
2014-03-28 11:16:32 +02:00
unclejack 10b7ae39b9 Merge pull request #4880 from tianon/ignore-down-interfaces
Adjust TestOnlyLoopbackExistsWhenUsingDisableNetworkOption to ignore "DOWN" interfaces
2014-03-28 10:54:11 +02:00
unclejack 0fb8146afa Merge pull request #4889 from crosbymichael/fix-commit-validation
Fix commit and import when no repository is specified
2014-03-28 10:25:21 +02:00
Victor Vieux d2327006d6 Merge pull request #4442 from ibuildthecloud/hairpin-nat
Support hairpin NAT without going through docker server
2014-03-27 18:09:42 -07:00
unclejack 69ba31e17e Merge pull request #4450 from alexlarsson/cgroups-systemd
Add systemd implementation of cgroups
2014-03-28 03:05:02 +02:00
James Harrison Fisher 64dd77fa0e Add missing port NAT configuration
Missing port translation causes last line to fail

Docker-DCO-1.1-Signed-off-by: James Fisher <jameshfisher@gmail.com> (github: jameshfisher)
2014-03-27 23:02:44 +00:00
Guillaume J. Charmes 45b43d85ec Merge pull request #4873 from crosbymichael/add-internal-symlinks
Follow symlinks inside container root for build's ADD
2014-03-27 15:46:48 -07:00
Guillaume J. Charmes d848e2d113 Merge pull request #4871 from crosbymichael/bip-exists
Return error when existing bridge does not match ip
2014-03-27 14:51:21 -07:00
Alexander Larsson 6c7835050e cgroups: Add systemd implementation of cgroups
This implements cgroup.Apply() using the systemd apis.
We create a transient unit called "docker-$id.scope" that contains
the container processes. We also have a way to set unit specific
properties, currently only defining the Slice to put the
scope in.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:31 +01:00
Alexander Larsson 1296d5ce9a Add systemd.SdBooted()
This is a conversion of sd_booted() from libsystemd to go and checks
if the system was booted with systemd.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:31 +01:00
Alexander Larsson cb43fd0071 pkg/systemd: Drop our copy-pasted version of go-systemd/activation
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:31 +01:00
Alexander Larsson d4725801b3 Vendor github.com/godbus/dbus and github.com/coreos/go-systemd
We need this to do systemd API calls.

We also add the static_build tag to make godbus not use
os/user which is problematic for static builds.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 22:44:26 +01:00
Alexander Larsson 9294d7f2af cgroups: Join groups by writing to cgroups.procs, not tasks
cgroups.procs moves all the threads of the process, and "tasks" just
the one thread. I believe there is a risk that we move the main thread,
but then we accidentally fork off one of the other threads if the go
scheduler randomly switched to another thread. So, it seems safer (and
more correct) to use cgroups.procs.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 21:47:47 +01:00
Alexander Larsson 7f7d8419a7 cgroups: Splity out Apply/Cleanup to separate file/interface
This leaves only the generic cgroup helper functions in cgroups.go and
will allow easy implementations of other cgroup managers.

This also wires up the call to Cleanup the cgroup which was missing
before.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 21:47:47 +01:00
Alexander Larsson 7a3070a600 Add --opt arguments for drivers
In order to handle special configuration for different drivers we
make the Config field a map to string array. This lets
us use it for lxc, by using the "lxc" key for those, and we can
later extend it easily for other backend-specific options.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-27 21:47:47 +01:00
Ryan Thomas d6c2188cae Docker-DCO-1.1-Signed-off-by: Ryan Thomas <rthomas@atlassian.com> (github: rthomas) 2014-03-28 06:31:04 +11:00
Tianon Gravi be5c65c2a2 Merge pull request #4613 from tianon/add-cgroupfs-mention-to-packagers
Add mention of mounting cgroupfs properly to PACKAGERS.md
2014-03-27 13:26:31 -06:00
Tianon Gravi 94538fe022 Merge pull request #4865 from creack/fix_fish_completion
Fix fish completion when having alias on awk or grep
2014-03-27 13:07:11 -06:00
Michael Crosby ba9f9b3c92 Merge pull request #4818 from viirya/fix_working_dir_not_dir
fix the problem when setting existing file as working dir
2014-03-27 11:41:18 -07:00
Tianon Gravi db20cb0e1a Merge pull request #4879 from gorsuch/exec-upstart
Use "exec" in the upstart script to let upstart manage the docker process instead of a shell
2014-03-27 12:15:30 -06:00
unclejack 303a954151 Merge pull request #4838 from crosbymichael/btrfs-ftw
Promote btrfs
2014-03-27 19:55:25 +02:00
Michael Gorsuch 73ee4879af upstart: use exec here so upstart can monitor the process and not just a shell
Docker-DCO-1.1-Signed-off-by: Michael Gorsuch <michael.gorsuch@gmail.com> (github: gorsuch)
2014-03-27 12:44:33 -05:00
Tianon Gravi ad3e71d5c7 Adjust TestOnlyLoopbackExistsWhenUsingDisableNetworkOption to ignore "DOWN" interfaces
This fixes the following, which I've been seeing on all my machines for as long as I can remember:

--- FAIL: TestOnlyLoopbackExistsWhenUsingDisableNetworkOption (0.36 seconds)
	container_test.go:1597: Wrong interface count in test container: expected [*: lo], got [1: lo 2: sit0]

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-03-27 11:06:32 -06:00
Tianon Gravi 79e8ef28e4 Merge pull request #4211 from rhatdan/master
Add SELinux support
2014-03-27 10:26:05 -06:00
Michael Crosby 097aef2ca9 Fix commit and import when no repository is specified
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-27 04:24:31 +00:00
Michael Crosby 67af7b3fb0 Strip comments before parsing line continuations
Fixes #3898
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-27 02:41:08 +00:00
Michael Crosby 0fb01fd8fe Follow symlinks inside container root for build's ADD
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-27 02:07:35 +00:00
Dan Walsh 4c43566925 This patch adds SELinux labeling support.
docker will run the process(es) within the container with an SELinux label and will label
all of  the content within the container with mount label.  Any temporary file systems
created within the container need to be mounted with the same mount label.

The user can override the process label by specifying

-Z With a string of space separated options.

-Z "user=unconfined_u role=unconfined_r type=unconfined_t level=s0"

Would cause the process label to run with unconfined_u:unconfined_r:unconfined_t:s0"

By default the processes will run execute within the container as svirt_lxc_net_t.
All of the content in the container as svirt_sandbox_file_t.

The process mcs level is based of the PID of the docker process that is creating the container.

If you run the container in --priv mode, the labeling will be disabled.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-03-26 15:30:40 -04:00
Guillaume J. Charmes ab00619c56 Merge pull request #4855 from unclejack/update_release_v0.9.1
Update master for release 0.9.1
2014-03-26 11:43:13 -07:00
Guillaume J. Charmes e7f3234c1e
Fix fish completion when having alias on awk or grep
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-03-26 09:05:21 -07:00