diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-21 15:57:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 15:57:23 +0200 |
commit | 500ad31d1bd1aee1458b17f05c2dfb7937786e87 (patch) | |
tree | a9089a812472cc69c68b404529a562c40ea56557 /pkg/domain | |
parent | e9b344266a563a3dfcf693fc817f6b8cc0b7d815 (diff) | |
parent | 37ecff9157acc361b373c5c98c18d5f2e9af19fd (diff) | |
download | podman-500ad31d1bd1aee1458b17f05c2dfb7937786e87.tar.gz podman-500ad31d1bd1aee1458b17f05c2dfb7937786e87.tar.bz2 podman-500ad31d1bd1aee1458b17f05c2dfb7937786e87.zip |
Merge pull request #6307 from baude/v2remoteinit
enable remote integration tests for init
Diffstat (limited to 'pkg/domain')
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 828bfae5b..dcaac99f2 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -4,6 +4,7 @@ import ( "context" "io" "os" + "strings" "github.com/containers/common/pkg/config" "github.com/containers/image/v5/docker/reference" @@ -405,6 +406,11 @@ func (ic *ContainerEngine) ContainerInit(ctx context.Context, namesOrIds []strin } for _, ctr := range ctrs { err := containers.ContainerInit(ic.ClientCxt, ctr.ID) + // When using all, it is NOT considered an error if a container + // has already been init'd. + if err != nil && options.All && strings.Contains(errors.Cause(err).Error(), define.ErrCtrStateInvalid.Error()) { + err = nil + } reports = append(reports, &entities.ContainerInitReport{ Err: err, Id: ctr.ID, |