diff options
author | Ashley Cui <acui@redhat.com> | 2022-04-27 16:56:48 -0400 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2022-05-04 10:31:42 -0400 |
commit | 80744c644135899a6dcc9fbe1b421dc08fc79802 (patch) | |
tree | a924d1cc59c0d99ca83f2d07800ae8655561977a /cmd/podman/machine | |
parent | 698cb730a1a7d36bc36e447969928ccb0a6317df (diff) | |
download | podman-80744c644135899a6dcc9fbe1b421dc08fc79802.tar.gz podman-80744c644135899a6dcc9fbe1b421dc08fc79802.tar.bz2 podman-80744c644135899a6dcc9fbe1b421dc08fc79802.zip |
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 <acui@redhat.com>
Diffstat (limited to 'cmd/podman/machine')
-rw-r--r-- | cmd/podman/machine/init.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/inspect.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/list.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/machine.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/platform.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/platform_windows.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/rm.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/set.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/ssh.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/start.go | 2 | ||||
-rw-r--r-- | cmd/podman/machine/stop.go | 2 |
11 files changed, 11 insertions, 11 deletions
diff --git a/cmd/podman/machine/init.go b/cmd/podman/machine/init.go index 4991c6aa3..912d1d0b3 100644 --- a/cmd/podman/machine/init.go +++ b/cmd/podman/machine/init.go @@ -117,7 +117,7 @@ func initMachine(cmd *cobra.Command, args []string) error { vm machine.VM ) - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() initOpts.Name = defaultMachineName if len(args) > 0 { if len(args[0]) > maxMachineNameSize { diff --git a/cmd/podman/machine/inspect.go b/cmd/podman/machine/inspect.go index 21e5074b7..efbc32832 100644 --- a/cmd/podman/machine/inspect.go +++ b/cmd/podman/machine/inspect.go @@ -52,7 +52,7 @@ func inspect(cmd *cobra.Command, args []string) error { args = append(args, defaultMachineName) } vms := make([]machine.InspectInfo, 0, len(args)) - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() for _, vmName := range args { vm, err := provider.LoadVMByName(vmName) if err != nil { diff --git a/cmd/podman/machine/list.go b/cmd/podman/machine/list.go index c987bf71a..aca05dbe6 100644 --- a/cmd/podman/machine/list.go +++ b/cmd/podman/machine/list.go @@ -85,7 +85,7 @@ func list(cmd *cobra.Command, args []string) error { listFlag.format = "{{.Name}}\n" } - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() listResponse, err = provider.List(opts) if err != nil { return errors.Wrap(err, "error listing vms") diff --git a/cmd/podman/machine/machine.go b/cmd/podman/machine/machine.go index d3775f022..890349465 100644 --- a/cmd/podman/machine/machine.go +++ b/cmd/podman/machine/machine.go @@ -51,7 +51,7 @@ func autocompleteMachine(cmd *cobra.Command, args []string, toComplete string) ( func getMachines(toComplete string) ([]string, cobra.ShellCompDirective) { suggestions := []string{} - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() machines, err := provider.List(machine.ListOptions{}) if err != nil { cobra.CompErrorln(err.Error()) diff --git a/cmd/podman/machine/platform.go b/cmd/podman/machine/platform.go index 77fec083e..5ba649a48 100644 --- a/cmd/podman/machine/platform.go +++ b/cmd/podman/machine/platform.go @@ -8,6 +8,6 @@ import ( "github.com/containers/podman/v4/pkg/machine/qemu" ) -func getSystemDefaultProvider() machine.Provider { +func GetSystemDefaultProvider() machine.Provider { return qemu.GetQemuProvider() } diff --git a/cmd/podman/machine/platform_windows.go b/cmd/podman/machine/platform_windows.go index 03978eda1..cdbc52459 100644 --- a/cmd/podman/machine/platform_windows.go +++ b/cmd/podman/machine/platform_windows.go @@ -5,6 +5,6 @@ import ( "github.com/containers/podman/v4/pkg/machine/wsl" ) -func getSystemDefaultProvider() machine.Provider { +func GetSystemDefaultProvider() machine.Provider { return wsl.GetWSLProvider() } diff --git a/cmd/podman/machine/rm.go b/cmd/podman/machine/rm.go index 617a70a76..5d30e97b4 100644 --- a/cmd/podman/machine/rm.go +++ b/cmd/podman/machine/rm.go @@ -60,7 +60,7 @@ func rm(cmd *cobra.Command, args []string) error { vmName = args[0] } - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() vm, err = provider.LoadVMByName(vmName) if err != nil { return err diff --git a/cmd/podman/machine/set.go b/cmd/podman/machine/set.go index a994c981b..5777882da 100644 --- a/cmd/podman/machine/set.go +++ b/cmd/podman/machine/set.go @@ -83,7 +83,7 @@ func setMachine(cmd *cobra.Command, args []string) error { if len(args) > 0 && len(args[0]) > 0 { vmName = args[0] } - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() vm, err = provider.LoadVMByName(vmName) if err != nil { return err diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go index e1175d632..4a86da67a 100644 --- a/cmd/podman/machine/ssh.go +++ b/cmd/podman/machine/ssh.go @@ -51,7 +51,7 @@ func ssh(cmd *cobra.Command, args []string) error { // Set the VM to default vmName := defaultMachineName - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() // If len is greater than 0, it means we may have been // provided the VM name. If so, we check. The VM name, diff --git a/cmd/podman/machine/start.go b/cmd/podman/machine/start.go index 56acb09cb..69d67596e 100644 --- a/cmd/podman/machine/start.go +++ b/cmd/podman/machine/start.go @@ -41,7 +41,7 @@ func start(cmd *cobra.Command, args []string) error { vmName = args[0] } - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() vm, err = provider.LoadVMByName(vmName) if err != nil { return err diff --git a/cmd/podman/machine/stop.go b/cmd/podman/machine/stop.go index e6bf3cf2b..778760c65 100644 --- a/cmd/podman/machine/stop.go +++ b/cmd/podman/machine/stop.go @@ -40,7 +40,7 @@ func stop(cmd *cobra.Command, args []string) error { if len(args) > 0 && len(args[0]) > 0 { vmName = args[0] } - provider := getSystemDefaultProvider() + provider := GetSystemDefaultProvider() vm, err = provider.LoadVMByName(vmName) if err != nil { return err |