Skip to content

Commit

Permalink
AppleHV: update LastUp time
Browse files Browse the repository at this point in the history
LastUp now correctly reports the lastUp time for podman machine on
AppleHV, for both inspect and list.

[NO NEW TESTS NEEDED]
since this fixes an existing failing test.

Signed-off-by: Ashley Cui <[email protected]>
  • Loading branch information
ashley-cui committed Jan 12, 2024
1 parent e06abd1 commit f374e07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/machine/applehv/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,13 @@ func (m *MacMachine) Stop(name string, opts machine.StopOptions) error {
logrus.Error(err)
}
}()
if err := m.Vfkit.Stop(false, true); err != nil {
return err
}

return m.Vfkit.Stop(false, true)
// keep track of last up
m.LastUp = time.Now()
return m.writeConfig()
}

// getVMConfigPath is a simple wrapper for getting the fully-qualified
Expand Down

0 comments on commit f374e07

Please sign in to comment.