allocrunner: Standardised discard logs

Follow up from https://github.com/hashicorp/nomad/pull/5007#pullrequestreview-186739124
This commit is contained in:
Danielle Tomlinson
2019-01-03 14:04:31 +01:00
parent 26b5ad4532
commit acf2c524f3

View File

@@ -650,13 +650,13 @@ func (ar *allocRunner) Update(update *structs.Allocation) {
// and return. This case shouldn't happen, but may in the case of a bug
// elsewhere inside the system.
if oldUpdate.AllocModifyIndex > update.AllocModifyIndex {
ar.logger.Warn("Discarding allocation update due to newer alloc revision in queue",
ar.logger.Debug("Discarding allocation update due to newer alloc revision in queue",
"old_modify_index", oldUpdate.AllocModifyIndex,
"new_modify_index", update.AllocModifyIndex)
ar.allocUpdatedCh <- oldUpdate
return
} else {
ar.logger.Trace("Discarding allocation update",
ar.logger.Debug("Discarding allocation update",
"skipped_modify_index", oldUpdate.AllocModifyIndex,
"new_modify_index", update.AllocModifyIndex)
}