Kill gvproxy when machine rm -f

In applehv, we were not killing gvproxy when stopping via podman machine rm with force.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2023-10-18 12:12:23 -05:00
parent 02757ab20d
commit d4d76479c1

View File

@ -397,6 +397,11 @@ func (m *MacMachine) Remove(name string, opts machine.RemoveOptions) (string, fu
if err := m.Vfkit.stop(true, true); err != nil { if err := m.Vfkit.stop(true, true); err != nil {
return "", nil, err return "", nil, err
} }
defer func() {
if err := machine.CleanupGVProxy(m.GvProxyPid); err != nil {
logrus.Error(err)
}
}()
} }
files = m.collectFilesToDestroy(opts) files = m.collectFilesToDestroy(opts)