Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion virtcontainers/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,12 @@ func (s *Sandbox) stopVM() error {
}

s.Logger().Info("Stopping VM")
return s.hypervisor.stopSandbox()
if err := s.hypervisor.stopSandbox(); err != nil {
s.store.Delete()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem right to cleanup the store when the stopSandbox() fails. I mean doing this from such low level function is not appropriate IMO.

return err
}

return nil
}

func (s *Sandbox) addContainer(c *Container) error {
Expand Down