Commit Graph

1793 Commits

Author SHA1 Message Date
704cf2735f Merge pull request #15010 from runcom/14947-fix-inspect-time-RFC3339Nano
Format times in inspect command with a template as RFC3339Nano
Upstream-commit: e89aec0dfb2dd4a5decc11ea008f3ab179e8d5f8
Component: engine
2015-07-27 10:08:21 -07:00
0fccf757d0 Format times in inspect command with a template as RFC3339Nano
In 1.6.2 we were decoding inspect API response into interface{}.
time.Time fields were JSON encoded as RFC3339Nano in the response
and when decoded into interface{} they were just strings so the inspect
template treated them as just strings.
From 1.7 we are decoding into types.ContainerJSON and when the template
gets executed it now gets a time.Time and it's formatted as
2015-07-22 05:02:38.091530369 +0000 UTC.
This patch brings back the old behavior by typing time.Time fields
as string so they gets formatted as they were encoded in JSON -- RCF3339Nano

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: c9207bc0aa57745876a3422d2cbc290be7c53da8
Component: engine
2015-07-26 15:25:08 +02:00
3ff45b92dd Merge pull request #14940 from coolljt0725/add_vxfs_magic_number
Add VxFS magic number, fixes #14847
Upstream-commit: 6b2b6cb3fc1a047e701b7884d98c89338144fb0a
Component: engine
2015-07-25 23:25:48 +02:00
f26f8b4a2b Clarify error message when container name is already in use. Signed-off-by: Gustav Sinder <gustav.sinder@gmail.com>
Signed-off-by: gs11 <gustav.sinder@gmail.com>
Upstream-commit: 547d6c6656f161c3ad60c85ac0f19cf3d80571c7
Component: engine
2015-07-25 14:08:38 +02:00
d3667a22b6 Merge pull request #14976 from calavera/revert_unconfined_aa_policy
Revert "Introduce a dedicated unconfined AA policy"
Upstream-commit: 542685d856cad45b602e018baf36d7b268cbdfdc
Component: engine
2015-07-24 17:31:28 -07:00
6574e4057c Merge pull request #14977 from jfrazelle/fix-lxc
fix lxc
Upstream-commit: 935810bd20cca725d52c10ca7759353681af961e
Component: engine
2015-07-24 16:43:46 -07:00
61a71388a8 Revert "Introduce a dedicated unconfined AA policy"
This reverts commit 87376c3add7dcd48830060652554e7ae43d11881.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 94ab0d312fedaf063a6487c6b1b8b7b97221d24a
Component: engine
2015-07-24 16:35:51 -07:00
11ea6871f4 fix memory swappiness lxc
Signed-off-by: Jessica Frazelle <princess@docker.com>
Upstream-commit: a38b544ef082bcea76c4ea13e19d935ac09d3498
Component: engine
2015-07-24 15:46:51 -07:00
eb95ca4553 Merge pull request #14967 from Microsoft/10662-fixpaniconwindowsdaemon
Windows: Fixes panic on daemon binary
Upstream-commit: 2084eee02c49fba22b2396abc626c1e6c7fc8ec2
Component: engine
2015-07-24 16:48:37 -04:00
fe5b9c1f61 Windows: Fixes panic on daemon binary
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b405e89d5cd89d132efef1194a815e670ad15554
Component: engine
2015-07-24 12:30:49 -07:00
4d9279a3fb Improve documentation and golint compliance of registry package
* Add godoc documentation where it was missing

* Change identifier names that don't match Go style, such as INDEX_NAME

* Rename RegistryInfo to PingResult, which more accurately describes
  what this structure is for. It also has the benefit of making the name
  not stutter if used outside the package.

