Commit graph

7525 commits

Author SHA1 Message Date
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
Hu Tao
8ec6c692db Remove the assumption that the fist IP is the bridge IP
The assumption is not true if user specifies an IP address other than
the first IP, in that case the first IP address is never allocated to
any container.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
2015-01-21 02:13:58 +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
HuKeping
e721ed9b53 restart: Fix the compare of restart policy
Since the failure count of container will increase by 1 every time it
exits successfully, the compare in function shouldRestart() will stop
container to restart by the last time.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-01-13 13:05:30 +08:00
Srini Brahmaroutu
21a809d9ae rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-01-13 03:27:17 +00:00
Lei Jitang
400d92871c Add --link accept container ID
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-01-13 09:38:12 +08:00
Sebastiaan van Stijn
5f699a465d Fix typo in error-message.
This fixes a small typo in the errormessage for memory-swap.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-01-12 21:48:44 +01:00
Vincent Batts
3ec6959240 Merge pull request #9985 from jfrazelle/fix-exited-filter-should-not-show-running
`docker ps --filter exited=status` should not show running containers
2015-01-12 15:09:22 -05:00
Vincent Batts
e90e754682 Merge pull request #9987 from jfrazelle/fix-filter-status-exited-not-require-all
`docker ps --filter status=exited should not require passing -a`
2015-01-12 15:05:58 -05:00
Michael Crosby
16fe2ac6b2 Merge pull request #9988 from nponeccop/patch-1
FsMagic should avoid sign extension on i686
2015-01-12 12:02:09 -08:00
Alexander Morozov
83ab6237ac Merge pull request #10047 from vbatts/vbatts-graphdriver_driver_put_with_error
graphdriver: change (*Driver).Put signature
2015-01-12 11:42:11 -08:00
Vincent Batts
1c57555285 Merge pull request #10048 from vbatts/vbatts-dm_no_newline
devmapper: remove newline string
2015-01-12 14:26:19 -05:00
Michael Crosby
582a79f00a Update lxc with libcontainer SetupUser change
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-01-12 10:43:33 -08:00
Vincent Batts
2b51d1a167 devmapper: remove newline string
Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-12 13:40:42 -05:00
Vincent Batts
00fd63e558 graphdriver: change (*Driver).Put signature
There are a couple of drivers that swallow errors that may occur in
their Put() implementation.

This changes the signature of (*Driver).Put for all the drivers implemented.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2015-01-12 13:34:35 -05:00
Phil Estes
30eff2720a Properly handle containers which pre-date the resolv.conf update feature
This fixes the container start issue for containers which were started
on a daemon prior to the resolv.conf updater PR. The update code will
now safely ignore these containers (given they don't have a sha256 hash
to compare against) and will not attempt to update the resolv.conf
through their lifetime.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-01-10 00:48:41 -05:00
Vincent Batts
09c033ff87 devmapper: show device and loop file , if used
Presenly the "Data file:" shows either the loopback _file_ or the block device.
With this, the "Data file:" will always show the device, and if it is a
loopback, then there will additionally be a "Data loop file:".
(Same for "Metadata file:")

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-01-09 11:20:07 -05:00