Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: c581faa2658f50dfb9066812c968668f49458774
https://github.com/tribe29/checkmk/commit/c581faa2658f50dfb9066812c968668f4…
Author: Sergey Kipnis <sergey.kipnis(a)tribe29.com>
Date: 2021-03-06 (Sat, 06 Mar 2021)
Changed paths:
M agents/wnx/src/common/wtools.cpp
M agents/wnx/src/common/wtools.h
M agents/wnx/src/engine/on_start.cpp
M agents/wnx/src/engine/service_processor.cpp
M agents/wnx/src/engine/service_processor.h
M agents/wnx/src/engine/windows_service_api.cpp
Log Message:
-----------
Fix Windows agent cleanup routine
- move TryCleanOnExit before setting SERVICE_STOPPED
- move temporary user cleanup in TryCleanOnExit
- add few logs
Background. Service must finish all continuous tasks before setting SERVICE_STOPPED
because in the case of update we may have two service binaries running at the same time.
Even this fix gives us 100% guarantee, race condition is still possible on heavy loaded
systems.But probability is extreme low and the only side effect is requirement to reboot
the system
Change-Id: I787e68f0a0e3ef9f38f370717a292e1603f1b578