Releases: Intsights/sergeant
Releases · Intsights/sergeant
v0.21.0
v0.20.2
v0.20.1
v0.20.0
Changelist
- We've been experiencing production issues for a while regarding stalled workers. After a rigorous investigation, we saw there were background threads that kept running. The issue with such threads is that sometimes they were non-daemonic threads, meaning that the Python's interpreter will not exit unless these threads will finish their execution. These threads were stuck in a deadlock and would have never been finished. We've added a background threads protection at the end of the Slave's execution. The protection consists of two phases. The first tries to stop the threads mildly by raising a SystemExit exception in the threads using an internal Python API, then joining the threads for 2 seconds waiting for the thread to finish. If there are unkillable threads left, and slave would kill itself with a SIGKILL resulting in a non-interruptable exit.
- Tests coverage has increased
- Slave logic has been refactored resulting in a clearer more debuggable version
- Supervisor code changes to reflect the Slave's logic change
v0.19.0
v0.18.4
v0.18.3
Changelist:
- added killer shutdown call on worker's exit to make sure the worker is able to shutdown properly, and if not, it will get killed by the killer
- replace printing a stacktrace when logstash is not responding with just a one line error message
- call init_logger before calling init_broker to allow logging the failure of initializing the broker
Breaking Changes:
- Replace emitter["filename"] with emitter["pathname"]. logstash handler now sends a different key name, pathname instead of filename.
v0.18.2
- The supervisor now waits for all its children that became zombies. This behavior happens when the process killer kills its watched worker with SIGKILL which replaces its parent to the supervisor. The supervisor didn't know it before, so no one would call to wait on its pid. I added a zombie cleaning method to run on each supervising iteration to call
wait
for all the zombies.
v0.18.1
v0.18.0
Change list
- Timeouts mechanism overhaul:
- Removed
soft_timeout
/hard_timeout
configurations in favor of justtimeout
- Removed
critical_timeout
in favor of a defaultedgrace_period
. The rationale was that nobody understood what is the meaning of "critical" timeout. The idea of the critical timeout was to allow the last resort option of killing the worker in cases where SIGTERM did not succeed. I findgrace_period
to be more convenient and intuitive.
- Removed
Breaking Changes:
- Sergeant Timeouts config does not provide
soft_timeout
,hard_timeout
andcritical_timeout
anymore. They were replaced withtimeout
andgrace_period