Commit Graph

680 Commits

Author SHA1 Message Date
ad62bca460 Merge pull request #33241 from Microsoft/jjh/multi-layerstore
LCOW: Support most operations excluding remote filesystem
Upstream-commit: 930e6896685f614d8f15ed10207596b1a151cbc8
Component: engine
2017-06-21 15:45:23 -07:00
420a8c950f LCOW: Coherency - ensure windowsfilter driver is not used
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: bdabc76a5336322de505f8ec7dd3e0959c5919a8
Component: engine
2017-06-20 19:50:13 -07:00
01b491fce5 LCOW: Create layer folders with correct ACL
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ed10ac6ee93cf5c389a735c0c97b08d5d5dff3a9
Component: engine
2017-06-20 19:50:12 -07:00
3af9801344 LCOW: Move daemon stores to per platform
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3aa4a0071536d3b106374eaa44d8a55765901aa6
Component: engine
2017-06-20 19:49:52 -07:00
97b623b9f6 LCOW: Graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>

Adds the graphdriver for Linux containers on Windows
Upstream-commit: ed4d2aa981a9057766a9cec53c3bd19be4eef059
Component: engine
2017-06-20 19:49:24 -07:00
02b551dece Merge pull request #33587 from bergwolf/aufs
fix aufs mount option length calculation
Upstream-commit: 226bf3e0d92511d20792b1dd1bf72fb3eb67b6a9
Component: engine
2017-06-20 15:51:42 -07:00
c03bd3f5e9 Merge pull request #32468 from coolljt0725/clean_thin
devicemapper: remove thin pool if 'initDevmapper' failed
Upstream-commit: bccebdac1806d39848c6b51e9fea757e77bc2dad
Component: engine
2017-06-13 07:34:15 -05:00
ad022709e6 Use lazy umount on Put for overlay2 and overlay
we see a lot of
```
level=debug msg="Failed to unmount a03b1bb6f569421857e5407d73d89451f92724674caa56bfc2170de7e585a00b-init overlay: device or resource busy"
```
in daemon logs and there is a lot of mountpoint leftover.
This cause failed to remove container.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: f65fa1f115df896b2440f50c374f032fc781188d
Component: engine
2017-06-12 09:07:25 -04:00
228595a0e9 fix aufs mount option length calculation
We add ",dirperm1" but only increase length by len("dirperm1").

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Upstream-commit: 1a6bf8248a32c160347e4daf3dd4f15023357889
Component: engine
2017-06-08 19:21:52 +08:00
583893964e Remove error return from RootPair
There is no case which would resolve in this error. The root user always exists, and if the id maps are empty, the default value of 0 is correct.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 93fbdb69acf9248283a91a1c5c6ea24711c26eda
Component: engine
2017-06-07 11:45:33 -04:00
03637cd7aa Fix vfs unit test and port VFS to the new IDMappings
The test was failing because TarOptions was using a non-pointer for
ChownOpts, which meant the check for nil was never true, and
createTarFile was never using the hdr.UID/GID

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: acdbc285e29ddd92e7a1cc99daf8b16502204d2e
Component: engine
2017-06-07 11:44:34 -04:00
5d87b0ddc9 Remove unused functions from archive.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 967ef7e6d2bd88a5d7010863f3d7138ca61b1939
Component: engine
2017-06-07 11:44:33 -04:00
a81b0c835e Persist the quota size for btrfs so that daemon restart keeps quota
This commit is an extension of fix for 29325 based on the review comment.
In this commit, the quota size for btrfs is kept in `/var/lib/docker/btrfs/quotas`
so that a daemon restart keeps quota.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 16328cc207a493ecff0cabc11ebf51e958131418
Component: engine
2017-06-01 21:15:51 -07:00
080b2a353f Remove btrfs quota groups after containers destroyed
This fix tries to address the issue raised in 29325 where
btrfs quota groups are not clean up even after containers
have been destroyed.

The reason for the issue is that btrfs quota groups have
to be explicitly destroyed. This fix fixes this issue.

This fix is tested manually in Ubuntu 16.04,
with steps specified in 29325.

This fix fixes 29325.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e907c6418a2ae7754f69fede5897a7176250e8bd
Component: engine
2017-06-01 20:24:26 -07:00
10c5371927 Support overlay2 on btrfs
OverlayFS is supported on top of btrfs as of Linux Kernel 4.7.
Skip the hard enforcement when on kernel 4.7 or newer and
respect the kernel check override flag on older kernels.
https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: f64a4ad008e68996afcec3ab34a869887716f944
Component: engine
2017-05-18 15:26:03 -07:00
d267fa757f Do not remove containers from memory on error
Before this, if `forceRemove` is set the container data will be removed
no matter what, including if there are issues with removing container
on-disk state (rw layer, container root).

