server: containers restore
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
cc732301ac
commit
54d6ddb5af
3 changed files with 99 additions and 15 deletions
|
@ -173,6 +173,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
g.SetProcessSelinuxLabel(processLabel)
|
||||
}
|
||||
|
||||
containerID, containerName, err := s.generateContainerIDandName(name, "infra", 0)
|
||||
|
@ -355,6 +356,10 @@ func (s *Server) RemovePodSandbox(ctx context.Context, req *pb.RemovePodSandboxR
|
|||
s.removeContainer(c)
|
||||
}
|
||||
|
||||
if err := label.UnreserveLabel(sb.processLabel); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Remove the files related to the sandbox
|
||||
podSandboxDir := filepath.Join(s.sandboxDir, sb.id)
|
||||
if err := os.RemoveAll(podSandboxDir); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue