Skip to content
Snippets Groups Projects
Commit 60a2c2e8 authored by Sergey Dudoladov's avatar Sergey Dudoladov
Browse files

Log conditions that prevent master pod migration

parent dc381c29
No related branches found
No related tags found
No related merge requests found
...@@ -58,15 +58,16 @@ func (c *Controller) nodeUpdate(prev, cur interface{}) { ...@@ -58,15 +58,16 @@ func (c *Controller) nodeUpdate(prev, cur interface{}) {
return return
} }
if util.MapContains(nodeCur.Labels, map[string]string{"master": "true"}) { if !c.nodeIsReady(nodePrev) {
c.logger.Debugf("The decommissioned node %v should have already triggered master pod migration. Previous k8s-reported state of the node: %v", util.NameFromMeta(nodePrev.ObjectMeta), nodePrev)
return return
} }
// do nothing if the node should have already triggered an update or if c.nodeIsReady(nodeCur) {
// if only one of the label and the unschedulability criteria are met. c.logger.Debugf("The decommissioned node %v become schedulable again. Current k8s-reported state of the node: %v", util.NameFromMeta(nodeCur.ObjectMeta), nodeCur)
if !c.nodeIsReady(nodePrev) || c.nodeIsReady(nodeCur) {
return return
} }
c.moveMasterPodsOffNode(nodeCur) c.moveMasterPodsOffNode(nodeCur)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment