Skip to content

Conversation

@WeiZhang555
Copy link
Contributor

@WeiZhang555 WeiZhang555 commented Oct 26, 2016

When spec file contains duplicated namespaces, e.g.

specs: specs.Spec{
        Linux: &specs.Linux{
            Namespaces: []specs.Namespace{
                {
                    Type: "pid",
                },
                {
                    Type: "pid",
                    Path: "/proc/1/ns/pid",
                },
            },
        },
    }

runc should report malformed spec instead of using latest one by
default, because this spec could be quite confusing.

Signed-off-by: Zhang Wei [email protected]

When spec file contains duplicated namespaces, e.g.

specs: specs.Spec{
        Linux: &specs.Linux{
            Namespaces: []specs.Namespace{
                {
                    Type: "pid",
                },
                {
                    Type: "pid",
                    Path: "/proc/1/ns/pid",
                },
            },
        },
    }

runc should report malformed spec instead of using latest one by
default, because this spec could be quite confusing.

Signed-off-by: Zhang Wei <[email protected]>
@wking
Copy link
Contributor

wking commented Oct 26, 2016 via email

@cyphar
Copy link
Member

cyphar commented Oct 26, 2016

While I'm fine with this, I'd prefer to get a runtime-spec PR landed first.

@mrunalp
Copy link
Contributor

mrunalp commented Oct 26, 2016

LGTM

Approved with PullApprove

@WeiZhang555
Copy link
Contributor Author

@cyphar I can do that at the same time :)
If runc is OK for this, I think runtime-spec won't reject this either 😝

@WeiZhang555
Copy link
Contributor Author

@wking So if that spec change was accepted, I think this could make more sense.
I'm glad to help making the PR if you don't mind. 😄

@hqhq
Copy link
Contributor

hqhq commented Oct 27, 2016

LGTM

Approved with PullApprove

@hqhq hqhq merged commit e7abf30 into opencontainers:master Oct 27, 2016
@WeiZhang555 WeiZhang555 deleted the forbid-duplicated-namespace branch October 27, 2016 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants