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>
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.
Implement timers in confd
Timers are used both for checking for inotify failures, and for polling,should inotify notices become too frequent.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
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>...
ConfdInotifyEventHandler, move to a callback
ConfdInotifyEventHandler used to reload the config whenever anotification arrived. Moving to a callback system, so thatConfdConfigurationReloader can be responsible for that functionality.
Additionally the inotify class no longer reenables itself automatically,...
Move creation of inotify handler to a new class
This class will be responsible for managing inotify notifications,timers, and rate-limiting reloads. For now none of these features isimplemented. :)
ConfdInotifyEventHandler: add enable/disable
Make possible to enable and disable the inotify event handler. Theinotify handler will remain enabled, unless explicitely told to disableitself.
Move the luxi error handling into errors.py
Currently the luxi error handling is hardcoded as special encoding onthe masterd-side and special decoding on the client side. This patchmoves it to errors.py such that other parts of the code can reuse thesame encoding....
ganeti-watcher: Don't run if paused
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Add file to pause watcher for a certain duration
This can be used during maintenance work.
View revisions
Also available in: Atom