1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

1781 commits

Author SHA1 Message Date
David Calavera
3a07e7d115 Merge pull request from LK4D4/fix_valid
Fix option validation for log-drivers without it
2015-07-24 09:57:36 -07:00
Alexander Morozov
d68c55bc72 Fix option validation for log-drivers without it
There is no option validation for "journald" log-driver, so it makes no
sense to fail in that case.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-24 09:00:53 -07:00
Tibor Vass
96ce3a194a cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-23 19:44:46 -04:00
Vincent Batts
1e40915e9d Merge pull request from rhvgoyal/unmount-base
docker: Unmount -init layer root before taking a snapshot
2015-07-23 15:17:07 -04:00
Phil Estes
9dcd0cc1ee Merge pull request from Microsoft/10662-stupidtypo
Windows: Stupid copy/paste error
2015-07-23 14:49:17 -04:00
David Calavera
ac9fc03c74 Merge pull request from ewindisch/apparmor-unconfined
Introduce a dedicated unconfined AA policy
2015-07-23 10:21:51 -07:00
John Howard
cef5cb2dcb Windows: Stupid copy/paste error
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-22 19:30:47 -07:00
Brian Goff
d106a2ea2a Merge pull request from stefanberger/nohidevols2
Do not hide user provided network mounts [v2]
2015-07-22 16:24:22 -04:00
David Calavera
1c6fe58efc Merge pull request from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
2015-07-22 11:54:35 -07:00
Brian Goff
19ba7f9e23 Merge pull request from flavio/zfs-initialization-errors
ZFS driver: raise better errors during init
2015-07-22 14:27:46 -04:00
Stefan Berger
6bd389b9db Do not hide user provided network mounts [v2]
Prevent the docker daemon from mounting the created network files over
those provided by the user via -v command line option. This would otherwise
hide the one provide by the user.
The benefit of this is that a user can provide these network files using the
-v command line option and place them in a size-limited filesystem.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
2015-07-22 13:44:21 -04:00
Eric Windisch
87376c3add Introduce a dedicated unconfined AA policy
By using the 'unconfined' policy for privileged
containers, we have inherited the host's apparmor
policies, which really make no sense in the
context of the container's filesystem.

For instance, policies written against
the paths of binaries such as '/usr/sbin/tcpdump'
can be easily circumvented by moving the binary
within the container filesystem.

Fixes GH#5490

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-22 11:28:32 -04:00
Vivek Goyal
fe26669205 docker: Unmount -init layer root before taking a snapshot
When we are creating a container, first we call into graph driver to take
snapshot of image and create root for container-init. Then we write some
files to it and call into graph driver again to create container root
from container-init as base.

Once we have written files to container-init root, we don't unmount it
before taking a snapshot of it. Looks like with XFS it leaves it in such
a state that when we mount the container root, it goes into log recovery
path.

Jul 22 10:24:54 vm2-f22 kernel: XFS (dm-6): Mounting V4 Filesystem
Jul 22 10:24:54 vm2-f22 kernel: XFS (dm-6): Starting recovery (logdev: internal)
Jul 22 10:24:54 vm2-f22 kernel: XFS (dm-6): Ending recovery (logdev: internal)

This should not be required. So let us unmount container-init before use
it  as a base for container root and then XFS does not go into this
internal recovery path.

Somebody had raised this issue for ext4 sometime back and proposed the same
change. I had shot it down at that point of time. I think now time has
come for this change.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-07-22 10:32:53 -04:00
Dan Walsh
4815fdc334 Merge branch 'master' of github.com:docker/docker into error
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-07-22 08:06:19 -04:00
Sebastiaan van Stijn
50d2597e49 Merge pull request from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
2015-07-22 09:02:00 +02:00
Alexander Morozov
30b951ff08 Merge pull request from hqhq/hq_remove_rootuid
Remove unused parameter in NewTtyConsole
2015-07-21 21:37:21 -07:00
Jessie Frazelle
ff011ededb Merge pull request from dave-tucker/golint_nat
golint: Fix issues in pkg/nat
2015-07-21 20:38:40 -07:00
Jessie Frazelle
06162fed8b Merge pull request from runcom/host-config-links-on-start
Allow starting a container with an existing hostConfig which contains links
2015-07-21 20:06:26 -07:00
Jessie Frazelle
5dda570d50 Merge pull request from Microsoft/10662-hookupmac
Windows: Hook up user supplied MAC
2015-07-21 19:55:21 -07:00
Qiang Huang
af3059855c Remove unused parameter in NewTtyConsole
It's introduced in
68ba5f0b69 (Execdriver implementation on new libcontainer API)

But I don't see reson why we need it.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-07-22 10:32:31 +08:00
Brian Goff
d3b3ebc3a4 remove dead code after decoupling from jsonlog
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-21 20:47:35 -04:00
Brian Goff
c0391bf554 Split reader interface from logger interface
Implement new reader interface on jsonfile.
Moves jsonlog decoding from daemon to jsonfile logger.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-07-21 20:47:31 -04:00
Arnaud Porterie
c986f85f73 Merge pull request from jlhawn/archive_copy
docker cp to and from containers
2015-07-21 16:59:44 -07:00
Dave Tucker
15d01d6e6c golint: Fix issues in pkg/nat
Updates 

