Skip to content

Commit

Permalink
Fix corner case for pausing machine config
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Sch <[email protected]>
  • Loading branch information
SchSeba committed Nov 11, 2024
1 parent 92fee7b commit d10db66
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/platforms/openshift/openshift.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ func (c *openshiftContext) OpenshiftAfterCompleteDrainNode(ctx context.Context,
return false, err
}

value, exist := mcp.Annotations[consts.MachineConfigPoolPausedAnnotation]
// if the label doesn't exist we just return true here
// this can be a case where the node was moved to another MCP in the time we start the drain
if !exist {
return true, nil
}
// check if the sriov annotation on mcp is idle
// if the value is idle we just return here
if value == consts.MachineConfigPoolPausedAnnotationIdle {
return true, nil
}

// get all the nodes that belong to this machine config pool to validate this is the last node
// request to complete the drain
nodesInPool := &corev1.NodeList{}
Expand Down

0 comments on commit d10db66

Please sign in to comment.