Merge pull request #78 from dotcloud/77-undeleted_mountpoint-fix

Fix undeleted mountpoint on destroy
This commit is contained in:
Guillaume J. Charmes 2013-03-14 10:09:00 -07:00
commit 7188dcd96d

View file

@ -76,10 +76,9 @@ func (docker *Docker) Destroy(container *Container) error {
if err := container.Mountpoint.Umount(); err != nil {
log.Printf("Unable to umount container %v: %v", container.Id, err)
}
if err := container.Mountpoint.Deregister(); err != nil {
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
}
}
if err := container.Mountpoint.Deregister(); err != nil {
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
}
if err := os.RemoveAll(container.Root); err != nil {
log.Printf("Unable to remove filesystem for %v: %v", container.Id, err)