mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 14:31:40 +02:00
Log conditions that prevent master pod migration
This commit is contained in:
@@ -58,15 +58,16 @@ func (c *Controller) nodeUpdate(prev, cur interface{}) {
|
||||
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
|
||||
}
|
||||
|
||||
// do nothing if the node should have already triggered an update or
|
||||
// if only one of the label and the unschedulability criteria are met.
|
||||
if !c.nodeIsReady(nodePrev) || c.nodeIsReady(nodeCur) {
|
||||
if c.nodeIsReady(nodeCur) {
|
||||
c.logger.Debugf("The decommissioned node %v become schedulable again. Current k8s-reported state of the node: %v", util.NameFromMeta(nodeCur.ObjectMeta), nodeCur)
|
||||
return
|
||||
}
|
||||
|
||||
c.moveMasterPodsOffNode(nodeCur)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user