Werk #15450: mk-job: improvements to state file persistence

Component Checks & agents
Title mk-job: improvements to state file persistence
Date Apr 14, 2023
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

The mk-job agent plugin saves information about a job's running and completed states in files under $MK_VARDIR/job. These files were written dynamically and this could give rise to situations in which the state file was read while information was being written to it. The information within the <<<job>>> section could therefore be confusing and incomplete. This has been improved by introducing atomic operations: files are now either present and complete, or absent altogether.

To the list of all Werks