Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • apparmor apparmor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 146
    • Issues 146
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 28
    • Merge requests 28
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • AppArmorAppArmor
  • apparmorapparmor
  • Issues
  • #130
Closed
Open
Issue created Oct 25, 2020 by Christian Boltz@cboltzDeveloper

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?

Assignee
Assign to
Time tracking