Werk #14958: cmk-update-agent: Fix lockfile handling

Komponente Agent bakery
Titel cmk-update-agent: Fix lockfile handling
Datum 03.11.2022
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen
Checkmk versions & editions
2.2.0b1 Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p16 Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p30 Checkmk Enterprise (CEE), Checkmk MSP (CME)

This Werk mainly fixes an inconvenience that occured when invoking multiple instances of the Agent Updater simultaneously.

Since Werk #14732, it's possible for the Agent Updater to wait for running exclusively. However, before this Werk, a second instance failed to actually open and hold the respective lockfile (because the first instance deleted it). Hence, it also failed to delete it in the end.

This resulted in an error message like No such file or directory: '/tmp/cmk-update-agent.pid'". This didn't result in a crash, but the error was printed to the logfile and could lead to confusion.

Zur Liste aller Werks