[Nepomuk] Review Request 106748: Create a taskbar notification window when we run out of inotify watches

Simeon Bird bladud at gmail.com
Wed Apr 17 01:28:49 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106748/#review31191
-----------------------------------------------------------


Vishesh? 

Usability people? 

Any comments?

- Simeon Bird


On Feb. 28, 2013, 5:08 a.m., Simeon Bird wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106748/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2013, 5:08 a.m.)
> 
> 
> Review request for Nepomuk, KDE Usability, Sebastian Trueg, and Vishesh Handa.
> 
> 
> Description
> -------
> 
> FileWatch: Use KAuth to automatically raise the inotify watch limit if
> we run out of watches.
>     
> When we run out of watches, use a KAuth action to double the inotify
> watch limit (by writing to /proc/sys/fs/inotify/max_user_watches).
> At the same time, make the new setting persist across reboots by writing
> /etc/sysctl.d/97-kde-nepomuk-filewatch-inotify.conf.
>     
> If for some reason raising the limit does not work, print a message to syslog.
> 
> ==Potential issues==
> 
> 1. If you don't type the prompt quickly enough, something times out and adding of watches is not resumed after raising the limit
> 
> 2. At the moment there is no way to turn this off, except by not using nepomuk or denying the user the requisite kauth permissions. This is the sort of thing that people complain about, but I can't really see any reason to want to do that - you'd be running nepomuk in a "known broken" configuration, which makes no sense.
> 
> 3. the action description string is "To avoid missing file changes, raise the folder watch limit", which could probably be 
> improved.
> 
> 4. The method of making the change persist across reboots is to write a file to /etc/sysctl.d, which is a bit anti-social. (note that if /etc is not writable, it simply does nothing). /etc/sysctl.d should work on all systemd distros, debian (including derivatives such as ubuntu) and gentoo.
> 
> Part of me wants to make this a separate action, but as I understand it this would require a second prompt and a second authorization, which would be a bit annoying. Also, the user's file system isn't going away - if they wanted a larger limit once, they almost certainly want it again, so there are limited reasons for not wanting it permanent. But finer grained permissions are a Good Thing, so I'm not so sure about this.
> 
> 5. If the user has manually set the watch limit to a too-low number in sysctl.conf, it could potentially over-ride the file in /etc/sysctl.d, leading to the prompt appearing on every boot.
> 
> Also, I'd just like to mention that I was quite impressed at how easy to KAuth was to work with.
> 
> 
> Diffs
> -----
> 
>   services/filewatch/CMakeLists.txt 501d2a1 
>   services/filewatch/kinotify.cpp 60292a9 
>   services/filewatch/nepomukfilewatch.cpp ca5c7d4 
>   services/filewatch/org.kde.nepomuk.filewatch.actions PRE-CREATION 
>   services/filewatch/raiselimit.h PRE-CREATION 
>   services/filewatch/raiselimit.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/106748/diff/
> 
> 
> Testing
> -------
> 
> Set the number of inotify watches to a low value (but not *too* low - it needs to be high enough to successfully watch the config files). I found 1000 to be a good value. 
> 
> > sudo sysctl fs.inotify.max_user_watches=10 
> 
> Restart the filewatch service, and get a KAuth prompt.
> 
> If the watch limit needs to be raised again, no further prompts appear.
> 
> 
> Thanks,
> 
> Simeon Bird
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/nepomuk/attachments/20130417/f491a0c5/attachment.html>


More information about the Nepomuk mailing list