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
This commit is contained in:
Joshua Hesketh 2015-02-26 13:18:37 +11:00
parent dc88e429a7
commit 9b2c312aa3
2 changed files with 4 additions and 1 deletions

View File

@ -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])

View File

@ -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