oci: fixes to properly handle container stop action
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
bb737b9121
commit
9b797f0cb9
9 changed files with 54 additions and 31 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/kubernetes-incubator/cri-o/libkpod"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/urfave/cli"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -61,7 +62,7 @@ func stopCmd(c *cli.Context) error {
|
|||
}
|
||||
var lastError error
|
||||
for _, container := range c.Args() {
|
||||
cid, err := server.ContainerStop(container, stopTimeout)
|
||||
cid, err := server.ContainerStop(context.Background(), container, stopTimeout)
|
||||
if err != nil {
|
||||
if lastError != nil {
|
||||
fmt.Fprintln(os.Stderr, lastError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue