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

Component Agent bakery
Title Agent Updater: Prevent broken state files caused by incomplete writes
Date Mar 15, 2017
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1
Not yet released
Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.5.0i1 Checkmk Enterprise (CEE), Checkmk MSP (CME)
1.4.0b4 Checkmk Enterprise (CEE), Checkmk MSP (CME)

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.

To the list of all Werks