Werk #15970: mk_oracle: Fix "Database or necessary processes not running or login failed" error due to race conditions

Component Checks & agents
Title mk_oracle: Fix "Database or necessary processes not running or login failed" error due to race conditions
Date Jul 31, 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)
2.2.0p8 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p33 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

mk_oracle stores the query results for SYNC_SECTIONS in intermediate cache files per SID, which will be cleaned up afterwards. Currently, these files can be erroneously deleted before the agent plugin has finished if the agent plugin is started a second time, resulting in a "Database or necessary processes not running or login failed" error. This has been fixed by only deleting files created by the current process.

To the list of all Werks