-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support flexible LCOW layer parsing and partitioned layers #1745
Conversation
d9550e1
to
354d3fc
Compare
cdc086a
to
f13f4ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, otherwise lgtm
f0563c1
to
e01339a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm (given linter is happy)
fae0655
to
e425877
Compare
f2274c6
to
0244f81
Compare
Previously, layer information for both Windows and Linux containers was passed throughout the shim through the OCI runtime spec's Windows.LayerFolders field. This was used to store the set of directories used for the layers, including the scratch. The exact semantics of what is expected in these directories differed between Windows and Linux. This approach worked okay, but had a few annoying limitations. For instance, there was no way to represent more complex layer data, such as a VHD path as well as a partition index on that VHD. This change removes the use of Windows.LayerFolders completely for Linux containers, and instead creates a new layers.LCOWLayers type that is used to represent Linux layer configuration. This new type is passed into hcsoci.CreateContainer, and from there is passed into layers.MountLCOWLayers where it is actually used to set up the filesystem for the container. The new layers.LCOWLayers type is currently quite simple, but having this as a proper Go type allows us a lot of flexibility in the future. We can add more fields on this struct, but we could also change out the nested LCOWLayer type for an interface, for instance, if we wanted to support new types of layers that have drastically different representation. This change does not aim to touch the way Windows container layers are handled, nor how the Windows UVM root filesystem is set up. These would be good things to improve in the future, but the Windows container layers are more complicated in how they are used, so this is left for future work. Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
Adds support for a new type of LCOW mount that can use individual disk partitions for each read-only layer. This change adds the work to parse the new layer type and pass it through the shim, as well as the support to the shim-side SCSI package to send the partition index in the guest request. This change does not add the GCS-side work to actually mount the specified partition. That will come in a future change. This change also does not handle formatting the scratch disk. It it desired to be able to format it on the fly when creating the container, but that will also come in a future change. Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
I bypassed branch protection on the merge since the latest push was just a simple rebase on top of |
This PR updates our ADO fork to commits in hcsshim up to commit hash [7769a64](7769a64). This includes support for partitioned scsi devices and ensuring filesystem format for lcow scsi devices. Related work items: #1728, #1740, #1741, #1742, #1743, #1744, #1745, #1747, #1748, #1749, #1750, #1752, #1754, #1756, #1757, #1767, #1769, #1771, #1772, #1773, #1779
This is commit 6/6 in a chain. Recommended to review in order. If reviewing a later PR in the chain, you can view individual commits to see just what that PR changes.
This PR increases the flexibility of how we handle LCOW layers. This gives us greater ability to represent layers differently. For example, this PR also adds a new
lcow-partitioned-layer
type which consists of a VHD path and a partition index on that VHD for each read-only layer.Please see individual commits for details.