From 9b2c312aa346c1e3093d80c49baebe9b14651473 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Thu, 26 Feb 2015 13:18:37 +1100 Subject: 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 --- tests/test_shell_task.py | 2 +- turbo_hipster/lib/models.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 @@ class TestTaskRunner(base.TestWithGearman): 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 @@ class ShellTask(Task): 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 @@ class ShellTask(Task): 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 -- cgit v1.2.1