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

Component Checks & agents
Title mk-job: improvements to state file persistence
Date Apr 14, 2023
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 2.3.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

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