aa-notify crash on (slow) logrotation
I've just seen
aa-notify -p (latest version from 3.0 branch) crash on a manual logrotation, while audit.log didn't exist for a few seconds:
Traceback (most recent call last): File "/usr/sbin/aa-notify", line 570, in <module> main() File "/usr/sbin/aa-notify", line 533, in main for message in notify_about_new_entries(logfile, args.wait): File "/usr/sbin/aa-notify", line 145, in notify_about_new_entries for event in follow_apparmor_events(logfile, wait): File "/usr/sbin/aa-notify", line 236, in follow_apparmor_events if os.stat(logfile).st_ino != log_inode: FileNotFoundError: [Errno 2] No such file or directory: '/var/log/audit/audit.log'
The error message itsself is correct (audit.log didn't exist in this moment), but maybe aa-notify could try again a few times/seconds, and then do a desktop notification instead of crashing?