[WIP] allow user namespace remapping using snapshotters#3885
[WIP] allow user namespace remapping using snapshotters#3885liaojh1998 wants to merge 1 commit intocontainerd:masterfrom
Conversation
|
Build succeeded.
|
|
thanks for working on this 👍 |
Codecov Report
@@ Coverage Diff @@
## master #3885 +/- ##
==========================================
- Coverage 42.33% 42.32% -0.02%
==========================================
Files 130 130
Lines 14678 14678
==========================================
- Hits 6214 6212 -2
- Misses 7539 7540 +1
- Partials 925 926 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
TODO: Add test for "snapshotter"
Signed-off-by: Jie Hao Liao <[email protected]>
e31e63a to
1b607f9
Compare
|
Added typedef for remapper. |
|
Build succeeded.
|
|
Okay, I'll modify that when we use multiple remappings. |
| } | ||
| } | ||
| mounts, err := snapshotter.Prepare(ctx, usernsID+"-remap", parent) | ||
| mounts, err := snapshotter.Prepare(ctx, usernsID+"-remap", parent, opts...) |
There was a problem hiding this comment.
This doesn't seem necessary if the snapshotter is supporting the mapping. I think a better approach would be to leave the remapping functions alone and just provide a helper which can set the labels and just use WithNewSnapshot
There was a problem hiding this comment.
Okay. I'm thinking of an implementation that uses a switch statement in WithRemappedSnapshot() and WithRemappedSnapshotView() to call WithNewSnapshot() based on the remapper. Would this be a better approach or should I leave all of the remapping functions alone?
cc @AkihiroSuda
|
ping @liaojh1998 |
|
@dmcgowan PTAL? |
I think that is fine, could you update PR? |
|
Okay, I'll make an update around this weekend. |
|
@liaojh1998 will you have time soon to update this PR? Would be good to get this in |
|
@liaojh1998 Are you still interested in this? |
|
Carried in #4259 |
There's a big overhead from using Lchown for user namespace remapping. The overhead can be reduced from using fuse-overlayfs's dynamic remapping through mounting. This commit will allow fuse-overlayfs snapshotter to do the remapping instead.
To be used in conjunction with #3765, and
containerd/fuse-overlayfs-snapshotter#5.
Related issue #3841.
Signed-off-by: Jie Hao Liao [email protected]
cc @AkihiroSuda
Please let me know what's the best way to test this and if any checks are needed.