In practice this causes a lot of issues with leaked data sitting on
disk that users are not able to clean up themselves.
This is particularly a problem while the `EBUSY` errors on remove are so
prevalent. So for now let's not keep this behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 54dcbab25ea4771da303fa95e0c26f2d39487b49
Component: engine
2017-05-05 17:02:04 -04:00
fb69291f3e Merge pull request #31104 from cpuguy83/dm_lvmsetup
Add option to auto-configure blkdev for devmapper
Upstream-commit: 05ad14fc1bc5626895a419a991fcf8932eb91d27
Component: engine
2017-05-05 07:35:24 -04:00
24557ed762 Add option to auto-configure blkdev for devmapper
Instead of forcing users to manually configure a block device to use
with devmapper, this gives the user the option to let the devmapper
driver configure a device for them.

Adds several new options to the devmapper storage-opts:

- dm.directlvm_device="" - path to the block device to configure for
  direct-lvm
- dm.thinp_percent=95 - sets the percentage of space to use for
  storage from the passed in block device
- dm.thinp_metapercent=1 - sets the percentage of space to for metadata
  storage from the passed in block device
- dm.thinp_autoextend_threshold=80 - sets the threshold for when `lvm`
  should automatically extend the thin pool as a percentage of the total
  storage space
- dm.thinp_autoextend_percent=20 - sets the percentage to increase the
  thin pool by when an autoextend is triggered.

Defaults are taken from
[here](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production)

The only option that is required is `dm.directlvm_device` for docker to
set everything up.

Changes to these settings are not currently supported and will error
out.
Future work could support allowing changes to these values.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5ef07d79c4712d5b1ff4f0c896932ea8902a129c
Component: engine
2017-05-03 13:49:15 -04:00
79f9dd11cc Merge pull request #32687 from runcom/oci-selinux
Switch to using opencontainers/selinux for selinux bindings
Upstream-commit: 4219156a6254bdc7d270f06742037df8e2708a9a
Component: engine
2017-04-29 19:05:32 +02:00
9432bd8249 Switch to using opencontainers/selinux for selinux bindings
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: abbbf914986d6d0ea15923f9a57a99465791bc83
Component: engine
2017-04-24 21:29:47 +02:00
347c2cd583 Windows: Do not attempt to clean empty windowsfilter folder
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 5e4e357f6e53ed9aeb0d4988d8c780acd5da3ed5
Component: engine
2017-04-17 13:10:15 -07:00
89e454a1d4 Merge pull request #31954 from darrenstahlmsft/GraphdriverReference
Windows: Fix reference counting in graphdriver
Upstream-commit: a6746e6ca5da6df6af9d93fc51149c35d58a55fd
Component: engine
2017-04-10 20:23:15 -07:00
72f89cba18 Windows: Fix reference counting in graphdriver
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7fab9b8a6054270763508ce88cb06c584cfeb153
Component: engine
2017-04-10 17:13:17 -07:00
bde265f61b devicemapper: remove thin pool if 'initDevmapper' failed
if initDevmapper failed after creating thin-pool, the thin-pool will not be removed,
this would cause we can't use the same lvm to create another thin-pool.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: ea22d7ab91e7febc69433b979160dda8a79ad46e
Component: engine
2017-04-10 13:11:39 -04:00
631fdf6cda Let graphdrivers declare diff stream fidelity
This allows graphdrivers to declare that they can reproduce the original
diff stream for a layer. If they do so, the layer store will not use
tar-split processing, but will still verify the digest on layer export.
This makes it easier to experiment with non-default diff formats.

Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: aa96c3176bf9dc6e14c6bbcf065ceb3a3870886a
Component: engine
2017-03-31 08:32:00 -07:00
c8585d779a Windows: graph cleanup '-removing'
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 9910b9a7f02f6991d55abcc4ea57ec78d3b3675f
Component: engine
2017-03-20 09:15:27 -07:00
188830de7a Remove aufs debugEBusy()
Since it was introduced no reports were made and lsof seems to cause
issues on some systems.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: eac66b67be0710322d0e21a67a55f5731be48f68
Component: engine
2017-03-09 14:35:13 -08:00
47709fd338 Merge pull request #31083 from xulike666/fight-for-readability
fix some typos from module contrib to man
Upstream-commit: 57fd478169071b09f0e6657cc1c2568d80c1bed3
Component: engine
2017-03-03 15:13:01 +01:00
302e2c7325 Merge pull request #31409 from yuexiao-wang/fix-version
'docker daemon' deprecation message doesn't use the new version
Upstream-commit: 55b955d9ffc14571fa6b5a1a6369a8be8d053853
Component: engine
2017-03-02 22:02:09 -05:00
31865190c5 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5a9cee7bb57e7da7f2793fbb290498bba0531105
Component: engine
2017-03-03 17:26:49 +08:00
96de508a38 Merge pull request #31356 from coolljt0725/fix_suspend
devicemapper: Fix suspend a removed device
Upstream-commit: 3e561e4a845592b1c23cb6d13256694983066712
Component: engine
2017-03-02 10:11:48 +01:00
3da961cb82 devicemapper: fix suspend removed device
when doing devices.cancelDeferredRemoval, the device could have been removed
and return ErrEnxio, but it continue to check if it is need to do suspend.
doSuspend := devinfo != nil && devinfo.Exists != 0 uses a devinfo which is
get before devices.cancelDeferredRemoval(baseInfo), it is outdate, the device
has been removed and there is no need to do suspend. If do suspend it will return
devicemapper: Error running deviceSuspend dm_task_run failed.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 6e25bb2ed6560baec4b13930e673c88f1b49de34
Component: engine
2017-03-01 21:58:14 +08:00
922530d28e Refactor cpu-realtime file creation to remove duplication
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f7819fcb25aaf5b08202db275847c825e7b09999
Component: engine
2017-02-28 11:12:06 +01:00
df7fcfe4bc Reduce duplication in graphdriver
Removes some duplication in counter.go and proxy.go

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2028d8698d95fb73f0c59a548b8f2adbdf5057a4
Component: engine
2017-02-28 11:12:02 +01:00
458406a7f3 Merge pull request #31212 from fate-grand-order/fixed
use t.Fatal() to output the err message and fix typo
Upstream-commit: a6576b8a2bff0feeb67918403caa3df0c4c37673
Component: engine
2017-02-27 12:26:35 +09:00
9632b0f1e8 use t.Fatal() to output the err message where the values used for formatting
text does not appear to contain a placeholder

