Using the node in the req to unblock evals

This commit is contained in:
Diptanu Choudhury
2016-03-31 18:19:01 -07:00
parent 621ae065d9
commit e5c19d4524

View File

@@ -158,13 +158,7 @@ func (n *nomadFSM) applyUpsertNode(buf []byte, index uint64) interface{} {
// Unblock evals for the nodes computed node class if it is in a ready
// state.
if req.Node.Status == structs.NodeStatusReady {
node, err := n.state.NodeByID(req.Node.ID)
if err != nil {
n.logger.Printf("[ERR] nomad.fsm: looking up node %q failed: %v", req.Node.ID, err)
return err
}
n.blockedEvals.Unblock(node.ComputedClass)
n.blockedEvals.Unblock(req.Node.ComputedClass)
}
return nil