From: Michael Hanselmann Date: Mon, 10 Dec 2012 13:34:15 +0000 (+0100) Subject: Improve error message for when adding inotify watcher fails X-Git-Tag: v2.7.0beta1~367 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/7fb5ac7cd87fa4916b6c4813dcf3a10ad4b89d96?hp=6bee863caf08e334346b9910f2c97e4424fcaf16 Improve error message for when adding inotify watcher fails Explicitely mention the fs.inotify.max_user_watches sysctl value. Signed-off-by: Michael Hanselmann Reviewed-by: Iustin Pop --- diff --git a/lib/asyncnotifier.py b/lib/asyncnotifier.py index 37a2fcb..f4b0815 100644 --- a/lib/asyncnotifier.py +++ b/lib/asyncnotifier.py @@ -109,7 +109,9 @@ class FileEventHandlerBase(pyinotify.ProcessEvent): ret = result.get(filename, -1) if ret <= 0: - raise errors.InotifyError("Could not add inotify watcher (%s)" % ret) + raise errors.InotifyError("Could not add inotify watcher (error code %s);" + " increasing fs.inotify.max_user_watches sysctl" + " might be necessary" % ret) return result[filename]