@@ -703,33 +703,34 @@ func WaitForNodeCurrentConfig(oc *exutil.CLI, nodeName string, config string) {
703703 }, 5 * time .Minute , 10 * time .Second ).Should (o .BeTrue (), "Timed out waiting for node '%v' to have a current config version of '%v'." , nodeName , config )
704704}
705705
706- // `GetCordonedNode` returns the cordoned node when the corresponding MCP starts updating
707- func GetCordonedNode (oc * exutil.CLI , mcpName string ) corev1.Node {
706+ // `GetUpdatingNode` returns the updating node, determined by the node targetting a new desired
707+ // config, when the corresponding MCP starts updating
708+ func GetUpdatingNode (oc * exutil.CLI , mcpName , originalConfigVersion string ) corev1.Node {
708709 // Wait for the MCP to start updating
709710 o .Expect (WaitForMCPConditionStatus (oc , mcpName , mcfgv1 .MachineConfigPoolUpdating , corev1 .ConditionTrue , 3 * time .Minute , 2 * time .Second )).NotTo (o .HaveOccurred (), "Waiting for 'Updating' status change failed." )
710711
711- // Get first cordoned node & return it
712- var cordonedNode corev1.Node
712+ // Get first updating node & return it
713+ var updatingNode corev1.Node
713714 o .Eventually (func () bool {
714- framework .Logf ("Trying to get cordoned node in '%v' MCP." , mcpName )
715+ framework .Logf ("Trying to get updating node in '%v' MCP." , mcpName )
715716
716717 // Get nodes in MCP
717718 nodes , nodeErr := GetNodesByRole (oc , mcpName )
718719 o .Expect (nodeErr ).NotTo (o .HaveOccurred (), "Error getting nodes from %v MCP." , mcpName )
719720 o .Expect (nodes ).ShouldNot (o .BeEmpty (), "No nodes found for %v MCP." , mcpName )
720721
721- // Loop through nodes to see which is cordoned
722+ // Loop through nodes to see which is targetting a new desired config version
722723 for _ , node := range nodes {
723- if node .Spec . Unschedulable {
724- cordonedNode = node
724+ if node .Annotations [ desiredConfigAnnotationKey ] != originalConfigVersion {
725+ updatingNode = node
725726 return true
726727 }
727728 }
728729
729730 return false
730- }, 1 * time .Minute , 5 * time .Second ).Should (o .BeTrue ())
731+ }, 30 * time .Second , 1 * time .Second ).Should (o .BeTrue ())
731732
732- return cordonedNode
733+ return updatingNode
733734}
734735
735736// `WaitForMCPConditionStatus` waits up to the desired timeout for the desired MCP condition to match the desired status (ex. wait until "Updating" is "True")
0 commit comments