mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Log tracebacks caught in fileserver updates
When a traceback is triggered in a fileserver update, it is caught and printed. However, all that is printed is the result of exc.__str__(), which is not helpful when debugging, and makes it harder to track down fileserver update issues. This commit changes the behavior and writes the full text of the exception to the master log.
This commit is contained in:
parent
8ef2fce934
commit
8fda2fe288
@ -38,6 +38,7 @@ import salt.utils.event
|
||||
import salt.utils.verify
|
||||
import salt.utils.minions
|
||||
import salt.utils.gzip_util
|
||||
import traceback
|
||||
from salt.utils.event import tagify
|
||||
from salt.exceptions import SaltMasterError
|
||||
|
||||
@ -154,9 +155,10 @@ def fileserver_update(fileserver):
|
||||
'able to serve files to minions')
|
||||
raise SaltMasterError('No fileserver backends available')
|
||||
fileserver.update()
|
||||
except Exception as exc:
|
||||
except Exception:
|
||||
log.error(
|
||||
'Exception {0} occurred in file server update'.format(exc)
|
||||
'Exception occurred in file server update:\n{0}'
|
||||
.format(traceback.format_exc())
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user