Werk #14958: cmk-update-agent: Fix lockfile handling
Komponente | Agent bakery |
Titel | cmk-update-agent: Fix lockfile handling |
Datum | 03.11.2022 |
Checkmk Edition | Checkmk Enterprise (CEE) |
Checkmk-Version | 2.0.0p30 2.1.0p16 2.2.0b1 |
Level | Kleine Änderung |
Klasse | Bugfix |
Kompatibilität | Kompatibel - benötigt kein manuelles Eingreifen |
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.