pkg, pods: not lose pod start/restart errors

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2020-04-27 13:41:08 +02:00
parent 246c0053c1
commit 4028215b6a
No known key found for this signature in database
GPG Key ID: E4730F97F60286ED
1 changed files with 2 additions and 0 deletions

View File

@ -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 {