On verify failure for a synch job, stop all other queue_entries, not just active ones.

Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@1279 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/scheduler/monitor_db b/scheduler/monitor_db
index 0a81ddf..475f849 100755
--- a/scheduler/monitor_db
+++ b/scheduler/monitor_db
@@ -532,14 +532,20 @@
 					self.agent.dispatcher.add_agent(job.run(self.queue_entry))
 			else:
 				self.queue_entry.set_status('Stopped') # some other entry failed verify
-		else:		
+		else:
 			if self.queue_entry.meta_host:
 				self.queue_entry.set_status('Queued')
 			else:
-				job = self.queue_entry.job
-				for child_entry in job.get_host_queue_entries():
-					if child_entry.active:
-						child_entry.set_status('Stopped')
+				# VerifyTask.epilog() set this queue entry to
+				# failed, so it won't be set to stopped
+				self.stop_all_entries()
+
+
+	def stop_all_entries(self):
+		job = self.queue_entry.job
+		for child_entry in job.get_host_queue_entries():
+			if not child_entry.complete:
+				child_entry.set_status('Stopped')
 
 
 class QueueTask(AgentTask):