summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Hesketh <josh@nitrotech.org>2015-02-26 13:18:37 +1100
committerJoshua Hesketh <josh@nitrotech.org>2015-02-26 13:30:41 +1100
commit9b2c312aa346c1e3093d80c49baebe9b14651473 (patch)
treeb261e9cfc7527fe592e35635bf744f280a64ad3f
parentdc88e429a77f5394f9c7ec146678f82319eb3e59 (diff)
downloadturbo-hipster-9b2c312aa346c1e3093d80c49baebe9b14651473.tar.gz
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
-rw-r--r--tests/test_shell_task.py2
-rw-r--r--turbo_hipster/lib/models.py3
2 files changed, 4 insertions, 1 deletions
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