kpod: shut down the storage library before exiting
Before exiting, have kpod shut down the storage library if it can. This should keep us from leaving mountpoints for the root (for non-vfs cases) and run directory (with newer containers/storage) busy when testing kpod. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
3a2518ce33
commit
ef8df00e6a
8 changed files with 33 additions and 2 deletions
|
@ -570,7 +570,10 @@ func (c *ContainerServer) ReleasePodName(name string) {
|
|||
// Shutdown attempts to shut down the server's storage cleanly
|
||||
func (c *ContainerServer) Shutdown() error {
|
||||
_, err := c.store.Shutdown(false)
|
||||
return err
|
||||
if err != nil && errors.Cause(err) != cstorage.ErrLayerUsedByContainer {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type containerServerState struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue