Getting rid of the socket timeout tunes, except for the kernel uploads. Now that the servers are more stable, they seem unnecessary and created some spurious failures.
Also fixing a bad patch application in job.py
Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2924 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/cli/job.py b/cli/job.py
index 2edac11..0b291a1 100755
--- a/cli/job.py
+++ b/cli/job.py
@@ -374,6 +374,7 @@
if self.ctrl_file_data:
uploading_kernel = 'kernel' in self.ctrl_file_data
if uploading_kernel:
+ default_timeout = socket.getdefaulttimeout()
socket.setdefaulttimeout(topic_common.UPLOAD_SOCKET_TIMEOUT)
print 'Uploading Kernel: this may take a while...',
sys.stdout.flush()
@@ -383,8 +384,8 @@
**self.ctrl_file_data)
finally:
if uploading_kernel:
- socket.setdefaulttimeout(
- topic_common.DEFAULT_SOCKET_TIMEOUT)
+ socket.setdefaulttimeout(default_timeout)
+
if uploading_kernel:
print 'Done'
self.data['control_file'] = cf_info['control_file']
@@ -439,13 +440,6 @@
self.data['meta_hosts']) = self.parse_hosts(host_list)
self.data['name'] = self.jobname
- socket.setdefaulttimeout(topic_common.LIST_SOCKET_TIMEOUT)
- # This RPC takes a while when there are lots of hosts.
- # We don't set it back to default because it's the last RPC.
-
- socket.setdefaulttimeout(topic_common.LIST_SOCKET_TIMEOUT)
- # This RPC takes a while when there are lots of hosts.
- # We don't set it back to default because it's the last RPC.
job_id = self.execute_rpc(op='create_job', **self.data)
return ['%s (id %s)' % (self.jobname, job_id)]