Module: check_mk
Branch: master
Commit: 6eb322101d95deb45396e3c81a556e5dd940f08c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6eb322101d95de…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 12 12:32:01 2018 +0100
6860 FIX Fixed random backup issues: "Connection reset by peer"
The "mkbackup" and "omd backup" commands could fail while backing up a
site when
the rrdcached process was reloaded, restarted or stopped during the backup. This
could also be triggered by an "Activate changes" action in the GUI.
The backup was then aborted with an error like this: "Failed to perform backup:
[Errno 104] Connection reset by peer".
This issue did not affect backups performed for not running sites.
FEED-2982
FEED-3045
CMK-943
Change-Id: I020700f4a9d347a14a79f5440ac2024d8b45e042
---
.werks/6860 | 17 +++++++++++++++++
omd/packages/omd/omd | 7 +++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/.werks/6860 b/.werks/6860
new file mode 100644
index 0000000..f17812e
--- /dev/null
+++ b/.werks/6860
@@ -0,0 +1,17 @@
+Title: Fixed random backup issues: "Connection reset by peer"
+Level: 1
+Component: omd
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1542022142
+
+The "mkbackup" and "omd backup" commands could fail while backing up
a site when
+the rrdcached process was reloaded, restarted or stopped during the backup. This
+could also be triggered by an "Activate changes" action in the GUI.
+
+The backup was then aborted with an error like this: "Failed to perform backup:
[Errno 104] Connection reset by peer".
+
+This issue did not affect backups performed for not running sites.
diff --git a/omd/packages/omd/omd b/omd/packages/omd/omd
index 81cfccb..21926d0 100644
--- a/omd/packages/omd/omd
+++ b/omd/packages/omd/omd
@@ -3631,10 +3631,13 @@ class BackupTarFile(tarfile.TarFile):
while not answer.endswith("\n"):
answer += self._sock.recv(1024)
except socket.error, e:
- if e.errno == 32: # Broken pipe
+ # ECONNRESET: Broken pipe
+ # EPIPE: Connection reset by peer
+ # Happens, for example, when the rrdcached is reloaded/restarted
during backup
+ if e.errno in (errno.ECONNRESET, errno.EPIPE):
self._sock = None
if opt_verbose:
- sys.stdout.write("skipping rrdcached command (broken
pipe)\n")
+ sys.stdout.write("skipping rrdcached command (%s)\n" % e)
return
else:
raise