Commit graph

64 commits

Author SHA1 Message Date
Darren Stahl
5e4e357f6e Windows: Do not attempt to clean empty windowsfilter folder
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-04-17 13:10:15 -07:00
Victor Vieux
a6746e6ca5 Merge pull request #31954 from darrenstahlmsft/GraphdriverReference
Windows: Fix reference counting in graphdriver
2017-04-10 20:23:15 -07:00
Darren Stahl
7fab9b8a60 Windows: Fix reference counting in graphdriver
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-04-10 17:13:17 -07:00
John Howard (VM)
9910b9a7f0 Windows: graph cleanup '-removing'
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
2017-03-20 09:15:27 -07:00
John Howard
83a2db2097 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.
2017-02-15 11:16:24 -08:00
John Howard
c98e77c77c Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-23 10:25:36 -08:00
unclejack
3a42518042 daemon: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-14 22:36:58 +02:00
Darren Stahl
22c83c567f Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-22 14:57:11 -08:00
Victor Vieux
9c559e6d0b fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 18:32:02 -08:00
Darren Stahl
d4095a5902 Fix failure to get containers when deleting a layer
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-10 14:07:11 -08:00
Sebastiaan van Stijn
f11ac963af Merge pull request #27915 from rhvgoyal/graph-create-opts
Pass all graphdriver create() parameters in a struct
2016-11-10 01:07:41 +01:00
Tibor Vass
5e3d777401 Merge pull request #28002 from Microsoft/jjh/noreexec
Windows: Allow a no-reexec option for importLayer
2016-11-09 14:46:21 -08:00
Vivek Goyal
b937aa8e69 Pass all graphdriver create() parameters in a struct
This allows for easy extension of adding more parameters to existing
parameters list. Otherwise adding a single parameter changes code
at so many places.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2016-11-09 15:59:58 -05:00
John Howard
d9294719b5 Windows: Allow a no-reexec option for importLayer
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-08 17:57:43 -08:00
Darren Stahl
c58e8dea6c Terminate template VMs on layer delete
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-08 15:39:25 -08:00
Darren Stahl
be68006d19 Windows: Rename layers before deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-01 18:05:09 -07:00
John Howard
4fac603682 Windows: support docker diff
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-28 11:06:54 -07:00
Stephen J Day
aa2cc18745
pkg/archive: remove unnecessary Archive and Reader type
The `archive` package defines aliases for `io.ReadCloser` and
`io.Reader`. These don't seem to provide an benefit other than type
decoration. Per this change, several unnecessary type cases were
removed.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2016-10-20 19:31:24 -07:00
Darren Stahl
0da31c68f1 Stop expanding sandbox size when no new size is specified
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-10-12 16:58:57 -07:00
John Starks
9c79b0efc0 Windows: Back up files mutated during layer import
The Windows BCD store for the utility VM is mutated during layer import,
which causes failures in docker save. Back up the BCD store and related
log files so that save has access to their original contents.

