mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Dispatch Service Fix maintenance issues (#11973)
If daily.sh exited with non-zero it would kill the maintenance thread, stopping daily.sh The maintenance lock was never released, this wouldn't cause an issue in normal operation as it should expire.
This commit is contained in:
@@ -429,8 +429,13 @@ class Service:
|
||||
sleep(wait)
|
||||
|
||||
info("Running maintenance tasks")
|
||||
output = LibreNMS.call_script('daily.sh')
|
||||
info("Maintenance tasks complete\n{}".format(output))
|
||||
try:
|
||||
output = LibreNMS.call_script('daily.sh')
|
||||
info("Maintenance tasks complete\n{}".format(output))
|
||||
except subprocess.CalledProcessError as e:
|
||||
error("Error in daily.sh:\n" + (e.output.decode() if e.output is not None else 'No output'))
|
||||
|
||||
self._lm.unlock('schema-update', self.config.unique_name)
|
||||
|
||||
self.restart()
|
||||
|
||||
|
Reference in New Issue
Block a user