confd: avoid spamming the logfile
When confd is disabled we don't want to be noticed every timer interval.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Merge branch 'next' into branch-2.1
Move SimpleConfigReader creation to ConfdProcessor
This will be useful to make ConfdProcessor aware of a config failure,without quitting confd.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
ConfdProcessor: add disabled state
This is a state the processor will get in, if it fails to load theconfig.
confd: start in polling mode
This allows us not to enable the inotify handler immediately, and thusto make it easier for us should the config file not exist at all.
Confd: don't fail if the config doesn't load
Rather than quitting we'll just continue to poll the config at a slowrate, hoping that sooner or later we'll get it back. This allows alsoworking on non-MC nodes, and smoothly transitioning from MC to non-MC,...
confd: s/confd_event_handler/inotify_handler/
In a case we don't encounter frequently (file modified but notoverwritten) the notify handler we use is called with a wrong name.
Add script to clean archived jobs after 21 days
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Implement timers in confd
Timers are used both for checking for inotify failures, and for polling,should inotify notices become too frequent.
ConfdInotifyEventHandler.enable: use InotifyError
Rather than raising ConfdFatalError directlyConfdInotifyEventHandler.enable raises InotifyError should it not beable to configure inotify, allowing the caller to decide what to do.
Signed-off-by: Guido Trotter <ultrotter@google.com>...
View revisions
Also available in: Atom