From 1e6413e3fde448d3b44fc36fd966d8d57af811f5 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 2 May 2019 11:37:59 -0400 Subject: Add an InvalidState varlink error for Init Signed-off-by: Matthew Heon --- pkg/adapter/containers_remote.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkg/adapter/containers_remote.go') diff --git a/pkg/adapter/containers_remote.go b/pkg/adapter/containers_remote.go index 268ac09e8..d1e4b4dcd 100644 --- a/pkg/adapter/containers_remote.go +++ b/pkg/adapter/containers_remote.go @@ -251,7 +251,16 @@ func (r *LocalRuntime) InitContainers(ctx context.Context, cli *cliconfig.InitVa for _, id := range ids { initialized, err := iopodman.InitContainer().Call(r.Conn, id) if err != nil { - failures[id] = err + if cli.All { + switch err.(type) { + case *iopodman.InvalidState: + ok = append(ok, initialized) + default: + failures[id] = err + } + } else { + failures[id] = err + } } else { ok = append(ok, initialized) } -- cgit v1.2.3-54-g00ecf