[ARVADOS] created: 1d82425461917af37cc6c5e1b2c87276b1a8fc8d

Git user git at public.curoverse.com
Mon Jan 16 16:26:26 EST 2017


        at  1d82425461917af37cc6c5e1b2c87276b1a8fc8d (commit)


commit 1d82425461917af37cc6c5e1b2c87276b1a8fc8d
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jan 16 16:26:13 2017 -0500

    10868: Log job runtime constraints and node properties when making a dispatch decision.

diff --git a/services/api/lib/crunch_dispatch.rb b/services/api/lib/crunch_dispatch.rb
index 48b0eb5..dc6a16e 100644
--- a/services/api/lib/crunch_dispatch.rb
+++ b/services/api/lib/crunch_dispatch.rb
@@ -169,7 +169,19 @@ class CrunchDispatch
       end
       usable_nodes << node
       if usable_nodes.count >= min_node_count
-        return usable_nodes.map { |n| n.hostname }
+        hostnames = usable_nodes.map(&:hostname)
+        log_nodes = usable_nodes.map do |n|
+          "#{n.hostname} #{n.uuid} #{n.properties.to_json}"
+        end
+        log_job = "#{job.uuid} #{job.runtime_constraints}"
+        log_text = "dispatching job #{log_job} to #{log_nodes.join(", ")}"
+        $stderr.puts log_text
+        Log.new(object_uuid: job.uuid,
+                event_type: 'dispatch',
+                owner_uuid: system_user_uuid,
+                summary: "dispatching to #{hostnames.join(", ")}",
+                properties: {'text' => log_text})
+        return hostnames
       end
     end
     nil

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list