[ARVADOS] updated: 5968d7ea9a7dc26d4915c4128b27bf75a11a6383

git at public.curoverse.com git at public.curoverse.com
Mon Jul 7 15:05:43 EDT 2014


Summary of changes:
 services/api/script/crunch-dispatch.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

       via  5968d7ea9a7dc26d4915c4128b27bf75a11a6383 (commit)
      from  58c4c9004cb4d3cf237831ffe32e64d530c320d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5968d7ea9a7dc26d4915c4128b27bf75a11a6383
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jul 7 15:04:52 2014 -0400

    crunch-dispatch: make sure to update the info['slurm_state'] for the
    correct node, not just the first one that happens to have a matching
    hostname in our database.
    
    no issue #

diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index c39c8ea..5a990f0 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -78,7 +78,7 @@ class Dispatcher
           # update our database (and cache) when a node's state changes
           if @node_state[re[1]] != re[2]
             @node_state[re[1]] = re[2]
-            node = Node.where('hostname=?', re[1]).first
+            node = Node.where('hostname=?', re[1]).order(:last_ping_at).last
             if node
               $stderr.puts "dispatch: update #{re[1]} state to #{re[2]}"
               node.info['slurm_state'] = re[2]

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list