From 66f39eee5e3dbd3be2987e1bb467988cbae3abee Mon Sep 17 00:00:00 2001 From: Jake Correnti Date: Sun, 18 Feb 2024 22:24:43 -0500 Subject: [PATCH] machine: Remove unnecessary TODOs Remove TODO to swap `Rootful` in Inspect with `HostUser` It is unnecessary to remove the vfkit logfile in the provider-specific Remove function. Vfkit is fed the default logfile provided by mc.LogFile which is removed by the generic Remove function. Removes TODO regarding moving the location of Stop. False TODO. [NO NEW TESTS NEEDED] Signed-off-by: Jake Correnti --- cmd/podman/machine/inspect.go | 3 +-- pkg/machine/applehv/machine.go | 1 - pkg/machine/shim/host.go | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/podman/machine/inspect.go b/cmd/podman/machine/inspect.go index 81699268d0..ba2144a372 100644 --- a/cmd/podman/machine/inspect.go +++ b/cmd/podman/machine/inspect.go @@ -90,8 +90,7 @@ func inspect(cmd *cobra.Command, args []string) error { SSHConfig: mc.SSH, State: state, UserModeNetworking: provider.UserModeNetworkEnabled(mc), - // TODO I think this should be the HostUser - Rootful: mc.HostUser.Rootful, + Rootful: mc.HostUser.Rootful, } vms = append(vms, ii) diff --git a/pkg/machine/applehv/machine.go b/pkg/machine/applehv/machine.go index 4d9c0b68cc..d57ceb9292 100644 --- a/pkg/machine/applehv/machine.go +++ b/pkg/machine/applehv/machine.go @@ -21,7 +21,6 @@ func (a *AppleHVStubber) Remove(mc *vmconfigs.MachineConfig) ([]string, func() e mc.Lock() defer mc.Unlock() - // TODO we could delete the vfkit pid/log files if we wanted to be thorough return []string{}, func() error { return nil }, nil } diff --git a/pkg/machine/shim/host.go b/pkg/machine/shim/host.go index 03a979af2d..8ecd99d9be 100644 --- a/pkg/machine/shim/host.go +++ b/pkg/machine/shim/host.go @@ -306,7 +306,6 @@ func getMCsOverProviders(vmstubbers []vmconfigs.VMProvider) (map[string]*vmconfi } // Stop stops the machine as well as supporting binaries/processes -// TODO: I think this probably needs to go somewhere that remove can call it. func Stop(mc *vmconfigs.MachineConfig, mp vmconfigs.VMProvider, dirs *machineDefine.MachineDirs, hardStop bool) error { // state is checked here instead of earlier because stopping a stopped vm is not considered // an error. so putting in one place instead of sprinkling all over.