Actions
Bug #16021
closedinotify queue overflow halts ISC lease file monitoring
Difficulty:
Triaged:
Description
When using ISC lease file monitoring (nightly), the inotify event queue can overflow with many events if they're not processed quickly enough:
E, [2016-08-09T09:39:18.774323 #18572] ERROR -- : Error occured when monitoring /tmp/dhcp.leases D, [2016-08-09T09:39:18.774363 #18572] DEBUG -- : inotify event queue has overflowed. (INotify::QueueOverflowError) /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/event.rb:120:in `initialize' /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/event.rb:100:in `new' /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/event.rb:100:in `consume' /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:284:in `read_events' /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:238:in `process' /home/dcleal/.rvm/gems/ruby-2.3.0@proxy/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:221:in `run' /home/dcleal/code/foreman/smart-proxy/modules/dhcp_isc/inotify_leases_file_observer.rb:30:in `monitor_leases' /home/dcleal/code/foreman/smart-proxy/modules/dhcp_isc/inotify_leases_file_observer.rb:37:in `block in start'
Mine's in a directory with lots of other noise (/tmp), but it seems possible to me that if re-parsing the file is slow then a limit could be hit.
The observer service should catch the exception and reinitialise the inotify tracking and re-parse the file.
Actions