Set the SYNC_COUNT to be the test's sync_count now that the
min sync count logic works
Signed-off-by: Martin Bligh <mbligh@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@3406 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/frontend.py b/server/frontend.py
index caf14a2..28dfe29 100644
--- a/server/frontend.py
+++ b/server/frontend.py
@@ -237,7 +237,8 @@
dargs['dependencies'] = dargs.get('dependencies', []) + \
control_file.dependencies
dargs['control_file'] = control_file.control_file
- dargs.setdefault('synch_count', control_file.synch_count)
+ if not dargs['synch_count']:
+ dargs['synch_count'] = control_file.synch_count
if 'hosts' in dargs and len(dargs['hosts']) < dargs['synch_count']:
# will not be able to satisfy this request
return None
@@ -413,13 +414,8 @@
dead_statuses = self.host_statuses(live=False)
host_list = [h.hostname for h in hosts if h.status not in dead_statuses]
print 'HOSTS: %s' % host_list
- # TODO(ncrao): fix this when synch_count implements "at least N"
- # semantics instead of "exactly N".
if pairing.atomic_group_sched:
- if pairing.synch_count > 0:
- dargs['synch_count'] = pairing.synch_count
- else:
- dargs['synch_count'] = len(host_list)
+ dargs['synch_count'] = pairing.synch_count
dargs['atomic_group_name'] = pairing.machine_label
else:
dargs['hosts'] = host_list