Signed-off-by: Helen Xie <chenjg@harmonycloud.cn>
Upstream-commit: 2a8d6368d4a930203b93f75914173ab65bf3b0bc
Component: engine
2017-02-23 10:16:22 +08:00
b6a3bf40fb Merge pull request #31136 from tonistiigi/more-locks
Add more locking to storage drivers
Upstream-commit: 1ad165dba151a76af30a8dee548d9e5689183227
Component: engine
2017-02-21 07:39:33 -08:00
cdf7829892 fix some typos from module contrib to man
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: e0577d5fe876ec92de21c808c31e97e052654223
Component: engine
2017-02-18 10:08:55 +08:00
0cc00d1673 Merge pull request #31055 from Microsoft/jjh/fix30278
Windows: Retry workaround for RS1/RS2 compute system enumeration
Upstream-commit: 7761c69e239171c6b388d53d03619eacc49338a0
Component: engine
2017-02-17 16:53:16 -08:00
abadc8a614 Add more locking to storage drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fc1cf1911bb92def95f407364372992d57b11ca2
Component: engine
2017-02-17 15:50:25 -08:00
ba76fec59c Merge pull request #31069 from tonistiigi/fix-overlay2-unmount
overlay2: fix unmounting layer without merge dir
Upstream-commit: 146bc072a9bc0c52509d55a96c4324e3cee3d557
Component: engine
2017-02-17 10:21:47 +01:00
54df4712b6 Update storage driver options link
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e9864cc0ec53ae3be250cb184274ccc9349bec2d
Component: engine
2017-02-16 18:32:17 -08:00
b4b0a816d9 overlay2: fix unmounting layer without merge dir
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e1af6c8a5767e38957449a1d07e56104e317191b
Component: engine
2017-02-15 17:58:12 -08:00
8c67bb4bf9 Windows: Retry loop to fix HCS race condition enumerating containers
Signed-off-by: John Howard <jhoward@microsoft.com>

This fixes https://github.com/docker/docker/issues/30278 where
there is a race condition in HCS for RS1 and RS2 builds, and enumeration
of compute systems can return access is denied if a silo is being
torn down in the kernel while HCS is attempting to enumerate them.
Upstream-commit: 83a2db20977ae41325a74cf871b9e3caa92a2b7b
Component: engine
2017-02-15 11:16:24 -08:00
049d94cb19 Fix RefCounter count return
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: 874a502b1deea1019dab23e2b5ead9c792925e40
Component: engine
2017-02-03 08:47:55 -08:00
59a5f47eb6 Merge pull request #29835 from yongtang/29810-btrfs-rescan
Run btrfs rescan only if userDiskQuota is enabled
Upstream-commit: 93e322f5be3b1c00e8e085a510f2a8194f7bedc5
Component: engine
2017-01-26 15:55:51 -08:00
471ffa89e7 Merge pull request #30139 from Microsoft/jjh/sequential
Windows: Use sequential file access
Upstream-commit: 062f2a3eae418c07a9a18661492a1c8beaaed60a
Component: engine
2017-01-23 12:46:06 -08:00
f61d5bb251 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c98e77c77c5b43bf50e8ae5296b02ce0b47ea188
Component: engine
2017-01-23 10:25:36 -08:00
2db1bd6f28 fix typo
fix typo I found AMAP in integration-cli/*

fix typo mentioned by Allencloud

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 40af5691648c5b9d07b1231e3ed3be29fd66521a
Component: engine
2017-01-19 15:52:28 +08:00
d11c4417e8 Merge pull request #27903 from kim0/master
zfs: expose mountpoint/dataset on inspection
Upstream-commit: 27695cd751c2bf6295b751b913893bbe72304b96
Component: engine
2017-01-12 11:28:07 -08:00