Werk #4499: Agent Updater: Prevent broken state files caused by incomplete writes

Komponente Agent bakery
Titel Agent Updater: Prevent broken state files caused by incomplete writes
Datum 15.03.2017
Checkmk Edition Checkmk Enterprise (CEE)
Checkmk-Version 1.4.0b4 1.5.0i1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

When the agent updater is being executed it writes it's current deployment state to a state file. When the system is turned of suddenly it could cause a file corruption of the cmk-update-agent.state file. We prevent this now by writing to a temporary file first, flush it and then move it over to the state file path.

Zur Liste aller Werks