On Tue, Oct 15, 2013 at 7:12 AM, David Lang <[email protected]> wrote: > On Mon, 14 Oct 2013, Rainer Gerhards wrote: > > Hi all, >> >> I would like to get some feedback. As you may know, I am currently >> refactoring imfile to support inotify. One side-effect of the previous >> polling implementation causes me some headache: >> >> Currently, imfile simply tries to open the file during each polling >> interval. As a consequence, it is able to monitor files even if the >> directory path leading to them is not always available (most importantly >> it >> must not be available on startup). >> >> Building this behaviour with inotify requires quite some code. So question >> now: do you think this is essential functionality? Is somebody actually >> using it? >> >> Side-Note: I call it "side-effect", as this behaviour was never spec'ed, >> intended, or designed -- it just happens this way due to how polling >> currently works. >> > > Is this just if the directory is not reachable, or if the file isn't there? > > just the directory. The file not being there is actually very typical - for example, it hapens each time a file is rotated away.
The new imfile inotify mode thus will monitor the directory, and re-enable a file when it is (re)created. But with missing directories, I need to do this recursively over potentially many layers. I am still a bit concerned that this feature might have some use cases, even though it was never desired - think about things where everything is setup but the actual structure is created later at runtime of the various application (containers)... As a compromise, I think I will at least in the early versions have the ability to select the old-style polling mode even though inotify is available. Rainer _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

