From: Peter Amstutz Date: Thu, 6 Nov 2014 19:22:40 +0000 (-0500) Subject: 4334: Convert "idle*" state to "down" X-Git-Tag: 1.1.0~2022^2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/023517001bf8efd7d44ab33d2a79d92d2ff30a30 4334: Convert "idle*" state to "down" --- diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb index b3ab9bf06c..81e1ef96e3 100755 --- a/services/api/script/crunch-dispatch.rb +++ b/services/api/script/crunch-dispatch.rb @@ -93,6 +93,9 @@ class Dispatcher def slurm_status slurm_nodes = {} each_slurm_line("sinfo", "%t") do |hostname, state| + # Treat nodes in idle* state as down, because the * means that slurm + # hasn't been able to communicate with it recently. + state.sub!(/^idle\*/, "down") state.sub!(/\W+$/, "") state = "down" unless %w(idle alloc down).include?(state) slurm_nodes[hostname] = {state: state, job: nil}