mirror of https://github.com/containers/podman.git
Updated pod_api to reflect function spec
Specifically, pod.Start() always returned CtrErrors, even if none failed. This cause podman start to not return the successfully started pod id. Also, pod.Kill() didn't return an error along with ctrErrors. Signed-off-by: haircommander <pehunt@redhat.com> Closes: #1272 Approved by: rhatdan
This commit is contained in:
parent
3445abd89d
commit
77baae25ce
|
@ -55,7 +55,11 @@ func (p *Pod) Start(ctx context.Context) (map[string]error, error) {
|
|||
startNode(ctx, node, false, ctrErrors, ctrsVisited, false)
|
||||
}
|
||||
|
||||
return ctrErrors, nil
|
||||
if len(ctrErrors) > 0 {
|
||||
return ctrErrors, errors.Wrapf(ErrCtrExists, "error starting some containers")
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Stop stops all containers within a pod that are not already stopped
|
||||
|
@ -352,7 +356,7 @@ func (p *Pod) Kill(signal uint) (map[string]error, error) {
|
|||
}
|
||||
|
||||
if len(ctrErrors) > 0 {
|
||||
return ctrErrors, nil
|
||||
return ctrErrors, errors.Wrapf(ErrCtrExists, "error killing some containers")
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
|
|
Loading…
Reference in New Issue