saltstack/salt — pull request #11406 by cowyn (2014-03-21 07:33:09+00:00)
Title: Bypass the missing jid files

[Re-submitted for the broken PR #11376]

The most recent release 2014.1.1 has a little logic issue while cleaning old jobs.
At exactly 65 seconds after the master started, one of the master processes get defunct.

Process Process-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib64/python2.7/site-packages/salt/master.py", line 246, in _clear_old_jobs
with salt.utils.fopen(jid_file, 'r') as fn:
File "/usr/lib64/python2.7/site-packages/salt/utils/init.py", line 1037, in fopen
fhandle = open(*args, **kwargs)
IOError: [Errno 2] No such file or directory: '/var/cache/salt/master/jobs/44/9e352281c9938b05de853cdfb96ea0/jid'

This PR fixes this issue.