mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding some logging when the cache files are unable to be removed.
This commit is contained in:
parent
44940d6c23
commit
c2ed1d439a
2 changed files with 14 additions and 8 deletions
|
@ -63,6 +63,9 @@ def running(opts):
|
|||
|
||||
|
||||
def cache_jobs(opts, jid, ret):
|
||||
'''
|
||||
Write job information to cache
|
||||
'''
|
||||
serial = salt.payload.Serial(opts=opts)
|
||||
|
||||
fn_ = os.path.join(
|
||||
|
@ -92,7 +95,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
if not isinstance(data, dict):
|
||||
# Invalid serial object
|
||||
|
@ -103,7 +106,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
|
||||
if not _check_cmdline(data):
|
||||
|
@ -115,7 +118,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
return data
|
||||
|
||||
|
|
|
@ -42,6 +42,9 @@ def running(opts):
|
|||
|
||||
|
||||
def cache_jobs(opts, jid, ret):
|
||||
'''
|
||||
Write job information to cache
|
||||
'''
|
||||
serial = salt.payload.Serial(opts=opts)
|
||||
|
||||
fn_ = os.path.join(
|
||||
|
@ -73,7 +76,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
if not isinstance(data, dict):
|
||||
# Invalid serial object
|
||||
|
@ -84,7 +87,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
if opts.get('multiprocessing'):
|
||||
if data.get('pid') == pid:
|
||||
|
@ -94,7 +97,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
if data.get('jid') == current_thread:
|
||||
return None
|
||||
|
@ -102,7 +105,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
|
||||
if not _check_cmdline(data):
|
||||
|
@ -114,7 +117,7 @@ def _read_proc_file(path, opts):
|
|||
try:
|
||||
os.remove(path)
|
||||
except IOError:
|
||||
pass
|
||||
log.debug('Unable to remove proc file %s.', path)
|
||||
return None
|
||||
return data
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue