summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-27 15:37:58 +0200
committerGitHub <noreply@github.com>2020-04-27 15:37:58 +0200
commit529824ec1e02e9b7ea893bbab35179ef16d4661d (patch)
tree6c2e14c482b3f67013569b66616119f8d8cc2031 /pkg/domain
parent7cb46450fd9cc2a9fc545004431c1d416970e0ed (diff)
parent2fc54facf2f816047e2243547eb26fa9a897d7be (diff)
downloadpodman-529824ec1e02e9b7ea893bbab35179ef16d4661d.tar.gz
podman-529824ec1e02e9b7ea893bbab35179ef16d4661d.tar.bz2
podman-529824ec1e02e9b7ea893bbab35179ef16d4661d.zip
Merge pull request #5997 from giuseppe/fix-pod-create
v2, podman: fix a bunch of "podman pod *" tests
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/pods.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index 7732d5aa3..7c06f9a4e 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -145,7 +145,7 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
reports []*entities.PodStopReport
)
pods, err := getPodsByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
- if err != nil {
+ if err != nil && !(options.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err
}
for _, p := range pods {
@@ -180,6 +180,7 @@ func (ic *ContainerEngine) PodRestart(ctx context.Context, namesOrIds []string,
errs, err := p.Restart(ctx)
if err != nil {
report.Errs = []error{err}
+ reports = append(reports, &report)
continue
}
if len(errs) > 0 {
@@ -207,6 +208,7 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op
errs, err := p.Start(ctx)
if err != nil {
report.Errs = []error{err}
+ reports = append(reports, &report)
continue
}
if len(errs) > 0 {
@@ -226,7 +228,7 @@ func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, optio
reports []*entities.PodRmReport
)
pods, err := getPodsByContext(options.All, options.Latest, namesOrIds, ic.Libpod)
- if err != nil {
+ if err != nil && !(options.Ignore && errors.Cause(err) == define.ErrNoSuchPod) {
return nil, err
}
for _, p := range pods {
@@ -234,6 +236,7 @@ func (ic *ContainerEngine) PodRm(ctx context.Context, namesOrIds []string, optio
err := ic.Libpod.RemovePod(ctx, p, true, options.Force)
if err != nil {
report.Err = err
+ reports = append(reports, &report)
continue
}
reports = append(reports, &report)