mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-04 10:24:37 +00:00
runtime: remove storeSandbox at the end of createSandboxFromConfig
Remove storeSandbox() at the end of createSandboxFromConfig(), because this callchain createSandboxFromConfig -> createContainers has already calls storeSandbox(). This can improve the startup speed of the container, even just for a little. Fixes: #1980 Signed-off-by: Liang Zhou <zhoul110@chinatelecom.cn>
This commit is contained in:
@@ -120,11 +120,6 @@ func createSandboxFromConfig(ctx context.Context, sandboxConfig SandboxConfig, f
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// The sandbox is completely created now, we can store it.
|
|
||||||
if err = s.storeSandbox(ctx); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user