rootless: overlay2: fix "createDirWithOverlayOpaque(...) ... input/output error"#42188
Conversation
1ce9143 to
6f788a4
Compare
Previously, `d.naiveDiff.ApplyDiff` was not used even when `useNaiveDiff()==true` Signed-off-by: Akihiro Suda <[email protected]>
6f788a4 to
7bb213d
Compare
When running in userns, returns error (i.e. "use naive, not native") immediately. No substantial change to the logic. Signed-off-by: Akihiro Suda <[email protected]>
overlay2 no longer sets `archive.OverlayWhiteoutFormat` when running in UserNS, so we can remove the complicated logic in the archive package. Signed-off-by: Akihiro Suda <[email protected]>
7bb213d to
6322dfc
Compare
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM
I want to have a look at #42188 (comment) after this is merged; I have a feeling we are loading the driver in situations where we shouldn't (so possible could skip the driver as a whole on initialization, but have to continue following the code paths)
|
Two LGTMs, can we merge? |
|
@AkihiroSuda sure we can merge but can you please change the Changelog line to something that encompasses (or enumerates) the user-facing fixes it provides? Something I can copy/paste that doesn't explain internal source code changes. |
|
@AkihiroSuda |
|
Changed to |
|
Is it fair to assume that the following failure is unrelated? |
|
From the daemon logs: this does look unrelated. |
|
@AkihiroSuda feel free to backport |
- What I did
Fix
createDirWithOverlayOpaque(...) ... input/output erroron rootless.Fix docker/for-linux#1055 (intermittent error, on Debian 10, kernel < 5.11)
Fix #42177 (100% reproducible error, on kernel >= 5.11)
Fix #42206
- How I did it
[bug fix] Commit 1:
overlay2: call d.naiveDiff.ApplyDiff when useNaiveDiff==truePreviously,
d.naiveDiff.ApplyDiffwas not used even whenuseNaiveDiff()==true[optimization] Commit 2:
overlay2: doesSupportNativeDiff: add fast path for usernsWhen running in userns, returns error (i.e. "use naive, not native") immediately.
No substantial change to the logic.
[clean up] Commit 3:
archive: do not use overlayWhiteoutConverter for UserNSoverlay2 no longer sets
archive.OverlayWhiteoutFormatwhen running in UserNS, so we can remove the complicated logic in the archive package.- How to verify it
$ docker --context=rootless pull python:3.9- Description for the changelog
rootless: overlay2: fix "createDirWithOverlayOpaque(...) ... input/output error"
- A picture of a cute animal (not mandatory but encouraged)
🐧