LCOW differ return ErrNotImplemented for wrong mount type#7112
Merged
estesp merged 1 commit intocontainerd:mainfrom Jun 30, 2022
Merged
LCOW differ return ErrNotImplemented for wrong mount type#7112estesp merged 1 commit intocontainerd:mainfrom
estesp merged 1 commit intocontainerd:mainfrom
Conversation
On Windows the two differs we register by default are the "windows" and "windows-lcow" differs. The diff service checks if Apply returns ErrNotImplemented and will move on to the next differ in the line. The Windows differ makes use of this to fallback to LCOW if it's determined the mount type passed is incorrect, but the LCOW differ does not return ErrNotImplemented for the same scenario. This puts a strict ordering requirement on the default differ entries in the config, namely that ["windows", "windows-lcow"] will work, as windows will correctly fall back to the lcow differ, but ["windows-lcow", "windows"] won't as the diff services Apply will just return the error directly. Signed-off-by: Daniel Canter <[email protected]>
kzys
approved these changes
Jun 29, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows the two differs we register by default are the "windows" and "windows-lcow" differs. The diff service checks if Apply returns
ErrNotImplementedand will move on to the next differ in the line if so. The Windows differ makes use of this to fallback to LCOW if it's determined the mount type passed is incorrect, but the LCOW differ does not returnErrNotImplementedfor the same scenario. This puts a strict ordering requirement on the default differ entries in the config, namely that ["windows", "windows-lcow"] will work, as windows will correctly fall back to the lcow differ, but ["windows-lcow", "windows"] won't as the diff servicesApplywill just return the error directly. Not too much of an issue, but if you're hand editing a config and place lcow first it can be ran into.