Signed-off-by: Dave Tucker <dt@docker.com>
2015-07-22 00:47:41 +01:00
David Calavera
36106a20ca Merge pull request from duglin/Issue14621
Remove panic in nat package on invalid hostport
2015-07-21 15:48:51 -07:00
David Calavera
1c3cb2d31e Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 15:33:05 -07:00
John Howard
bd30d27636 Windows: Remove erroneous comment
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-21 14:25:08 -07:00
Antonio Murdaca
65121e5fce Allow starting a container with an existing hostConfig which contains links
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-21 22:10:00 +02:00
Josh Hawn
c32dde5baa daemon: container ArchivePath and ExtractToDir
The following methods will deprecate the Copy method and introduce
two new, well-behaved methods for creating a tar archive of a resource
in a container and for extracting a tar archive into a directory in a
container.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-07-21 11:20:10 -07:00
David Calavera
3ee15acaad Merge pull request from calavera/promote_volumes_experimental_to_master
Promote volume drivers from experimental to master.
2015-07-21 10:39:17 -07:00
Alexander Morozov
6ae377ffa0 Remove unused TtyTerminal interface
It was used only by integration tests, which now gone.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-21 09:56:28 -07:00
David Calavera
c4d45b6a29 Promote volume drivers from experimental to master.
Remove volume stubs and use the experimental path as the only path.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-21 09:32:44 -07:00
Alexander Morozov
380959dd68 Merge pull request from ewindisch/apparmor-policy
Move AppArmor policy to contrib & deb packaging
2015-07-21 08:48:02 -07:00
Eric Windisch
80d99236c1 Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
2015-07-21 11:05:53 -04:00
Zhang Wei
7be8336fb5 golint on daemon/network package
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-07-21 22:49:49 +08:00
Dan Walsh
96a4469835 If a user hits this error it would be helpful to know tagstore name.
There are several bug reports on this error happening, and error is
not helpful unless you read the code.  Google brings up removing
the repositories.btrfs file.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-07-21 09:26:27 -04:00
Doug Davis
09a3b57f94 Merge pull request from runcom/move-nat-tests
move nat tests from container's unit test to nat's ones
2015-07-20 20:06:34 -04:00
Antonio Murdaca
37d737fc2c Merge pull request from Microsoft/10662-start
Windows: hostconfig on start
2015-07-21 00:52:19 +02:00
Antonio Murdaca
f2aff58483 move nat tests from container's unit test to nat's ones
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-07-21 00:29:24 +02:00
John Howard
9001ea26e7 Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
2015-07-20 13:59:53 -07:00
Flavio Castelli
f95b3a6b6a ZFS driver: raise better errors during init
The ZFS driver should raise proper errors when the ZFS utility is
missing or when there's no zfs partition active on the system. Raising the
proper errors make possible to silently ignore the ZFS storage
driver when no default storage driver is specified.

Previous to this commit it was no longer possible to start the
docker daemon in that way:

  docker -d --storage-opt dm.loopdatasize=2GB

The above command resulted in an exit error because the ZFS driver
tried to use the storage options.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2015-07-20 15:24:48 +02:00
David Calavera
7f353a11e4 Merge pull request from tiborvass/carry-11784
Carry 11784: rmi dangling is unsafe when pulling
2015-07-17 16:17:18 -07:00
Sebastiaan van Stijn
415f744d0c Merge pull request from wlan0/rollover_log
Add rollover log driver, and --log-driver-opts flag
2015-07-17 22:41:26 +02:00
Doug Davis
12b6083c8f Remove panic in nat package on invalid hostport
Closes 

This one grew to be much more than I expected so here's the story... :-)
- when a bad port string (e.g. xxx80) is passed into container.create()
  via the API it wasn't being checked until we tried to start the container.
- While starting the container we trid to parse 'xxx80' in nat.Int()
  and would panic on the strconv.ParseUint().  We should (almost) never panic.
- In trying to remove the panic I decided to make it so that we, instead,
  checked the string during the NewPort() constructor.  This means that
  I had to change all casts from 'string' to 'Port' to use NewPort() instead.
  Which is a good thing anyway, people shouldn't assume they know the
  internal format of types like that, in general.
- This meant I had to go and add error checks on all calls to NewPort().
  To avoid changing the testcases too much I create newPortNoError() **JUST**
  for the testcase uses where we know the port string is ok.
- After all of that I then went back and added a check during container.create()
  to check the port string so we'll report the error as soon as we get the
  data.
- If, somehow, the bad string does get into the metadata we will generate
  an error during container.start() but I can't test for that because
  the container.create() catches it now.  But I did add a testcase for that.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-07-17 13:02:54 -07:00
Arnaud Porterie
98ed9a55f4 Merge pull request from LK4D4/update_libcontainer
Update libcontainer
2015-07-17 13:02:04 -07:00
Ma Shimiao
1b67c38f6f fix 8926: rmi dangling is unsafe when pulling
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-17 11:39:57 -04:00
Vivek Goyal
424d5e55a2 devicemapper: Change default basesize to 100G
Current default basesize is 10G. Change it to 100G. Reason being that for
some people 10G is turning out to be too small and we don't have capabilities
to grow it dyamically.

This is just overcommitting and no real space is allocated till container
actually writes data. And this is no different then fs based graphdrivers
where virtual size of a container root is unlimited.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-07-17 11:10:23 -04:00
David Calavera
15cb7dfc9e Merge pull request from mountkin/fix-rmi-image-not-found
don't allow deleting the image of running containers
2015-07-16 18:02:51 -07:00
Alexander Morozov
c86189d554 Update libcontainer
Replaced github.com/docker/libcontainer with
github.com/opencontainers/runc/libcontaier.
Also I moved AppArmor profile generation to docker.

Main idea of this update is to fix mounting cgroups inside containers.
After updating docker on CI we can even remove dind.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-16 16:02:26 -07:00
Alexander Morozov
8801906ced Merge pull request from hqhq/hq_cgroup_ro_optional
Remove cgroup read-only flag when privileged
2015-07-16 16:00:02 -07:00