Remove outstanding reset from plan applier
This commit is contained in:
parent
5bcfdeb41d
commit
330aec45b9
|
@ -78,7 +78,6 @@ type unackEval struct {
|
|||
Eval *structs.Evaluation
|
||||
Token string
|
||||
NackTimer *time.Timer
|
||||
Paused bool
|
||||
}
|
||||
|
||||
// PendingEvaluations is a list of waiting evaluations.
|
||||
|
@ -420,7 +419,7 @@ func (b *EvalBroker) OutstandingReset(evalID, token string) error {
|
|||
if unack.Token != token {
|
||||
return ErrTokenMismatch
|
||||
}
|
||||
if !unack.Paused && !unack.NackTimer.Reset(b.nackTimeout) {
|
||||
if !unack.NackTimer.Reset(b.nackTimeout) {
|
||||
return ErrNackTimeoutReached
|
||||
}
|
||||
return nil
|
||||
|
@ -526,7 +525,6 @@ func (b *EvalBroker) PauseNackTimeout(evalID, token string) error {
|
|||
if !unack.NackTimer.Stop() {
|
||||
return ErrNackTimeoutReached
|
||||
}
|
||||
unack.Paused = true
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -543,7 +541,6 @@ func (b *EvalBroker) ResumeNackTimeout(evalID, token string) error {
|
|||
return ErrTokenMismatch
|
||||
}
|
||||
unack.NackTimer.Reset(b.nackTimeout)
|
||||
unack.Paused = false
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -59,14 +59,6 @@ func (s *Server) planApply() {
|
|||
return
|
||||
}
|
||||
|
||||
// Verify the evaluation is outstanding, and that the tokens match.
|
||||
if err := s.evalBroker.OutstandingReset(pending.plan.EvalID, pending.plan.EvalToken); err != nil {
|
||||
s.logger.Printf("[ERR] nomad: plan rejected for evaluation %s: %v",
|
||||
pending.plan.EvalID, err)
|
||||
pending.respond(nil, err)
|
||||
continue
|
||||
}
|
||||
|
||||
// Check if out last plan has completed
|
||||
select {
|
||||
case <-waitCh:
|
||||
|
|
Loading…
Reference in New Issue