Commit graph

889 commits

Author SHA1 Message Date
Jessie Frazelle
f1bc0376b8 Merge pull request #10254 from LK4D4/fix_etchosts_rewriting
Fix etchosts rewriting
2015-01-21 15:08:45 -08:00
Alexander Morozov
c2a25058e8 Update links aliases, not name on restart
Fixes #8721

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-21 14:34:27 -08:00
Michael Crosby
b8fe989b9b Merge pull request #10187 from jfrazelle/update-skip-graphtest
update graphtest
2015-01-21 14:09:16 -08:00
Brian Goff
811b138f7e Fix call to nil stat
Fixes #10242

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-01-21 14:25:35 -05:00
Michael Crosby
4b173199fd Exit cli when all containers when no more containers to monitor
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-21 08:55:23 -08: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
2f46b7601a Add pubsub package to handle robust publisher
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
2d4fc1de05 Refactor usage calc for CPU and system usage
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
4f174aa792 Evict stopped containers
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
2640a10bca Implement client side display for stats
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
65f58e2a74 Implement container stats collection in daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-20 20:21:46 -08:00
Michael Crosby
cac17f990b Merge pull request #10205 from ashahab-altiscale/9875-non-privileged-proc-sys
use lxc.auto.mount to ensure proc and sys are readonly
2015-01-20 17:54:56 -08:00
Vincent Batts
9b2afa04f8 Merge pull request #10222 from vbatts/vbatts-dm_flag_and_output
dm flag and output
2015-01-20 18:45:43 -05: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
Vincent Batts
fa7af79885 Merge pull request #10193 from vbatts/vbatts-dm_logging
devmapper: initialize log levels
2015-01-20 14:06:01 -05:00
Vincent Batts
0c8be9da37 devmapper: initialize log levels
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-20 13:31:19 -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
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
Vincent Batts
a09a665d99 devmapper: some explination of docker info
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-01-19 17:37:08 -05:00
Vincent Batts
4cfe9df0a9 devicemapper: debug output specifics
moar information for the information gods

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 17:21:10 -05:00
unclejack
2d61a62378 Merge pull request #10195 from vbatts/vbatts-dm_udev_sync
device-mapper udev sync
2015-01-20 00:06:29 +02: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
Vincent Batts
d2593546f9 devmapper: udev sync in docker info
now:

```
[...]
Storage Driver: devicemapper
 Pool Name: docker-253:2-5767172-pool
 [...]
 Udev Sync Supported: true
[...]
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 16:28:02 -05:00
Vincent Batts
022e1232f8 devmapper: udev sync on init
when initializing the devmapper driver, attempt to sync udev and device
mapper. If udev sync is not supported, print a warning. Eventually we'll
likely bail here to avoid unpredictable behavior for users.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-19 15:57:25 -05: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
Jessica Frazelle
f0d79c021d Update graphtest so when overlay is tried over a non-supported backing
filesystem it will skip.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-19 10:28:57 -08:00
Abin Shahab
d821c63e0d use lxc.auto.mount to ensure proc and sys are readonly
Set lxc.auto.mount = proc:mixed in unprivilged mode. This ensures that lxc mounts sys and proc/sysrq-trigger as readonly.
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-18 09:27:16 +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
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
Phil Estes
48b1dd0084 Add backing filesystem info to docker info command where applicable
Fixes #9960

This adds the output of a "Backing Filesystem:" entry to `docker info`
to overlay, aufs, and devicemapper graphdrivers. The default list
includes a fairly complete list of common filesystem names from
linux/include/uapi/linux/magic.h, but if the backing filesystem is not
recognized, the code will simply show "<unknown>"

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2015-01-16 14:43:43 -05:00
Derek McGowan
8ceb9d20d6 Update push to sign with the daemon's key when no manifest is given
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-15 14:05:06 -08:00
Jessica Frazelle
f88066fd43 ignore vfs from warning
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2015-01-14 17:28:50 -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
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
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
Alexander Morozov
bb96e53b0f Fix vet error about passing Mutex by value
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:03:00 -08:00
Alexander Morozov
5ce60217f1 Calming vet about type aliases from other package
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-01-14 14:01:36 -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
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
Michael Crosby
23b48fbe14 Merge pull request #10079 from tonistiigi/fix-attach-stdin
Fix attach stream closing issues
2015-01-13 16:40:42 -08:00
Dan Walsh
23feaaa240 Allow the container to share the PID namespace with the host
We want to be able to use container without the PID namespace.  We basically
want containers that can manage the host os, which I call Super Privileged
Containers.  We eventually would like to get to the point where the only
namespace we use is the MNT namespace to bring the Apps userspace with it.

By eliminating the PID namespace we can get better communication between the
host and the clients and potentially tools like strace and gdb become easier
to use.  We also see tools like libvirtd running within a container telling
systemd to place a VM in a particular cgroup, we need to have communications of the PID.

I don't see us needing to share PID namespaces between containers, since this
is really what docker exec does.

So currently I see us just needing docker run --pid=host

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-01-13 16:35:17 -08:00
Tonis Tiigi
28cf8fddd4 Fix attach stream closing issues
Fixes: #9860
Fixes: detach and attach tty mode

We never actually need to close container `stdin` after `stdout/stderr` finishes. We only need to close the `stdin` goroutine. In some cases this also means closing `stdin` but that is already controlled by the goroutine itself.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2015-01-14 02:03:25 +02:00
unclejack
044d979f4e Merge pull request #10003 from vbatts/vbatts-dm_loop_file_info
devmapper: show device and loop file , if used
2015-01-14 01:15:09 +02:00
Victor Vieux
ff40126389 Merge pull request #10070 from thaJeztah/change-back-error-message
Mention "or rename" again in error-message.
2015-01-13 14:56:15 -08:00
Alexander Morozov
5862422a49 Merge pull request #10058 from HuKeping/work
restart: Fix the compare of restart policy
2015-01-13 13:38:52 -08:00
Sebastiaan van Stijn
78820a63d6 Mention "or rename" again in error-message.
The "or rename" part was removed from the error-message,
because renaming wasn't possible at the time.

Now that https://github.com/docker/docker/pull/8570 is merged,
renaming existing containers is possible.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-01-13 21:57:48 +01:00