Skip to content

apply: use naive applier when running in UserNS#3763

Merged
estesp merged 1 commit intocontainerd:masterfrom
AkihiroSuda:disable-mknod00-in-userns
Oct 24, 2019
Merged

apply: use naive applier when running in UserNS#3763
estesp merged 1 commit intocontainerd:masterfrom
AkihiroSuda:disable-mknod00-in-userns

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

OverlayConvertWhiteout calls mknod c 0 0 which is not allowed when
running in a user namespace, even in Ubuntu kernel.

Although there is an alternative hacky way to create whiteouts without
calling mknod as Moby overlay2 actually does(see #3762), let's use
naive applier when running in UserNS and call it a day.

Close #3762

Signed-off-by: Akihiro Suda akihiro.suda.cz@hco.ntt.co.jp

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 19, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Oct 19, 2019

Codecov Report

Merging #3763 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3763      +/-   ##
==========================================
- Coverage   41.98%   41.96%   -0.02%     
==========================================
  Files         131      131              
  Lines       14536    14538       +2     
==========================================
- Hits         6103     6101       -2     
- Misses       7525     7528       +3     
- Partials      908      909       +1
Flag Coverage Δ
#linux 45.38% <0%> (-0.03%) ⬇️
#windows 37.08% <ø> (ø) ⬆️
Impacted Files Coverage Δ
diff/apply/apply_linux.go 47.82% <0%> (-1.43%) ⬇️
snapshots/btrfs/btrfs.go 57.39% <0%> (-0.9%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 966b1b8...c224edc. Read the comment docs.

@fuweid fuweid requested a review from dmcgowan October 22, 2019 15:14
@AkihiroSuda AkihiroSuda force-pushed the disable-mknod00-in-userns branch from bdca148 to 3cd0d1f Compare October 23, 2019 02:32
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 23, 2019

Build succeeded.

@AkihiroSuda AkihiroSuda force-pushed the disable-mknod00-in-userns branch from 3cd0d1f to 6778c5e Compare October 23, 2019 03:07
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 23, 2019

Build succeeded.

`OverlayConvertWhiteout` calls `mknod c 0 0` which is not allowed when
running in a user namespace, even in Ubuntu kernel.

Although there is an alternative hacky way to create whiteouts without
calling mknod as Moby `overlay2` actually does(see containerd#3762), let's use
naive applier when running in UserNS and call it a day.

Close containerd#3762

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda force-pushed the disable-mknod00-in-userns branch from 6778c5e to c224edc Compare October 24, 2019 04:33
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 24, 2019

Build succeeded.

Copy link
Copy Markdown
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support or disable direct unpack when running in userns

4 participants