Commit Graph

530 Commits

Author SHA1 Message Date
6bcf7ca500 Merge pull request #24091 from AkihiroSuda/fixZFS24008
zfs: call mount.MakePrivate
Upstream-commit: b8cef7c19cea0f4ee670a9362154716b2313a18f
Component: engine
2016-06-30 11:14:30 -07:00
e667b026a1 Add detail error logs when 'Unknown Device' error happens if devicemapper storage is used.
Signed-off-by: yuzou <zouyu7@huawei.com>
Upstream-commit: d4a2bcc9ac49d07c71822ce72b97861d5844b46d
Component: engine
2016-06-30 13:06:14 +08:00
ed5060064e zfs: call mount.MakePrivate
Fix #24008

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 5ec8441bb55ecbf83da6407a4135ce83b1fe01c7
Component: engine
2016-06-29 01:55:45 +00:00
860c6cce0c overlay2: close read end of pipe on mount exec
Use StdinPipe to ensure pipe is properly closed after startup

Fixes #23686

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: ad4b3e11fe41080d66ac1780b455246ae18bdc35
Component: engine
2016-06-28 13:23:00 -07:00
066b0582fe Fix overlay2 ignoring whiteout files
Currently when overlay creates a whiteout file then the overlay2 layer is archived,
the correct tar header will be created for the whiteout file, but the tar logic will then attempt to open the file causing a failure.
When tar encounters such failures the file is skipped and excluded for the archive, causing the whiteout to be ignored.
By skipping the copy of empty files, no open attempt will be made on whiteout files.

Fixes #23863

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: bd13c53f8dc1504c9e681dfabef2afc1685ccec7
Component: engine
2016-06-23 13:34:38 -07:00
d903446499 fix "overlay" -> "overlay2" in error message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2d4b285a75621604f31058a43cb5ef1d4618533e
Component: engine
2016-06-16 16:42:40 -07:00
8d1c8c8149 Merge pull request #23515 from HackToday/fixoverlay2
Add ecryptfs check for overlay2
Upstream-commit: 06da8ce28582417cd93d3242f1d895e46d4a204e
Component: engine
2016-06-16 15:12:09 -07:00
3c08c9d8dd Merge pull request #23446 from tiborvass/plugins-experimental
Plugins: experimental support for new plugin management
Upstream-commit: 6ed921dc38be582939966f71a01ec10f03ed531f
Component: engine
2016-06-14 20:32:14 -04:00
848e510213 plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: f37117045c5398fd3dca8016ea8ca0cb47e7312b
Component: engine
2016-06-14 14:20:27 -07:00
2ebabdf47f Remove symlinks on layer removal for overlay2
Symlinks are currently not getting cleaned up when removing layers since only the root directory is removed.
On remove, read the link file and remove the associated link from the link directory.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e6f2e7646c813e8225b0bc16d3a0c13c76a9cd97
Component: engine
2016-06-14 12:40:35 -07:00
250b4af05c Add ecryptfs check for overlay2
We added docs about ecryptfs check but not in code side.
Also refactor code to make it clean.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 136323b04315eceffbed61d680878ed23cecc015
Component: engine
2016-06-14 14:25:52 +00:00
56c2250686 Merge pull request #23501 from dmcgowan/fix-overlay-diff-test
Remove failing overlay test
Upstream-commit: 31e48e85ef929f2b2b232f4c971f7c7966002539
Component: engine
2016-06-14 10:49:42 +02:00
9edf6c9627 Merge pull request #23490 from shishir-a412ed/dm_options_modularized
Modularize dm.use_deferred_removal and dm.use_deferred_deletion logic.
Upstream-commit: c69614deae7f20e0dbff8399ce3a8d11014b0f43
Component: engine
2016-06-14 08:47:43 +02:00
44db465ebc Remove failing overlay test
Diff apply is sometimes producing a different change list causing the tests to fail.
Overlay has a known issue calculating diffs of files which occur within the same second they were created.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 0e74aabbb9aa5cea0b6bf7342f9e325f989468fa
Component: engine
2016-06-13 22:34:57 -07:00
7bec8a2e7d Merge pull request #22126 from dmcgowan/overlay-native-diff
Overlay multiple lower directory support
Upstream-commit: 8a2f9a249c28c0a80bac4b41eb318dfe68f63f0d
Component: engine
2016-06-13 13:15:39 -07:00
19552d6875 Modularize dm.use_deferred_removal and dm.use_deferred_deletion logic.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: cac6658da061f01b4abd5b4bd1a7aeb234e8401d
Component: engine
2016-06-13 12:05:46 -04:00
04ae4edf2f Fix logrus formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.

