summaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-05-02 11:37:59 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-02 13:13:32 -0400
commit1e6413e3fde448d3b44fc36fd966d8d57af811f5 (patch)
tree663cab416c98703634479ee34dff005942b8ea76 /pkg/adapter
parent0b2c9c2acc38f51f871fd5a06aca205127a06d1d (diff)
downloadpodman-1e6413e3fde448d3b44fc36fd966d8d57af811f5.tar.gz
podman-1e6413e3fde448d3b44fc36fd966d8d57af811f5.tar.bz2
podman-1e6413e3fde448d3b44fc36fd966d8d57af811f5.zip
Add an InvalidState varlink error for Init
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/containers_remote.go11
1 files changed, 10 insertions, 1 deletions
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)
}