Commit Graph

7456 Commits

Author SHA1 Message Date
Michael Crosby 8b450a93b8 Remove driver wide mount label for dm
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-03 06:34:57 +00:00
Michael Crosby e2779e11db Remove runtime options from config
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-03 04:40:38 +00:00
Sven Dowideit 24e8b1b834 Merge pull request #4924 from msabramo/move_installmirrors_anchor_in_docs
Move installmirrors anchor in doc
2014-04-03 12:48:01 +10:00
Sven Dowideit e8cb65b3cc Merge pull request #4972 from unclejack/document_a_flag
docs: explain what docker run -a does
2014-04-03 10:23:39 +10:00
Victor Vieux 9687c087ab Merge pull request #4953 from rhatdan/selinux
These two patches should fix problems we see with running docker in the wild.
2014-04-02 16:36:41 -07:00
Michael Crosby 9cc7eb4ab3 Merge pull request #3971 from creack/fix_add_ownership
Change ownership to root for ADD file/directory
2014-04-02 12:22:09 -07:00
Tianon Gravi 8aa3dc681d Merge pull request #4965 from tianon/update-makefile
Update Makefile with several improvements
2014-04-02 12:03:12 -06:00
unclejack 3e68d36485 Merge pull request #4951 from alexlarsson/dm-fix-deadlock
Fix AB-BA deadlock in devicemapper backend
2014-04-02 20:58:09 +03:00
unclejack b5caa5053a Merge pull request #4779 from vieux/symlink_mtab
symlink /etc/mtab and /proc/mounts
2014-04-02 20:57:04 +03:00
Michael Crosby 94233a204f Fix lxc label handleing
This also improves the logic around formatting the labels for selinux
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-02 16:52:49 +00:00
Michael Crosby 6e7a93628b Merge branch 'selinux' of https://github.com/rhatdan/docker into rhatdan-selinux
Conflicts:
	pkg/selinux/selinux.go
	runtime/execdriver/lxc/lxc_template.go

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-02 16:11:35 +00:00
Dan Walsh ca4224762b Fix SELinux issue with missing Contexts in lxc execdriver
There is a bug in the SELinux patch for the lxc execdriver, that
causes lxc containers to blow up whether or not SELinux is enabled.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-04-03 09:45:40 -04:00
Dan Walsh d76ac4d429 In certain cases, setting the process label will not happen.
When the code attempts to set the ProcessLabel, it checks if SELinux Is
enabled.  We have seen a case with some of our patches where the code
is fooled by the container to think that SELinux is not enabled.  Calling
label.Init before setting up the rest of the container, tells the library that
SELinux is enabled and everything works fine.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-04-03 09:32:29 -04:00
Dan Walsh 32ad78b043 Remove hard coding of SELinux labels on systems without proper selinux policy.
If a system is configured for SELinux but does not know about docker or
containers, then we want the transitions of the policy to work.  Hard coding
the labels causes docker to break on older Fedora and RHEL systems

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-04-03 09:32:29 -04:00
unclejack 63c7941172 docs: explain what docker run -a does
This adds a bit of documentation for the `-a` flag for docker run.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-04-02 16:23:01 +03:00
Michael Crosby a9d6eef238 Remove racy test causing tests to stall
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-02 13:22:51 +00:00
Michael Crosby 18ef3cc24a Remove loopback setup for native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-02 13:12:52 +00:00
Michael Crosby f80fd5da09 Fix configuration test for MKNOD
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-04-02 13:07:11 +00:00
James Turnbull 440562511e Merge pull request #4966 from SvenDowideit/add-kernel-version-info
add RHEL6 kernel version, and a 3.8 hint to the binaries doc
2014-04-02 08:56:17 -04:00
Guillaume J. Charmes 3b3f4bf052
Return correct exit code upon signal + SIGQUIT now quits without cleanup
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-02 05:56:11 -07:00
Tianon Gravi aec989bd08 Add more color and cgroupfs hierarchy verification to check-config.sh
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-02 02:44:12 -06:00
Tianon Gravi 506055d973 Merge pull request #4853 from pjz/bash_completion
Include completion scripts in ubuntu/debian package
2014-04-02 01:40:24 -06:00
Alexander Larsson 2ffef1b7eb devmapper: Avoid AB-BA deadlock
We currently drop the global lock while holding a per-device lock when
waiting for device removal, and then we re-aquire it when the sleep is done.
This is causing a AB-BA deadlock if anyone at the same time tries to do any
operation on that device like this:

thread A:             thread B
grabs global lock
grabs device lock
releases global lock
sleeps
                      grabs global lock
                      blocks on device lock
wakes up
blocks on global lock

To trigger this you can for instance do:

ID=`docker run -d fedora sleep 5`
cd /var/lib/docker/devicemapper/mnt/$ID
docker wait $ID
docker rm $ID &
docker rm $ID

