Commit Graph

500 Commits

Author SHA1 Message Date
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
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
dab6ceb6f9 Merge pull request #21945 from rhvgoyal/export-min-free-space
Export Mininum Thin Pool Free Space through docker info
Upstream-commit: 227c83826aafbbcb3235d75cf7ab58392e552a83
Component: engine
2016-05-02 20:20:08 -04:00
76c8648306 Merge pull request #22168 from cpuguy83/22116_hack_in_layer_refcounts
Add refcounts to graphdrivers that use fsdiff
Upstream-commit: 8a0d2d8e57a4825fb21c0f8ef91bef513beebc35
Component: engine
2016-04-22 15:17:12 -07:00
f8ddc00d73 Add refcounts to graphdrivers that use fsdiff
This makes sure fsdiff doesn't try to unmount things that shouldn't be.

**Note**: This is intended as a temporary solution to have as minor a
change as possible for 1.11.1. A bigger change will be required in order
to support container re-attach.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7342060b070df67481f8da4f394a57cac1671d56
Component: engine
2016-04-21 12:19:57 -04:00
dd79541d6f Merge pull request #21683 from mYmNeo/growFS
call growFS when size is a mismatch
Upstream-commit: b006f7f64020c814b2eab2c7d2f59e1539894449
Component: engine
2016-04-21 12:02:44 -04:00
4847a4f337 Export Mininum Thin Pool Free Space through docker info
Right now there is no way to know what's the minimum free space threshold
daemon is applying. It would be good to export it through docker info and
then user knows what's the current value. Also this could be useful to
higher level management tools which can look at this value and setup their
own internal thresholds for image garbage collection etc.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 55a9b8123d7e89692b5c25c846cf6707a8ce463a
Component: engine
2016-04-21 15:42:23 +00:00
f3325d63fe Make overlay home dir Private mount
People have reported following issue with overlay

$ docker run -ti --name=foo -v /dev/:/dev fedora bash
$ docker cp foo:/bin/bash /tmp
$ exit container

Upon container exit, /dev/pts gets unmounted too. This happens because
docker cp volume mounts get propagated to /run/docker/libcontainer/....
and when container exits, it must be tearing down mount point under
/run/docker/libcontainerd/... and as these are "shared" mounts it
propagates events to /dev/pts and it gets unmounted too.

One way to solve this problem is to make sure "docker cp" volume mounts
don't become visible under /run/docker/libcontainerd/..

Here are more details of what is actually happening.

Make overlay home directory (/var/lib/docker/overlay) private mount when
docker starts and unmount it when docker stops. Following is the reason
to do it.

In fedora and some other distributions / is "shared". That means when
docker creates a container and mounts it root in /var/lib/docker/overlay/...
that mount point is "shared".

Looks like after that containerd/runc bind mounts that rootfs into
/runc/docker/libcontainerd/container-id/rootfs. And this puts both source
and destination mounts points in shared group and they both are setup
to propagate mount events to each other.

Later when "docker cp" is run it sets up container volumes under
/var/lib/dokcer/overlay/container-id/... And all these mounts propagate
to /runc/docker/libcontainerd/... Now mountVolumes() makes these new
mount points private but by that time propagation already has happened
and private only takes affect when unmount happens.

So to stop this propagation of volumes by docker cp, make
/var/lib/docker/overlay a private mount point. That means when a container
rootfs is created, that mount point will be private too (it will inherit
property from parent). And that means when bind mount happens in /runc/
dir, overlay mount point will not propagate mounts to /runc/.

