Create job-output.txt together with JobDir

Otherwise this file will only exist after ansible has started. However
the build url is reported earlier which opens a window where the zuul
status page publishes a live streaming link but the link is not yet
accessible resulting in [1]. Creating the job-output.txt beforehand
should resolve this issue.

[1] Live log result:

  Log not found for build ID 94f4e27243a44e73a19808c328499a28
  --- END OF STREAM ---

Change-Id: I9c85a7a1aa925d6cf8080ef07f1855d28fa3c71a
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index e7a6dbc..674fc80 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -353,6 +353,13 @@
         self.pre_playbooks = []
         self.post_playbooks = []
         self.job_output_file = os.path.join(self.log_root, 'job-output.txt')
+        # We need to create the job-output.txt upfront in order to close the
+        # gap between url reporting and ansible creating the file. Otherwise
+        # there is a period of time where the user can click on the live log
+        # link on the status page but the log streaming fails because the file
+        # is not there yet.
+        with open(self.job_output_file, 'w'):
+            pass
         self.trusted_projects = []
         self.trusted_project_index = {}