From 80744c644135899a6dcc9fbe1b421dc08fc79802 Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Wed, 27 Apr 2022 16:56:48 -0400 Subject: podman system reset removed machines incorrectly podman system reset did not clean up machines fully, leaving some config files, and breaking machines. Now it removes all machines files fully. Signed-off-by: Ashley Cui --- cmd/podman/system/reset.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmd/podman/system/reset.go') diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go index 8f2e73375..176573bf6 100644 --- a/cmd/podman/system/reset.go +++ b/cmd/podman/system/reset.go @@ -61,7 +61,9 @@ func reset(cmd *cobra.Command, args []string) { - all pods - all images - all networks - - all build cache`) + - all build cache + - all machines`) + if len(listCtn) > 0 { fmt.Println(`WARNING! The following external containers will be purged:`) // print first 12 characters of ID and first configured name alias @@ -103,5 +105,11 @@ func reset(cmd *cobra.Command, args []string) { //nolint:gocritic os.Exit(define.ExecErrorCodeGeneric) } + + // Shutdown podman-machine and delete all machine files + if err := resetMachine(); err != nil { + logrus.Error(err) + } + os.Exit(0) } -- cgit v1.2.3-54-g00ecf