not restore mem when container is cpu prior
@@ -133,11 +133,13 @@ func (c *calcium) removeOneContainer(container *types.Container, info enginetype
if container.CPU.Total() > 0 {
log.Debugf("[removeOneContainer] Restore node cpu: %v, %v", node, container.CPU)
if err := c.store.UpdateNodeCPU(node.Podname, node.Name, container.CPU, "+"); err != nil {
- log.Errorf("Update Node CPU failed %s", err.Error())
+ log.Errorf("Update Node CPU failed %v", err)
+ }
return
}
+ if err := c.store.UpdateNodeMem(node.Podname, node.Name, container.Memory, "+"); err != nil {
+ log.Errorf("Update Node Memory failed %v", err)
}
- c.store.UpdateNodeMem(node.Podname, node.Name, container.Memory, "+")
}()
// before stop
