Skip to content

Commit

Permalink
Fix if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
vcatlassian committed Jun 15, 2023
1 parent dc722f2 commit d21df6b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/controller/cyclenoderequest/transitioner/transitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func (t *CycleNodeRequestTransitioner) transitionHealing() (reconcile.Result, er
if err != nil {
return t.transitionToFailed(err)
}

if !nodeExists {
t.rm.LogEvent(t.cycleNodeRequest,
"HealingNodes", "Node does not exist, skip healing node: %s", node.Name)
Expand All @@ -533,13 +533,11 @@ func (t *CycleNodeRequestTransitioner) transitionHealing() (reconcile.Result, er

// try and re-attach the nodes, if any were un-attached
t.rm.LogEvent(t.cycleNodeRequest, "AttachingNodes", "Attaching instances to nodes group: %v", node.Name)
alreadyAttached, err := nodeGroups.AttachInstance(node.ProviderID, node.NodeGroupName)
if alreadyAttached {
if alreadyAttached, err := nodeGroups.AttachInstance(node.ProviderID, node.NodeGroupName); alreadyAttached {
t.rm.LogEvent(t.cycleNodeRequest,
"AttachingNodes", "Skip re-attaching instances to nodes group: %v, err: %v",
node.Name, err)
}
if err != nil {
} else if err != nil {
return t.transitionToFailed(err)
}

Expand Down

0 comments on commit d21df6b

Please sign in to comment.