Updates #14756

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 4fcb9ac40ce33c4d6e08d5669af6be5e076e2574
Component: engine
2015-07-24 11:55:07 -07:00
a7cda977e7 Merge pull request #14958 from LK4D4/fix_valid
Fix option validation for log-drivers without it
Upstream-commit: 3a07e7d115626a4658a6c0d222c467c033cf66c3
Component: engine
2015-07-24 09:57:36 -07:00
ffc7323b60 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>
Upstream-commit: d68c55bc72625bce226971ef6e760530e9a15ce3
Component: engine
2015-07-24 09:00:53 -07:00
Lei
26ba48c09d Add VxFS magic number, fixes #14847
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: e1c5e9b5610e46bf9526dafcbfba3332fe1983e0
Component: engine
2015-07-24 16:37:56 +08:00
12234c67d4 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>
Upstream-commit: 96ce3a194aab2807fdd638825b9ea7cb9ba55c36
Component: engine
2015-07-23 19:44:46 -04:00
7fa69a889f Merge pull request #14854 from rhvgoyal/unmount-base
docker: Unmount -init layer root before taking a snapshot
Upstream-commit: 1e40915e9d626ba8a00170941886fefab96fa682
Component: engine
2015-07-23 15:17:07 -04:00
7b98273c2e Merge pull request #14887 from Microsoft/10662-stupidtypo
Windows: Stupid copy/paste error
Upstream-commit: 9dcd0cc1ee442ca262491b7738890793be641abc
Component: engine
2015-07-23 14:49:17 -04:00
f26842120f Merge pull request #14855 from ewindisch/apparmor-unconfined
Introduce a dedicated unconfined AA policy
Upstream-commit: ac9fc03c74e65a6a18bc0854d4a2841637fe1acf
Component: engine
2015-07-23 10:21:51 -07:00
c8167142d1 Windows: Stupid copy/paste error
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: cef5cb2dcbe1089f5fde6478a9c0f2ed93ce3c80
Component: engine
2015-07-22 19:30:47 -07:00
992fae5b93 Merge pull request #14613 from stefanberger/nohidevols2
Do not hide user provided network mounts [v2]
Upstream-commit: d106a2ea2ac7e78f0937798fbb7a21ff7fe1532c
Component: engine
2015-07-22 16:24:22 -04:00
ec7391b794 Merge pull request #14442 from cpuguy83/refactor_logdrvier_reader
Refactor log driver reader
Upstream-commit: 1c6fe58efc413b606b6b24e42584ca14be2d1ca8
Component: engine
2015-07-22 11:54:35 -07:00
13f3b7974b Merge pull request #14753 from flavio/zfs-initialization-errors
ZFS driver: raise better errors during init
Upstream-commit: 19ba7f9e236c80d34589d941536ef6fd800bb94e
Component: engine
2015-07-22 14:27:46 -04:00
472987774a 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>
Upstream-commit: 6bd389b9db38eaf4ce2b9cc0cf5024f8450504ef
Component: engine
2015-07-22 13:44:21 -04:00
9f8e7b5fed 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>
Upstream-commit: 87376c3add7dcd48830060652554e7ae43d11881
Component: engine
2015-07-22 11:28:32 -04:00
2fb3d3917e 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>
Upstream-commit: fe26669205e12a1ca62dcc37a251cf7bfca9cb89
Component: engine
2015-07-22 10:32:53 -04:00
c3fd270a2c Merge branch 'master' of github.com:docker/docker into error
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4815fdc334c5b479095b3d16657b2321ef76cb0c
Component: engine
2015-07-22 08:06:19 -04:00
2d8d0361a7 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
Upstream-commit: 50d2597e490c4636ee8cacabf34bb9ed3e21d3fc
Component: engine
2015-07-22 09:02:00 +02:00
dbf636ed08 Merge pull request #14842 from hqhq/hq_remove_rootuid
Remove unused parameter in NewTtyConsole
Upstream-commit: 30b951ff08503bb455ffde8ecd0cfa630bc277ff
Component: engine
2015-07-21 21:37:21 -07:00
9c4a1f92a0 Merge pull request #14804 from dave-tucker/golint_nat
golint: Fix issues in pkg/nat
Upstream-commit: ff011ededba4b51c047a9f8d27c7c5c327494c0d
Component: engine
2015-07-21 20:38:40 -07:00
8365f62c47 Merge pull request #14822 from runcom/host-config-links-on-start
Allow starting a container with an existing hostConfig which contains links
Upstream-commit: 06162fed8b12d4f43ca3d03d6956996b6c73015d
Component: engine
2015-07-21 20:06:26 -07:00
814cff41a7 Merge pull request #14688 from Microsoft/10662-hookupmac
Windows: Hook up user supplied MAC
Upstream-commit: 5dda570d508475d59a42633ee67efa22f87fe52b
Component: engine
2015-07-21 19:55:21 -07:00
e5400db724 Remove unused parameter in NewTtyConsole
It's introduced in
68ba5f0b69c9f38 (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>
Upstream-commit: af3059855c0b59c08b115a70d3f61b0fab3270de
Component: engine
2015-07-22 10:32:31 +08:00
6e5f69c519 remove dead code after decoupling from jsonlog
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d3b3ebc3a4e185da08ec049bbeba46e942f30c80
Component: engine
2015-07-21 20:47:35 -04:00
5104b34c44 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>
Upstream-commit: c0391bf5545afef5e675138556c39e4c0e9bf91b
Component: engine
2015-07-21 20:47:31 -04:00
8f8c0a2957 Merge pull request #13171 from jlhawn/archive_copy
docker cp to and from containers
Upstream-commit: c986f85f7397c915e6b29b6dff60db678cc8b72d
Component: engine
2015-07-21 16:59:44 -07:00
89ab877e9d golint: Fix issues in pkg/nat
Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 15d01d6e6c57f4b8a39dddd2676a2d6914c62c77
Component: engine
2015-07-22 00:47:41 +01:00
8fccdeffc8 Merge pull request #14682 from duglin/Issue14621
Remove panic in nat package on invalid hostport
Upstream-commit: 36106a20cacb8f96b64da303f651bbd2160e24e3
Component: engine
2015-07-21 15:48:51 -07:00
b821d19c27 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>
Upstream-commit: 1c3cb2d31ea722e2c174bf78eda62fec6949fb8b
Component: engine
2015-07-21 15:33:05 -07:00
58f999ca51 Windows: Remove erroneous comment
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bd30d27636718b3ea576caa52807507d57283580
Component: engine
2015-07-21 14:25:08 -07:00
acbea7273b Allow starting a container with an existing hostConfig which contains links
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 65121e5fce3851d7d1e8c8cd5d77dd3c9591d773
Component: engine
2015-07-21 22:10:00 +02:00
5ad9da5031 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)
Upstream-commit: c32dde5baadc8c472666ef9d5cead13ab6de28ea
Component: engine
2015-07-21 11:20:10 -07:00
c56394846e Merge pull request #14659 from calavera/promote_volumes_experimental_to_master
Promote volume drivers from experimental to master.
Upstream-commit: 3ee15acaadc3f25c90ea2c4de2e5ab1a12d8e042
Component: engine
2015-07-21 10:39:17 -07:00
b6a0d280f9 Remove unused TtyTerminal interface
It was used only by integration tests, which now gone.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6ae377ffa0c106749db1bcd6cf158f8b0056dea8
Component: engine
2015-07-21 09:56:28 -07:00
bfde6861a0 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>
Upstream-commit: c4d45b6a29a91f2fb5d7a51ac36572f2a9b295c6
Component: engine
2015-07-21 09:32:44 -07:00
84681c30e3 Merge pull request #14609 from ewindisch/apparmor-policy
Move AppArmor policy to contrib & deb packaging
Upstream-commit: 380959dd68cd56e60a2ea93cd7f26c8d88135483
Component: engine
2015-07-21 08:48:02 -07:00
74cf202b4f 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>
Upstream-commit: 80d99236c1ef9d389dbaca73c1a949da16b56b42
Component: engine
2015-07-21 11:05:53 -04:00
b04bea4cce golint on daemon/network package
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7be8336fb54ae2907c8f6549f26272c102a867af
Component: engine
2015-07-21 22:49:49 +08:00
81dcb09562 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)
Upstream-commit: 96a4469835c68e0b9c448344777fbff077b514ea
Component: engine
2015-07-21 09:26:27 -04:00
bd707ce47e Merge pull request #14775 from runcom/move-nat-tests
move nat tests from container's unit test to nat's ones
Upstream-commit: 09a3b57f941a9a3c3b7cbc35f2c8d1ff9bcea26f
Component: engine
2015-07-20 20:06:34 -04:00
d803cf51a9 Merge pull request #14691 from Microsoft/10662-start
Windows: hostconfig on start
Upstream-commit: 37d737fc2ceba8d4daa3c3785f6050440a6a40c2
Component: engine
2015-07-21 00:52:19 +02:00