arch-security-tracker
arch-security-tracker copied to clipboard
Handle timeout's gracefully
When updating now, sometimes network issues arise and updating errors out. For monitoring it would be nicer not make this a fatal error and add a check in monitoring for the last update time (maybe even query it) so we can create a new warning when the tracker is out of date.
Apr 25 08:54:55 apollo make[8556]: Updating pacman database...ERROR: failed retrieving file 'testing.db' from mirror.p>
Apr 25 08:54:55 apollo make[8556]: Traceback (most recent call last):
Apr 25 08:54:55 apollo make[8556]: File "./trackerctl", line 5, in <module>
Apr 25 08:54:55 apollo make[8556]: cli.main()
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/flask/cli.py", line 557, in main
Apr 25 08:54:55 apollo make[8556]: return super(FlaskGroup, self).main(*args, **kwargs)
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
Apr 25 08:54:55 apollo make[8556]: rv = self.invoke(ctx)
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
Apr 25 08:54:55 apollo make[8556]: return _process_result(sub_ctx.command.invoke(sub_ctx))
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
Apr 25 08:54:55 apollo make[8556]: return _process_result(sub_ctx.command.invoke(sub_ctx))
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
Apr 25 08:54:55 apollo make[8556]: return ctx.invoke(self.callback, **ctx.params)
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
Apr 25 08:54:55 apollo make[8556]: return callback(*args, **kwargs)
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
Apr 25 08:54:55 apollo make[8556]: return f(get_current_context(), *args, **kwargs)
Apr 25 08:54:55 apollo make[8556]: File "/usr/lib/python3.7/site-packages/flask/cli.py", line 412, in decorator
What exactly do you mean? Failing to update should return a non-zero exit coded, which is fatal. What does it do differently? the updating systemd timer should get the exit code and mark that run as failed.