Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for --rootless #43

Merged
merged 1 commit into from
Jul 3, 2018
Merged

Conversation

AkihiroSuda
Copy link
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)

@@ -655,6 +656,10 @@ func (r *Runc) args() (out []string) {
if r.SystemdCgroup {
out = append(out, "--systemd-cgroup")
}
if r.Rootless != nil {
Copy link
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
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
Member

LGTM

Copy link
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.

None yet

3 participants