Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

Miss use containerd namespace as netns ? #1692

@Ace-Tang

Description

@Ace-Tang

Description of problem

Code is locate at containerd-shim-v2/service.go


// Create a new sandbox or container with the underlying OCI runtime
func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ *taskAPI.CreateTaskResponse, err error) {
    s.mu.Lock()
    defer s.mu.Unlock()

//the network namespace created by cni plugin                                              
    netns, err :=                                             
    if err != nil {                                                                            
        return nil, errors.Wrap(err, "create namespace")                                       
    }                                                                                          

namespaces.NamespaceRequired(ctx) , this namespace concept is containerd namespace, should not used as netns, the way get container netns is weird.

I think this logic should be removed

Expected result

(replace this text with an explanation of what you thought would happen)

Actual result

(replace this text with details of what actually happened)


(replace this text with the output of the kata-collect-data.sh script, after
you have reviewed its content to ensure it does not contain any private
information).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions