Skip to content

Commit

Permalink
Merge branch 'bug/remove-container' into 'master'
Browse files Browse the repository at this point in the history
remove container from etcd only if container is successfully removed

See merge request !79
  • Loading branch information
timfeirg committed Apr 11, 2017
2 parents 2897f2f + 141623e commit e5356e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cluster/calcium/remove_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ func (c *calcium) removeOneContainer(container *types.Container, info enginetype
return
}
}
//TODO 记录操作日志
c.store.UpdateNodeMem(node.Podname, node.Name, container.Memory, "+")
c.store.RemoveContainer(info.ID)
}()

// before stop
Expand All @@ -169,5 +167,6 @@ func (c *calcium) removeOneContainer(container *types.Container, info enginetype
log.Errorf("Error during ContainerRemove: %s", err.Error())
return err
}
c.store.RemoveContainer(info.ID)
return nil
}

0 comments on commit e5356e4

Please sign in to comment.