Skip to content

Commit

Permalink
remove unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
mismithhisler committed Feb 4, 2025
1 parent 379040f commit 6539b86
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions nomad/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,21 +948,20 @@ func (n *nomadFSM) applyAllocClientUpdate(msgType structs.MessageType, buf []byt
}
}

// Update any evals first. During a reschedule, we don't want to mark the job dead, which
// would happen if all the allocs were terminal and there wasn't a pending eval
// Update all the client allocations
if err := n.state.UpdateAllocsFromClient(msgType, index, req.Alloc); err != nil {
n.logger.Error("UpdateAllocFromClient failed", "error", err)
return err
}

// Update any evals
if len(req.Evals) > 0 {
if err := n.upsertEvals(msgType, index, req.Evals); err != nil {
n.logger.Error("applyAllocClientUpdate failed to update evaluations", "error", err)
return err
}
}

// Update all the client allocations
if err := n.state.UpdateAllocsFromClient(msgType, index, req.Alloc); err != nil {
n.logger.Error("UpdateAllocFromClient failed", "error", err)
return err
}

// Unblock evals for the nodes computed node class if the client has
// finished running an allocation.
for _, alloc := range req.Alloc {
Expand Down

0 comments on commit 6539b86

Please sign in to comment.