Skip to content

add support for --rootless#43

Merged
mlaventure merged 1 commit into
containerd:masterfrom
AkihiroSuda:rootless
Jul 3, 2018
Merged

add support for --rootless#43
mlaventure merged 1 commit into
containerd:masterfrom
AkihiroSuda:rootless

Conversation

@AkihiroSuda
Copy link
Copy Markdown
Member

The --rootless flag was introduced in opencontainers/runc#1688.

In most cases runc itself can detect the appropriate value,
but it is considered to be there are some corner cases.

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

@cyphar @giuseppe @brauner (ref: opencontainers/runc#1833)

Comment thread runc.go
if r.SystemdCgroup {
out = append(out, "--systemd-cgroup")
}
if r.Rootless != nil {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this be if r.Rootless != nil && *r.Rootless {

then just add the flag. I don't think --rootless true is valid, it's usually --rootless=true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

*r.Rootless is expected to be set to false when the caller wants to execute runc --rootless=false explicitly, so as to disable automatic rootless mode detection.

For example, when runc is being executed in a rootless runc, --rootless might need to be set to falseexplicitly. opencontainers/runc#1837

The --rootless flag was introduced in opencontainers/runc#1688.

In most cases runc itself can detect the appropriate value,
but it is considered to be there are some corner cases.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
@crosbymichael
Copy link
Copy Markdown
Member

LGTM

Copy link
Copy Markdown
Collaborator

@mlaventure mlaventure left a comment

Choose a reason for hiding this comment

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

LGTM

@mlaventure mlaventure merged commit 14606eb into containerd:master Jul 3, 2018
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.

3 participants