Other graphdrivers like devicemapper are already doing it and they don't
face this issue.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: e076bccb458aeadab9380ce0636456ad6317a85f
Component: engine
2016-04-18 21:48:09 +00:00
6761133f09 Windows: Fix Hyper-V container ACLs for TP5 (#21974)
In TP5, Hyper-V containers need all image files ACLed so that the virtual
machine process can access them. This was fixed post-TP5 in Windows, but
for TP5 we need to explicitly add these ACLs.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 6f8878872f8782d4300faeb80413c8c60f56cff1
Component: engine
2016-04-13 10:15:38 -07:00
13ff1eed5b Merge pull request #21714 from hallyn/2016-03-31/aufs.2
don't try to use aufs in a user namespace
Upstream-commit: 7c16063afaafaddf0b738fe9ad6221f55ee85a99
Component: engine
2016-04-12 14:07:51 -07:00
897c0b707e Grow the container rootfs when it is necessary
Signed-off-by: mYmNeo <thomassong@tencent.com>
Upstream-commit: 34a66a14af326a259d4ff9fb84db6f678f116a17
Component: engine
2016-04-12 09:27:47 +08:00
2be81f74a1 don't try to use aufs in a user namespace
If aufs is already modprobe'd but we are in a user namespace, the
aufs driver will happily load but then get eperm when it actually tries
to do something.  So detect that condition.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Upstream-commit: 2a71f28a4e1167dee32aa16ddbc819c9d9e77f71
Component: engine
2016-04-11 13:38:15 -05:00
0e63dec985 parseStorageOpt: return size rather than updating devInfo.Size field
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 45dc5b46e2018d0a8c2d15c6b2917f3581211a6e
Component: engine
2016-04-11 10:34:13 -04:00
9499ce7691 Merge pull request #20525 from Microsoft/sjw/update-graphdriver-create
Adding readOnly parameter to graphdriver Create method
Upstream-commit: fec6cd2eb988f77d7442fd8edd8cc864c87ae88b
Component: engine
2016-04-08 20:44:03 -07:00
f61a32826f Merge pull request #21872 from Microsoft/sjw/nanoserver-fix
Fixing nanoserver image load bug.
Upstream-commit: d5ef62f4895206abd4ab2b5e61a49a59d37d1ecf
Component: engine
2016-04-07 21:24:32 -07:00
e3b16ea4f7 Windows: Support ApplyDiff on a base layer
This adds support to the Windows graph driver for ApplyDiff on a base
layer. It also adds support for hard links, which are needed because the
Windows base layers double in size without hard link support.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: cf7944bf6f64c844b74ad937a79d66dafaf99673
Component: engine
2016-04-07 17:52:28 -07:00
431366980d Fixing nanoserver image load bug.
Fixes an issue that prevents nano server images from loading properly. Also updates logic for custom image loading to avoid preventing daemon start because an image failed to load.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: a22092b13695c44790bb443ac8b536965b1cdba3
Component: engine
2016-04-07 16:44:51 -07:00
742837d4b6 Merge pull request #21828 from dmcgowan/fix-overlay-on-overlay-test
Fix overlay test running on overlay
Upstream-commit: 2e236d0255bd6f4f5f37c2512f89b22655d47d1f
Component: engine
2016-04-07 10:07:25 +02:00
63950888d2 Merge pull request #21830 from anusha-ragunathan/auplink
Be more lenient on auplink errors.
Upstream-commit: 8785952282a444358e934678b3833be935340259
Component: engine
2016-04-07 09:19:38 +02:00
bab358354a Fix overlay test running on overlay
Overlay tests were failing when /var/tmp was an overlay mount with a misleading message.
Now overlay tests will be skipped when attempting to be run on overlay.
Tests will now use the TMPDIR environment variable instead of only /var/tmp

Fixes #21686

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 824c72f4727504e3a8d37f87ce88733c560d4129
Component: engine
2016-04-06 21:06:42 -07:00
b63495d305 Be more lenient on auplink errors.
On aufs, auplink is run before the Unmount. Irrespective of the
result, we proceed to issue a Unmount syscall. In which case,
demote erros on auplink to warning.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: dbd9b7e121c2e20e5429fdc97421c9510746161e
Component: engine
2016-04-06 18:24:19 -07:00
fd21ba82c6 Merge pull request #21809 from Microsoft/jjh/tp4removal
Windows: Remove TP4 support from main codebase
Upstream-commit: 65464d11f1b1aac6a5b9792cb599e23f376d169d
Component: engine
2016-04-06 14:11:33 -07:00
d4ec9845eb Adding readOnly parameter to graphdriver Create method
Since the layer store was introduced, the level above the graphdriver
now differentiates between read/write and read-only layers.  This
distinction is useful for graphdrivers that need to take special steps
when creating a layer based on whether it is read-only or not.
Adding this parameter allows the graphdrivers to differentiate, which
in the case of the Windows graphdriver, removes our dependence on parsing
the id of the parent for "-init" in order to infer this information.

This will also set the stage for unblocking some of the layer store
unit tests in the next preview build of Windows.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: ef5bfad3210a9e9c8b761f2c11c0c6289490ebff
Component: engine
2016-04-06 13:52:53 -07:00
5ada0d9d57 Merge pull request #21723 from devimc/master
Fix compilation errors with btrfs-progs-4.5
Upstream-commit: 8c361eb5da51318168d7d1bd2214f7369de28394
Component: engine
2016-04-06 15:56:42 -04:00
9f10b4351a Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 331c8a86d489e573fcbf1df3c4f813bbc3168624
Component: engine
2016-04-06 12:12:20 -07:00
5c35f01162 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
Upstream-commit: fc9912fd00f5e12a6f0904f3c758275724ba3318
Component: engine
2016-04-05 16:16:25 -07:00
4815437b5f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 194eaa5c0f843257e66b68bd735786308a9d93b2
Component: engine
2016-04-04 13:14:57 -07:00
9b4fb715c9 Improve udev unsupported error message
Show a different message if a dynamic binary
is running, but doesn't have udev sync support.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b8f38747e60eb76e19f08129ab27cb808d21c22a
Component: engine
2016-04-01 13:31:44 -07:00
7929b2459d Fix compilation errors with btrfs-progs-4.5
btrfs-progs-4.5 introduces device delete by devid
for this reason btrfs_ioctl_vol_args_v2's name was encapsulated
in a union

this patch is for setting btrfs_ioctl_vol_args_v2's name
using a C function in order to preserve compatibility
with all btrfs-progs versions

Signed-off-by: Julio Montes <imc.coder@gmail.com>
Upstream-commit: a038cccf88998814249a7a40b71a33a680e3f02f
Component: engine
2016-04-01 08:58:29 -06:00
57e1cc77d5 Merge pull request #19367 from shishir-a412ed/rootfs_size_configurable_cli
CLI flag for docker create(run) to change block device size.
Upstream-commit: e6aa40a017e0c11186fb9053b9e71e34b93ebe1c
Component: engine
2016-03-29 08:52:54 +02:00
9ab7e4327f CLI flag for docker create(run) to change block device size.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: b16decfccfdb0749c490be9272cb7b4789be87b4
Component: engine
2016-03-28 10:05:18 -04:00
a119fb7401 Protect aufs mounts with locks
Parallel aufs mount calls produce invalid argument error.

Fixes #21545


Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 824c24e6802ad3ed7e26b4f16e5ae81869b98185
Component: engine
2016-03-26 22:53:47 -07:00