History | View | Annotate | Download (8 kB)
ganeti.daemon: Add timers to Mainloop
This is a fallout from my work on the HTTP client class. Repeatingtimers are prepared, but not yet implemented.
Reviewed-by: iustinp
ganeti.daemon: Make Mainloop more flexible
While working on the HTTP client class, I wanted to use Mainloopbefore deciding to use threads instead.
- Add docstrings- Rename "quit" to "running", move it to a local variable- Support adding and removing I/O listeners while running...
daemon.py: Don't wake up every second
We don't have timers yet, hence waking up is not needed at all.
Reviewed-by: ultrotter
Mainloop: handle sigterm
This fixes removals of the pid files and clean exit in the init script
Mainloop: init sigchld_handler as None
There is no point in initializing sigchld_handler as an empty dict, whenit will be overwritten by an instance of utils.SignalHandlerimmediately after.
Add daemon library with mainloop
This mainloop can be used in daemons like ganeti-noded.