summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/utils/syncdaemon/master.py
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-07-13 00:52:14 +0200
committerAnand Avati <avati@gluster.com>2011-07-29 05:24:43 -0700
commita13fbaca0512cae3853a2372d0d8237eb24dd225 (patch)
treeeb504ec3794346e1199b13ba88cf42c5815f28ea /xlators/features/marker/utils/syncdaemon/master.py
parent6c7a89321af50925fb53da378d996881a1907f31 (diff)
gsyncd: do some basic sanitization on logs
- exceptions raised by us will be logged as single-line error messages (full stack strace is shown only at DEBUG loglevel) - common/well understood exceptions are mapped to "user-parsable" error logs Change-Id: I75f1fb848483372364b2093878d9cfed576c9739 BUG: 2778 Reviewed-on: http://review.gluster.com/125 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/master.py')
-rw-r--r--xlators/features/marker/utils/syncdaemon/master.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/master.py b/xlators/features/marker/utils/syncdaemon/master.py
index f0a5b5dc1..495634b06 100644
--- a/xlators/features/marker/utils/syncdaemon/master.py
+++ b/xlators/features/marker/utils/syncdaemon/master.py
@@ -9,7 +9,7 @@ from errno import ENOENT, ENODATA
from threading import currentThread, Condition, Lock
from gconf import gconf
-from syncdutils import FreeObject, Thread
+from syncdutils import FreeObject, Thread, GsyncdError
URXTIME = (-1, 0)
@@ -24,7 +24,7 @@ class GMaster(object):
fgn_vi = None
if fgn_vis:
if len(fgn_vis) > 1:
- raise RuntimeError("cannot work with multiple foreign masters")
+ raise GsyncdError("cannot work with multiple foreign masters")
fgn_vi = fgn_vis[0]
return fgn_vi, nat_vi
@@ -165,7 +165,7 @@ class GMaster(object):
return vi
if vi0 and vi and vi0['uuid'] != vi['uuid'] and not param.relax_mismatch:
# uuid mismatch for master candidate, bail out
- raise RuntimeError("aborting on uuid change from %s to %s" % \
+ raise GsyncdError("aborting on uuid change from %s to %s" % \
(vi0['uuid'], vi['uuid']))
# fall back to old
return vi0
@@ -208,7 +208,7 @@ class GMaster(object):
gconf.configinterface.set('volume_id', self.uuid)
if self.volinfo:
if self.volinfo['retval']:
- raise RuntimeError ("master is corrupt")
+ raise GsyncdError ("master is corrupt")
else:
if should_display_info or self.crawls == 0:
if self.inter_master:
@@ -236,7 +236,7 @@ class GMaster(object):
else:
xtr = xtr0
if xtr > xtl:
- raise RuntimeError("timestamp corruption for " + path)
+ raise GsyncdError("timestamp corruption for " + path)
if xtl == xtr:
if path == '.' and self.change_seen:
self.turns += 1