Add extra debugging info on git failure
Fetching from git sometimes fails. Log the IP in these cases
so we can investigate the git.o.o logs
Change-Id: I09994cf0706670c44412f5d6da97c67329b40d1b
diff --git a/tests/test_shell_task.py b/tests/test_shell_task.py
index 9a4e0ff..407e335 100644
--- a/tests/test_shell_task.py
+++ b/tests/test_shell_task.py
@@ -188,7 +188,7 @@
task_output_lines = task_output_file.readlines()
self.assertIn("Step 1: Setup environment", task_output_lines[0])
self.assertIn("Something failed running the job!",
- task_output_lines[5])
+ task_output_lines[6])
self.assertIn("Exception: check results failed!",
task_output_lines[len(task_output_lines) - 1])
diff --git a/turbo_hipster/lib/models.py b/turbo_hipster/lib/models.py
index 7029aea..ad7ec86 100644
--- a/turbo_hipster/lib/models.py
+++ b/turbo_hipster/lib/models.py
@@ -289,6 +289,7 @@
self.job_results_dir,
'shell_output.log'
)
+ self.log.info('Working on node %s' % (os.uname()[1]))
@common.task_step
def _grab_patchset(self, job_args):
@@ -322,6 +323,8 @@
if tries >= 3:
break
if return_code != 0:
+ cmd = 'ifconfig'
+ utils.execute_to_log(cmd, self.git_prep_log)
raise Exception("Failed to fetch patchset")
self.git_path = local_path
return local_path