summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorToshiki Sonoda <sonoda.toshiki@fujitsu.com>2022-07-19 10:00:33 +0900
committerToshiki Sonoda <sonoda.toshiki@fujitsu.com>2022-07-19 10:00:33 +0900
commiteef39b69ee2ae6f70d4fcb7def29dff827d439e8 (patch)
tree5bc08540f2e34aa77c5d55301bd7e6f4daf3ea7a /pkg/domain/infra/abi
parent252fc7cb9a75f2d956dbd1fbaca2d2c9a06993c5 (diff)
downloadpodman-eef39b69ee2ae6f70d4fcb7def29dff827d439e8.tar.gz
podman-eef39b69ee2ae6f70d4fcb7def29dff827d439e8.tar.bz2
podman-eef39b69ee2ae6f70d4fcb7def29dff827d439e8.zip
"pod pause/unpause/stop" append "report.Errs" to "reports"
There is a possibility that podman does not output expected error message. (e.g. When pause rootless cgroups v1 container on host) This problem is solved by appending `report.Errs` to `reports` before `continue`. [NO NEW TESTS NEEDED] Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/pods.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index 9a16f7fcd..03c8082c4 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -138,6 +138,7 @@ func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, op
errs, err := p.Pause(ctx)
if err != nil && !errors.Is(err, define.ErrPodPartialFail) {
report.Errs = []error{err}
+ reports = append(reports, &report)
continue
}
if len(errs) > 0 {
@@ -171,6 +172,7 @@ func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string,
errs, err := p.Unpause(ctx)
if err != nil && !errors.Is(err, define.ErrPodPartialFail) {
report.Errs = []error{err}
+ reports = append(reports, &report)
continue
}
if len(errs) > 0 {
@@ -196,6 +198,7 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
errs, err := p.StopWithTimeout(ctx, false, options.Timeout)
if err != nil && !errors.Is(err, define.ErrPodPartialFail) {
report.Errs = []error{err}
+ reports = append(reports, &report)
continue
}
if len(errs) > 0 {