'Kubernetes runner overrides fail_job (called by mark_as_failed) to rescue the pod\'s log files which are left as
stdout (pods logs are the natural stdout and stderr of the running processes inside the pods) and are
deleted in the parent implementation as part of the failing the job process.
:param job_state:
:return:'

def fail_job(self, job_state):

    with open(job_state.output_file, 'r') as outfile:
        stdout_content = outfile.read()
    if getattr(job_state, 'stop_job', True):
        self.stop_job(self.sa_session.query(self.app.model.Job).get(job_state.job_wrapper.job_id))
    self._handle_runner_state('failure', job_state)
    if (not job_state.runner_state_handled):
        job_state.job_wrapper.fail(message=getattr(job_state, 'fail_message', 'Job    failed'), stdout=stdout_content, stderr="See    stdout    for    pod's    stderr.")
        if (job_state.job_wrapper.cleanup_job == 'always'):
            job_state.cleanup()