Fixes #25893.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-09-22 17:44:38 -07:00
John Howard
f61315f0df Windows: Remove TP5 hack from graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-09-17 16:16:50 -07:00
Michael Crosby
34cc19f670 Merge pull request #25509 from Microsoft/jjh/23079
Windows: Block ReFS file systems
2016-08-12 09:32:22 -07:00
Sebastiaan van Stijn
04e021d751 Merge pull request #23391 from Microsoft/WindowsSandboxSize
Windows: Added support for storage-opt size
2016-08-09 15:34:39 +02:00
John Howard
1cb9e9b44e Windows: Block ReFS file systems
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-08 14:30:37 -07:00
allencloud
4e959ef2f7 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-23 11:32:23 +08:00
Stefan J. Wernli
3e109f349f Removing Custom Images support
Now that Windows base images can be loaded directly into docker via "docker load" of a specialized tar file (with docker pull support on the horizon) we no longer have need of the custom images code path that loads images from a shared central location.  Removing that code and it's call points.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-07-07 14:56:37 -07:00
Darren Stahl
7e5ee6d176 Windows: Added support for storage-opt size
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-06-21 10:53:29 -07:00
Antonio Murdaca
44ccbb317c *: fix logrus.Warn[f]
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-06-11 19:42:38 +02:00
John Starks
f182748b9b Windows: fix Windows graph driver name
Reverting "Windows filter storage driver" to "windowsfilter".

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-05-27 16:24:02 -07:00
Nirmal Mehta
59bb86a964 Merge branch 'master' into b 2016-05-24 21:43:45 -04:00
Nirmal Mehta
36a9151b27 fixed spelling error in windows.go
Signed-off-by: Nirmal Mehta <nirmalkmehta@gmail.com>
2016-05-24 21:40:08 -04:00
Michael Crosby
8bb4d31b10 Remove mountedLayer Mount and Unmount
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-23 16:52:58 -07:00
Michael Crosby
4bac8bce98 Add windows graph driver ref counter
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-05-23 16:03:40 -07:00
John Howard
dd0fc2be8b Windows: Remove windowsdiff driver
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-05-20 16:18:19 -07:00
John Starks
b3bc5e0fe4 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>
2016-05-13 18:16:11 -07:00
John Starks
6f8878872f 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>
2016-04-13 10:15:38 -07:00
John Howard
fec6cd2eb9 Merge pull request #20525 from Microsoft/sjw/update-graphdriver-create
Adding readOnly parameter to graphdriver Create method
2016-04-08 20:44:03 -07:00
John Howard
d5ef62f489 Merge pull request #21872 from Microsoft/sjw/nanoserver-fix
Fixing nanoserver image load bug.
2016-04-07 21:24:32 -07:00
John Starks
cf7944bf6f 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>
2016-04-07 17:52:28 -07:00
Stefan J. Wernli
a22092b136 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>
2016-04-07 16:44:51 -07:00
Stefan J. Wernli
ef5bfad321 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>
2016-04-06 13:52:53 -07:00
John Howard
331c8a86d4 Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-06 12:12:20 -07:00
John Howard
fc9912fd00 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
2016-04-05 16:16:25 -07:00
John Starks
194eaa5c0f 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>
2016-04-04 13:14:57 -07:00
Shishir Mahajan
b16decfccf CLI flag for docker create(run) to change block device size.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-03-28 10:05:18 -04:00
Brian Goff
65d79e3e5e Move layer mount refcounts to mountedLayer
Instead of implementing refcounts at each graphdriver, implement this in
the layer package which is what the engine actually interacts with now.
This means interacting directly with the graphdriver is no longer
explicitly safe with regard to Get/Put calls being refcounted.

In addition, with the containerd, layers may still be mounted after
a daemon restart since we will no longer explicitly kill containers when
we shutdown or startup engine.
Because of this ref counts would need to be repopulated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-23 14:42:52 -07:00
Tonis Tiigi
e91de9fb9d Revert "Move layer mount refcounts to mountedLayer"
This reverts commit 563d0711f8.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-23 00:33:02 -07:00
Brian Goff
563d0711f8 Move layer mount refcounts to mountedLayer
Instead of implementing refcounts at each graphdriver, implement this in
the layer package which is what the engine actually interacts with now.
This means interacting directly with the graphdriver is no longer
explicitly safe with regard to Get/Put calls being refcounted.

In addition, with the containerd, layers may still be mounted after
a daemon restart since we will no longer explicitly kill containers when
we shutdown or startup engine.
Because of this ref counts would need to be repopulated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-22 11:36:28 -04:00
John Starks
5649030e25 Write Windows layer diffs to tar in standard format
Previously, Windows layer diffs were written using a Windows-internal
format based on the BackupRead/BackupWrite Win32 APIs. This caused
problems with tar-split and tarsum and led to performance problems
in implementing methods such as DiffPath. It also was just an
unnecessary differentiation point between Windows and Linux.

With this change, Windows layer diffs look much more like their
Linux counterparts. They use AUFS-style whiteout files for files
that have been removed, and they encode all metadata directly in
the tar file.

This change only affects Windows post-TP4, since changes to the Windows
container storage APIs were necessary to make this possible.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-03-02 16:13:40 -08:00
John Starks
58bec40d16 graphdriver: Replace DiffPath with DiffGetter
This allows a graph driver to provide a custom FileGetter for tar-split
to use. Windows will use this to provide a more efficient implementation
in a follow-up change.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-03-01 10:25:33 -08:00