The unmount will fail due to the mount being busy thus causing the
timeout and the second rm will then trigger the deadlock.

We fix this by adding a lock ordering such that the device locks
are always grabbed before the global lock. This is safe since the
device lookups now have a separate lock.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson 70826e8b3f devmapper: Add lock to protext Devices map
Currently access to the Devices map is serialized by the main
DeviceSet lock, but we need to access it outside that lock, so we
add a separate lock for this and grab that everywhere we modify
or read the map.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson e01b71cebe devmapper: Add lookupDevice() helper
This centralizes the lookup of devices so it is only done in one place.
This will be needed later when we change the locking for it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson 74edcaf1e8 devmapper: Pass info rather than hash to setInitialized
We already have this at the caller, no need to look up again.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson 5955846774 devmapper: Pass info rather than hash to deactivateDevice()
We already have the info in most cases, no need to look this up multiple times.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson 8e39b35c7c devmapper: Pass info rather than hash to deleteDevice
All the callers already have the info, no need for an extra lookup.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Alexander Larsson e5394e35c7 devmapper: Pass info rather than hash to activateDeviceIfNeeded
There is no need to look this up again, we have it already in all callers.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-02 09:05:00 +02:00
Sven Dowideit 2b64453adb add RHEL6 kernel version, and a 3.8 hint to the binaries doc
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-04-02 16:52:07 +10:00
Tianon Gravi b51fe17833 Update Makefile with several improvements
Especially but not limited to:
- make BINDDIR= ... - for when you don't want a bind mount at all
- make DOCSPORT=9000 docs - for when you want a not-8000 docs port
- when we can't determine a branch name, we don't try to "docker build -t docker: ." anymore - we just "docker build -t docker ." (thus allowing Docker to assume ":latest")

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-01 22:43:38 -06:00
Victor Vieux 93bb208164 Merge pull request #4961 from creack/update_version_pkg
Update Version to not use string anymore
2014-04-01 18:37:25 -07:00
Michael Crosby b4c8232b95 Merge pull request #4964 from creack/add_api_version
Add API version to `docker version`
2014-04-01 18:36:18 -07:00
Victor Vieux d7ec39a4cf <3
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-04-02 01:19:26 +00:00
Guillaume J. Charmes b246fc33ae
Add API version to `docker version`
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-01 17:30:19 -07:00
Guillaume J. Charmes 8ff02d58d9 Merge pull request #4963 from tianon/check-config
Add basic initial "check-config" script to contrib
2014-04-01 16:51:32 -07:00
Victor Vieux 431046e0f5 Merge pull request #4902 from shykes/wozniak_is_not_boring
Steve Wozniak is not boring.
2014-04-01 16:49:56 -07:00
unclejack ceed9382d0 Merge pull request #4931 from crosbymichael/gen-mac-addr-for-bridge
Set bridge mac addr on supported kernels
2014-04-02 02:47:56 +03:00
Tianon Gravi 9c0c4aeda4 Add basic initial "check-config" script to contrib
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-04-01 17:42:54 -06:00
Sven Dowideit 8cc8b1dd99 Merge pull request #4938 from jlhawn/master
No longer expose gravatar_email in docker.io api
2014-04-02 09:13:33 +10:00
unclejack 30ff3fa954 Merge pull request #4867 from crosbymichael/clean-shutdown
Cleanly shutdown docker
2014-04-02 01:48:03 +03:00
Guillaume J. Charmes 3ee37f547f
Update Version to not use string anymore
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-01 15:46:52 -07:00
Michael Crosby 9cf89f8542 Merge pull request #4942 from vieux/cleanup_dev_libcontainer
remove setupDev from libcontainer
2014-04-01 14:28:17 -07:00
Guillaume J. Charmes 026aebdebb
Change ownership to root for ADD file/directory
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
2014-04-01 14:17:31 -07:00
Victor Vieux 79c0ca81fc Merge pull request #4958 from crosbymichael/update-port-tests
Update test to reallocate port
2014-04-01 14:15:36 -07:00
Victor Vieux dcf2b72f5b add test
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-04-01 21:07:40 +00:00
Guillaume J. Charmes 7462cc6479 Merge pull request #4949 from tjmehta/4908-fix_dynamic_port_allocation_limit
Fix dynamic port allocation limit
2014-04-01 13:49:21 -07:00
Guillaume J. Charmes b4b87413d8 Merge pull request #4833 from crosbymichael/pluginflag
Add opts flag for fine grained control over drivers
2014-04-01 13:34:08 -07:00
Michael Crosby 3178723341 Merge pull request #4956 from tianon/sig
Simplify the kill "SIG" prefix stripping code
2014-04-01 13:10:16 -07:00
Victor Vieux e175a55eb9 Merge pull request #4948 from creack/push_single_tag
Allow push of a single tag
2014-04-01 12:54:15 -07:00