[ADD] add debug log output

This commit is contained in:
zhoujunhao 2018-11-05 14:29:42 +08:00
parent 3be3b59b65
commit 3fd1014ffb
2 changed files with 5 additions and 1 deletions

View File

@ -316,10 +316,13 @@ func (n *Cluster) handleNodeStatus(v *client.HostNode) {
}
}
}
logrus.Info("start delete.......")
v.DeleteCondition("OutOfDisk")
logrus.Info("Conditions...", v.NodeStatus.Conditions)
v.DeleteCondition("MemoryPressure")
logrus.Info("Conditions...", v.NodeStatus.Conditions)
v.DeleteCondition("DiskPressure")
logrus.Info("Conditions...", v.NodeStatus.Conditions)
logrus.Debugf("delete condiction type OutOfDisk and MemoryPressure and DiskPressure")
//var haveready bool

View File

@ -226,6 +226,7 @@ func (n *HostNode) DeleteCondition(types ...NodeConditionType) {
for _, t := range types {
for i, c := range n.NodeStatus.Conditions {
if c.Type.Compare(t) {
logrus.Debugf(string(c.Type))
n.NodeStatus.Conditions = append(n.NodeStatus.Conditions[:i], n.NodeStatus.Conditions[i+1:]...)
break
}