From 3921f10a729054c23296f392b0f271c1ac5e5770 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Tue, 6 Feb 2018 16:51:05 -0500 Subject: cleanup network stack as well as storage when container shuts down. This patch will cleanup the network stack when the container exits Signed-off-by: Daniel J Walsh --- cmd/podman/run.go | 2 +- cmd/podman/start.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/podman') diff --git a/cmd/podman/run.go b/cmd/podman/run.go index 97f60cdbf..2f3468fd2 100644 --- a/cmd/podman/run.go +++ b/cmd/podman/run.go @@ -145,5 +145,5 @@ func runCmd(c *cli.Context) error { if createConfig.Rm { return runtime.RemoveContainer(ctr, true) } - return ctr.CleanupStorage() + return ctr.Cleanup() } diff --git a/cmd/podman/start.go b/cmd/podman/start.go index 0dad5e237..18e8f7766 100644 --- a/cmd/podman/start.go +++ b/cmd/podman/start.go @@ -138,6 +138,10 @@ func startCmd(c *cli.Context) error { } else { exitCode = int(ecode) } + if lastError != nil { + fmt.Fprintln(os.Stderr, lastError) + } + lastError = ctr.Cleanup() } return lastError } -- cgit v1.2.3-54-g00ecf