aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/containers.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-05-20 15:34:23 -0500
committerBrent Baude <bbaude@redhat.com>2020-05-20 15:35:24 -0500
commit37ecff9157acc361b373c5c98c18d5f2e9af19fd (patch)
treeee0828fe19931b36b05873bf6bcc2f4f178a7a7a /pkg/domain/infra/tunnel/containers.go
parent6a75dfa8a85d7b9677f545aba976dbe82404cf3d (diff)
downloadpodman-37ecff9157acc361b373c5c98c18d5f2e9af19fd.tar.gz
podman-37ecff9157acc361b373c5c98c18d5f2e9af19fd.tar.bz2
podman-37ecff9157acc361b373c5c98c18d5f2e9af19fd.zip
enable remote integration tests for init
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/containers.go')
-rw-r--r--pkg/domain/infra/tunnel/containers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index cebd332e3..17f98e9d1 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"
@@ -402,6 +403,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,