Module: check_mk
Branch: master
Commit: 9804be49663efbe98adec8de3997250e511284e7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9804be49663efb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 15 09:43:17 2017 +0100
4499 FIX Agent Updater: Prevent broken state files caused by incomplete writes
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.
Change-Id: Ic8075794d25e0fe90be32bda03632525a43b2880
---
.werks/4499 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.werks/4499 b/.werks/4499
new file mode 100644
index 0000000..793cf26
--- /dev/null
+++ b/.werks/4499
@@ -0,0 +1,13 @@
+Title: Agent Updater: Prevent broken state files caused by incomplete writes
+Level: 1
+Component: agents
+Compatible: compat
+Edition: cee
+Version: 1.5.0i1
+Date: 1489567247
+Class: fix
+
+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.