From 0b2c9c2acc38f51f871fd5a06aca205127a06d1d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 29 Apr 2019 10:37:50 -0400 Subject: Add basic structure of podman init command As part of this, rework the number of workers used by various Podman tasks to match original behavior - need an explicit fallthrough in the switch statement for that block to work as expected. Also, trivial change to Podman cleanup to work on initialized containers - we need to reset to a different state after cleaning up the OCI runtime. Signed-off-by: Matthew Heon --- cmd/podman/shared/workers.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/podman/shared') diff --git a/cmd/podman/shared/workers.go b/cmd/podman/shared/workers.go index 112af89cc..b6e3f10e7 100644 --- a/cmd/podman/shared/workers.go +++ b/cmd/podman/shared/workers.go @@ -110,9 +110,14 @@ func (p *Pool) newWorker(slot int) { func DefaultPoolSize(name string) int { numCpus := runtime.NumCPU() switch name { + case "init": + fallthrough case "kill": + fallthrough case "pause": + fallthrough case "rm": + fallthrough case "unpause": if numCpus <= 3 { return numCpus * 3 -- cgit v1.2.3-54-g00ecf