Handle the case of multiple HQEs with Hosts already assigned (but still
Queued) for an atomic group job.  This is valid and can be used for jobs
that want to use a set of specific hosts within an atomic group.

Signed-off-by: Gregory Smith <[email protected]>

--- autotest/cli/contrib/why_isnt_my_job_running.py     2010-02-10 
10:57:39.000000000 -0800
+++ autotest/cli/contrib/why_isnt_my_job_running.py     2010-02-10 
10:57:39.000000000 -0800
@@ -50,7 +50,12 @@
         if queue_entry['status'] in ('Completed', 'Stopped'):
             print 'This job has already finished.'
             sys.exit(0)
-    if len(queue_entries) > 1 and not repair_hostnames:
+    queue_entries_with_hosts = [queue_entry for queue_entry in queue_entries
+                                if queue_entry['host']]
+    all_queue_entries_have_hosts = (len(queue_entries) ==
+                                    len(queue_entries_with_hosts))
+    if (not all_queue_entries_have_hosts and len(queue_entries) > 1 and
+        not repair_hostnames):
         # We test repair_hostnames so that this message is not printed when
         # the script is run on an atomic group job which has hosts assigned
         # but is not running because too many of them are in Repairing or will
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to