This fix fixes #23459.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a72b45dbec3caeb3237d1af5aedd04adeb083571
Component: engine
2016-06-11 13:16:55 -07:00
763e6c326e *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 44ccbb317c2ca67fd8a88147b1ff80ce83d453cc
Component: engine
2016-06-11 19:42:38 +02:00
c6851cb49f Add separate overlay2 driver
Adds a new overlay driver which uses multiple lower directories to create the union fs.
Additionally it uses symlinks and relative mount paths to allow a depth of 128 and stay within the mount page size limit.
Diffs and done directly over a single directory allowing diffs to be done efficiently and without the need fo the naive diff driver.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 23e5c94cfb26eb72c097892712d3dbaa93ee9bc0
Component: engine
2016-06-08 00:16:01 -07:00
025e93c7bd Add more overlay tests and benchmarks
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 246e99303195b6ce4c357ceb5925990aa1890288
Component: engine
2016-06-08 00:16:01 -07:00
75e59286ce Expand graphtest package
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 8b0441d42cca4f89cf871c1b64172cc06f9c98e6
Component: engine
2016-06-08 00:16:01 -07:00
5b4a1181e1 Merge pull request #21946 from chosenken/add_disk_quota_to_zfs
Add support for setting storage size on ZFS containers
Upstream-commit: d85491ff4bd300b159425dcad41764f454f43ceb
Component: engine
2016-06-07 22:18:25 -04:00
5578aba972 Merge pull request #23193 from allencloud/fix-typos
use grep to find all a/an typos
Upstream-commit: 98c245c9e63793cf8ca03c5500e0820447c1861c
Component: engine
2016-06-02 18:45:08 -07:00
ce5b5efc4f Merge pull request #23121 from unclejack/disallow_ecryptfs_aufs
aufs,overlay: disable on eCryptfs
Upstream-commit: 22aca92ee3503f811f813be4a1349ad8e67fbbdb
Component: engine
2016-06-02 12:54:43 +02:00
35c5774373 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c1be45fa38e82054dcad606d71446a662524f2d5
Component: engine
2016-06-02 17:17:22 +08:00
e85968bd52 aufs,overlay: disable on eCryptfs
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 5e85ec82af6c8ec70ed39fd8489aea730fd41561
Component: engine
2016-06-01 21:00:35 +03:00
2360dea0b4 graphtest: fix cleanup logic
device Base should not exists on failure:

--- FAIL: TestDevmapperCreateBase (0.06s)
    graphtest_unix.go:122: stat
/tmp/docker-graphtest-079240530/devicemapper/mnt/Base/rootfs/a subdir:
no such file or directory
--- FAIL: TestDevmapperCreateSnap (0.00s)
    graphtest_unix.go:219: devmapper: device Base already
exists.

it should be:

--- FAIL: TestDevmapperCreateBase (0.25s)
	graphtest_unix.go:122: stat
/tmp/docker-graphtest-828994195/devicemapper/mnt/Base/rootfs/a subdir:
no such file or directory
--- FAIL: TestDevmapperCreateSnap (0.13s)
	graphtest_unix.go:122: stat
/tmp/docker-graphtest-828994195/devicemapper/mnt/Snap/rootfs/a subdir:
no such file or directory

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b18062122d76a9f53822889874aa12103d491372
Component: engine
2016-05-31 20:08:57 +02:00
98b281fb61 Windows: fix Windows graph driver name
Reverting "Windows filter storage driver" to "windowsfilter".

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: f182748b9b7d639c4db09f4f72411aba5f811f4e
Component: engine
2016-05-27 16:24:02 -07:00
bd261166b3 Fixes Issue # 22992: docker commit failing.
1) docker create / run / start: this would create a snapshot device and mounts it onto the filesystem.
So the first time GET operation is called. it will create the rootfs directory and return the path to rootfs
2) Now when I do docker commit. It will call the GET operation second time. This time the refcount will check
that the count > 1 (count=2). so the rootfs already exists, it will just return the path to rootfs.

Earlier it was just returning the mp: /var/lib/docker/devicemapper/mnt/{ID} and hence the inconsistent paths error.

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 09d0720e2fb6e30ee018887399f353f93ac2d421
Component: engine
2016-05-27 14:35:46 -04:00
b39fa693a7 Merge branch 'master' into b
Upstream-commit: 59bb86a964c38d0f2cc724c686803472bb48968b
Component: engine
2016-05-24 21:43:45 -04:00
b5619754dc fixed spelling error in windows.go
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
Upstream-commit: 36a9151b27168076073770142d0b354f0e83fdb2
Component: engine
2016-05-24 21:40:08 -04:00
d767f40c10 Merge pull request #22948 from dmcgowan/remove-unused-overlay-mounted
Remove unused mounted function in overlay
Upstream-commit: 0802401d22790ec85a620ac1c1ee41f81025c4a8
Component: engine
2016-05-24 13:08:06 -07:00
12513175c8 Merge pull request #22091 from amitkris/build_solaris
Get the Docker Engine to build clean on Solaris
Upstream-commit: 86a7632d63bdddb95aaf1472648056a4fb737d38
Component: engine
2016-05-24 21:41:36 +02:00
1bdae7f37d Remove unused mounted function in overlay
The mount check is now done by the FSChecker. This function is no longer needed and shouldn't be called.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 5cc082473068b00dee123f8388a79d7a48842a57
Component: engine
2016-05-24 11:02:07 -07:00
2736991181 Remove mountedLayer Mount and Unmount
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 8bb4d31b10e4c3abee9ca92535461859bbf25d46
Component: engine
2016-05-23 16:52:58 -07:00
3a35464d9d Get the Docker Engine to build clean on Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
Upstream-commit: 86d8758e2bb5e9d21d454ceda90b33feb8e74771
Component: engine
2016-05-23 16:37:12 -07:00
de30361155 Fix overlay use of rootdir and defer
Check for the rootDir first because the mergeDir may not exist if root
is present.

