Commit Graph

61 Commits

Author SHA1 Message Date
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
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
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
62b7ace712 daemon: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 3a42518042b36ad90950a3abf0aa125c0342b2c4
Component: engine
2016-12-14 22:36:58 +02:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
c148947fe6 fix a few golint errors
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 9c559e6d0b7190b4698de59e692a047beba017fd
Component: engine
2016-11-18 18:32:02 -08:00
9a8c3a6932 Fix failure to get containers when deleting a layer
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d4095a5902b62181d49ef07db18610975cb49d08
Component: engine
2016-11-10 14:07:11 -08:00
75a25a369f Merge pull request #27915 from rhvgoyal/graph-create-opts
Pass all graphdriver create() parameters in a struct
Upstream-commit: f11ac963af5a94ae0c36aaa2a67a671c6a313e59
Component: engine
2016-11-10 01:07:41 +01:00
e85707f736 Merge pull request #28002 from Microsoft/jjh/noreexec
Windows: Allow a no-reexec option for importLayer
Upstream-commit: 5e3d777401cd96bd9958971533222726edb1caa5
Component: engine
2016-11-09 14:46:21 -08:00
459e915b2e 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>
Upstream-commit: b937aa8e6968d805527d163e6f477d496ceb88d7
Component: engine
2016-11-09 15:59:58 -05:00
dbcd2372ba Windows: Allow a no-reexec option for importLayer
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d9294719b50452b3d88372468b6264c9d2467f02
Component: engine
2016-11-08 17:57:43 -08:00
40ba948937 Terminate template VMs on layer delete
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: c58e8dea6ce1e9ff02c383c1698733fd0554ba2e
Component: engine
2016-11-08 15:39:25 -08:00
b8d232c6a7 Windows: Rename layers before deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: be68006d1928b34936050175e67f85b4ee7f67cf
Component: engine
2016-11-01 18:05:09 -07:00
22458c8162 Windows: support docker diff
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4fac603682747476a12dba0df79c10e919eddefb
Component: engine
2016-10-28 11:06:54 -07:00
fe1dce6a91 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>
Upstream-commit: aa2cc18745cbe0231c33782f0fa764f657e3fb88
Component: engine
2016-10-20 19:31:24 -07:00
c622fde306 Stop expanding sandbox size when no new size is specified
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 0da31c68f11d6e2a795b4e4faf7f969916db5f81
Component: engine
2016-10-12 16:58:57 -07:00
5c56a3d561 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>
Upstream-commit: 9c79b0efc02c6452cb9521faa466dcc118a0e433
Component: engine
2016-09-22 17:44:38 -07:00
d5426f0e52 Windows: Remove TP5 hack from graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f61315f0df480b261a70278360b08f32c991d3ef
Component: engine
2016-09-17 16:16:50 -07:00
1dbc55e6ff Merge pull request #25509 from Microsoft/jjh/23079
Windows: Block ReFS file systems
Upstream-commit: 34cc19f6702c23b2ae4aad2b169ca64154404f9f
Component: engine
2016-08-12 09:32:22 -07:00
fe7b1d72f0 Merge pull request #23391 from Microsoft/WindowsSandboxSize
Windows: Added support for storage-opt size
Upstream-commit: 04e021d7511fcfdc0838a0165f70a4772c0e7718
Component: engine
2016-08-09 15:34:39 +02:00
a4fc4e13d8 Windows: Block ReFS file systems
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1cb9e9b44e7140d14dd42d48b2a7c038b65e8f16
Component: engine
2016-08-08 14:30:37 -07:00
1c3431e16a fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4e959ef2f7f063803d04e06166f459257eb94b5c
Component: engine
2016-07-23 11:32:23 +08:00
5590093d90 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>
Upstream-commit: 3e109f349ff42ea1a0f555b6e645c51d9bc1539b
Component: engine
2016-07-07 14:56:37 -07:00
85d966380c Windows: Added support for storage-opt size
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7e5ee6d176357fb294d0ca7b9a93373f6cc84bc0
Component: engine
2016-06-21 10:53:29 -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
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
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
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
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
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
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
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
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
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
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
778611a207 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>
Upstream-commit: 65d79e3e5e537039b244afd7eda29e721a93d84f
Component: engine
2016-03-23 14:42:52 -07:00
fba90c19ef Revert "Move layer mount refcounts to mountedLayer"
This reverts commit 563d0711f83952e561a0d7d5c48fef9810b4f010.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e91de9fb9d175541acc95834de486d33feef552a
Component: engine
2016-03-23 00:33:02 -07:00
44acd43622 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>
Upstream-commit: 563d0711f83952e561a0d7d5c48fef9810b4f010
Component: engine
2016-03-22 11:36:28 -04:00
209e95dee8 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>
Upstream-commit: 5649030e25bd87b4b0bbd200515b8c7317ae8ce1
Component: engine
2016-03-02 16:13:40 -08:00
395ec16335 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>
Upstream-commit: 58bec40d16265362fd4e41dbd652e6fba903794d
Component: engine
2016-03-01 10:25:33 -08:00
0b639e2753 Fixing 'docker save' on Windows.
Save was failing file integrity checksums due to bugs in both
Windows and Docker. This commit includes fixes to file time handling
in tarexport and system.chtimes that are necessary along with
the Windows platform fixes to correctly support save. With this
change, sysfile_backups for windowsfilter driver are no longer
needed, so that code is removed.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 041a9510c671ecf4724bf15388fdb9de549b04ed
Component: engine
2016-02-08 18:08:49 -08:00
f7ee374e15 Remove case sensitive duplicate dir in vendor
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b9a395c85de3f4ea10810c8df789fc67e5b4b604
Component: engine
2016-02-03 13:06:32 -08:00
e105a29374 Update daemon and docker core to use new content addressable storage
Add distribution package for managing pulls and pushes. This is based on
the old code in the graph package, with major changes to work with the
new image/layer model.

Add v1 migration code.

Update registry, api/*, and daemon packages to use the reference
package's types where applicable.

Update daemon package to use image/layer/tag stores instead of the graph
package

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4352da7803d182a6013a5238ce20a7c749db979a
Component: engine
2015-11-24 09:40:25 -08:00