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
Scratch size customization and UVM scratch creation for WCOW snapshotter #4912
Conversation
Hi @dcantah. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Build succeeded.
|
e0f399d
to
d88f9a1
Compare
Build succeeded.
|
d88f9a1
to
00204ee
Compare
Build succeeded.
|
LGTM! |
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
* Currently we rely on making the UVMs sandbox.vhdx in the shim itself instead of this being made by the snapshotter itself. This change adds a label that affects whether to create the UVMs scratch layer in the snapshotter itself. * Adds container scratch size customization. Before adding the computestorage calls (vendored in with containerd#4859) there was no way to make a containers or UVMs scratch size less than the default (20 for containers and 10 for the UVM). Signed-off-by: Daniel Canter <dcanter@microsoft.com>
00204ee
to
ff1451c
Compare
Build succeeded.
|
@dmcgowan @crosbymichael If anyone has time could I get some eyes on this? |
@kevpar Are you able to take a look at this sometime this week? Feel like this has enough to go in |
Will look when I get a chance, but you also asked me to look at the ncproxy PR :) |
Not wrong 😆 Appreciate it |
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
@jterry75 Lovely, the mac OS linter seems to have timed out |
@TBBle, the compute storage calls are present in RS5 but looking at the code it does have a guard to throw a specific HRESULT if the API isn't present. It would be available after enabling the Containers feature ( I've only tested this on 19H1, 20H1, 20H2 and my machine (insiders build) and with more of a focus on hypervisor isolated containers, although I did give process some validation on 20H1 and 20H2. The file in use failure makes perfect sense though and is known. The hives directory would be in use and I just thought of this last week and brought it up; I'm planning to fix this week. The following scenario wouldn't work:
However, if the 1GB disk already exists we're A-ok. This would happen if the first container we started asked for xGB (as long as it's less than 20), so just the reverse scenario of the above. The Ideally I'd hope we could get to something like we have for LCOW where we keep a cache of scratch disks to use of different sizes but the file in use issue kind of blocks this -_-, so we're stuck with this 1GB + expand path which sucks as the expand call isn't exactly the fastest. |
I think the "file in use" error I mentioned isn't related to the one you mention here, as in this code-flow, after I changed the read-only layer creation to use 20GB instead of 1GB, nothing will call Also, it was happening before these changes landed in containerd when it was purely hcsshim's In a general sense, it makes a lot more sense to me for the base layers to have this extra pair of VHDX files created as early as possible (in It would be nicer if the extra VHDX files could be created by an API that doesn't also try and re-setup the base layer. I imagine there would still be a conflict if two child layers tried simultaneously to create a scratch from the same base layer, and both tried to create the extra VHDX files, but at least they wouldn't be modifying any other data in the base layer that might be in-use. I'm not super-keen on the current approach here, as once the base layer has passed the 'process' stage, its usage is much less controlled and more corner-cases appear. I'd prefer, if the appropriate extra VHDX files aren't present (i.e. containerd today extracted the base layer, and did not create a scratch layer from it) then we could add them during WCOW snapshotter plugin startup when we "know" that nothing is currently trying to create scratch layers from the base layers. But perhaps if hot-restarting containerd, we cannot know? I'm not sure off-hand what serialisation guarantees we have. |
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
I'm getting weird failures from CI when `func (s *snapshotter) createScratchLayer` calls `computestorage.SetupContainerBaseLayer` to create new disks. > 2021-03-07T06:07:50.7594090Z testsuite.go:782: failed to create scratch layer: failed to create scratch vhdx at "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\snapshot-suite-Windows-351506444\\root\\snapshots\\1": failed to format writable layer vhd: The request is not supported. So let's just avoid that code-path, since this wasn't happening before this code-path was introduced in containerd#4912. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Currently we rely on making the UVMs sandbox.vhdx in the shim instead of this being made by the snapshotter. This change adds a label that affects whether to create the UVMs scratch layer in the snapshotter itself.
Adds container and UVM scratch size customization. Before adding the computestorage calls (vendored in with Update hcsshim and go-winio vendoring #4859) there was no way to make a containers or UVMs scratch size less than the default (20 for containers and 10 for the UVM).
Signed-off-by: Daniel Canter dcanter@microsoft.com