Also fix unmounting in the defer to make sure it does not have a
refcount.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 36a82c20321936a71b30fcfde8bc6c76d6cc8d1f
Component: engine
2016-05-23 16:03:40 -07:00
bfa2eac673 Add windows graph driver ref counter
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 4bac8bce985b20d68422ef93de3adf4931b2dee5
Component: engine
2016-05-23 16:03:40 -07:00
987aa6f79e Add reference counting to aufs
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5b6b8df0c1b5a54ae9a717810eedf9fc971e1321
Component: engine
2016-05-23 15:57:23 -07:00
50e99151eb Add fast path for fsmagic supported drivers
For things that we can check if they are mounted by using their fsmagic
we should use that and for others do it the slow way.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 1ba05cdb6ade7e3abd4c4c3221b5e27645460111
Component: engine
2016-05-23 15:57:23 -07:00
e6822e5504 Remove restart test
This test is not applicable anymore now that containers are not stopped
when the daemon is restored.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 31e903b0e17d01a4240f7890218a80088d32658c
Component: engine
2016-05-23 15:57:23 -07:00
8f4e229dc9 Remove overlay pathCache
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 290be017c54ed99466339529bf8683ee00930c28
Component: engine
2016-05-23 15:57:23 -07:00
2b52cbdf3e Restore ref count
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 009ee16beff4f6d3607fa251019908cc72ce0a34
Component: engine
2016-05-23 15:57:23 -07:00
b94b3df539 Windows: Remove windowsdiff driver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dd0fc2be8b8b0bbac3d3a478ae6939d9b742612d
Component: engine
2016-05-20 16:18:19 -07:00
a8712b3f5d Add test to ZFS for disk quota
Signed-off-by: Ken Herner <kherner@progress.com>
Upstream-commit: 04b4e3e6d80d5d734edba90e55f41863b50ee45b
Component: engine
2016-05-19 14:49:04 -04:00
74bbceaf49 Add error check after parseStorageOpt
Signed-off-by: Ken Herner <kherner@progress.com>
Upstream-commit: 373654f43e87a2e0bd5388ca4ab1852fd51a7199
Component: engine
2016-05-19 14:49:04 -04:00
11d44b0dc0 Add support for setting storage size on zfs containers
Now supports setting a containers storage size when using zfs as the
storage engine.  By passing in `--storage-opt size=<size>`, the created
container's storage size will be limited to the given size.  Note that
the way zfs works, the given specified storage size will be given in
addition to the base container size.

Example:

The node image reports a size of `671M` from `df -h` when started.
Setting `--storage-opt size=2G` will result in a drive the size of
`671M` + `2G`, `2.7G` in total.  Available space will be `2.0G`.

The storage size is achieved by setting the zfs option `quota` to the
given size on the zfs volume.

Signed-off-by: Ken Herner <kherner@progress.com>
Upstream-commit: e91834043100a6ae3f80c21fd15daccc2f451528
Component: engine
2016-05-19 14:49:04 -04:00
0d93e91ad8 Windows: reexec when importing layers
This improves reliability by doing parsing of potentially untrusted data
in a separate process. It opens the door for further security improvements
if we can lock down the reexec-ed process. It also improves import
performance by only taking the backup and restore privileges once, for the
whole process.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: b3bc5e0fe4c62b1c0193fc19777b22636368b551
Component: engine
2016-05-13 18:16:11 -07:00
1a17a9a9ba refactor overlay storage driver compatibility check
use a consistent approach for checking if the
backing filesystem is compatible with the
storage driver.

also add an error-message for the AUFS driver if
an incompatible combination is found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1fc0acc9ae77752858057d1f6f8487ccd82372be
Component: engine
2016-05-10 18:22:36 +02:00
7884e766dc Add disk quota support for btrfs
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Upstream-commit: 401c8d17674379d9b727d25df2d560a2dfe07f27
Component: engine
2016-05-05 14:35:13 +08:00