From 548f1516dedbd9574f624967d7022d52eb4d6c13 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 25 Nov 2017 09:37:50 -0500 Subject: kpod run, needs to shutdown the storage driver when done Signed-off-by: Daniel J Walsh Closes: #73 Approved by: mheon --- cmd/kpod/create.go | 2 +- cmd/kpod/run.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go index 9e4162993..2684f8927 100644 --- a/cmd/kpod/create.go +++ b/cmd/kpod/create.go @@ -149,6 +149,7 @@ func createCmd(c *cli.Context) error { if err != nil { return errors.Wrapf(err, "error creating libpod runtime") } + defer runtime.Shutdown(false) createConfig, err := parseCreateOpts(c, runtime) if err != nil { @@ -169,7 +170,6 @@ func createCmd(c *cli.Context) error { if err != nil { return err } - defer runtime.Shutdown(false) if createImage.LocalName != "" { imageName = createImage.LocalName } else { diff --git a/cmd/kpod/run.go b/cmd/kpod/run.go index 35e2d0be7..275654f65 100644 --- a/cmd/kpod/run.go +++ b/cmd/kpod/run.go @@ -28,10 +28,10 @@ func runCmd(c *cli.Context) error { return err } runtime, err := getRuntime(c) - if err != nil { return errors.Wrapf(err, "error creating libpod runtime") } + defer runtime.Shutdown(false) createConfig, err := parseCreateOpts(c, runtime) if err != nil { @@ -51,7 +51,6 @@ func runCmd(c *cli.Context) error { if err != nil { return err } - defer runtime.Shutdown(false) logrus.Debug("spec is ", runtimeSpec) if createImage.LocalName != "" { -- cgit v1.2.3-54-g00ecf