diff options
author | Niels de Vos <ndevos@redhat.com> | 2012-11-26 17:44:36 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-12-17 12:39:18 -0500 |
commit | b793589e856b866f3cab54227237f3548267e9bc (patch) | |
tree | 2e6aaf5bd0515c7dbf17dd0e9270d1f06b5a8687 | |
parent | 9dfece3a71c53f4861ea2e9419ce47f8e03fb86c (diff) |
geo-replication: catch select.error on select()
From upstream commit 15bf92d53c72774e2fd7aba146644a2e460e543f:
> tailer() in resource.py does not correctly catch exceptions from
> select(). select() can raise an instance of the select.error class and
> the current expression only catches ValueError (and the instance will
> have reference called selecterror).
>
> The geo-rep log contains a call trace like this:
> > E [syncdutils:190:log_raise_exception] <top>: FAIL:
> > Traceback (most recent call last):
> > File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 216, in twrap
> > tf(*aa)
> > File "/usr/libexec/glusterfs/python/syncdaemon/resource.py", line 123, in tailer
> > poe, _ ,_ = select([po.stderr for po in errstore], [], [], 1)
> > File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 276, in select
> > return eintr_wrap(oselect.select, oselect.error, *a)
> > File "/usr/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 269, in eintr_wrap
> > return func(*a)
> > error: (9, 'Bad file descriptor')
>
> BUG: 880308
> Change-Id: I2babe42918950d0e9ddb3d08fa21aa3548ccf7c5
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/4233
> Reviewed-by: Peter Portante <pportant@redhat.com>
> Reviewed-by: Csaba Henk <csaba@redhat.com>
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
BUG: 880308
Change-Id: Iece1f50c0064853669d1dd4a777f77f10e2fd0dc
Upstream-bug: 886808 (changed after upstream merge)
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/1927
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/resource.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 7eced825c22..adcf5585964 100644 --- a/xlators/features/marker/utils/syncdaemon/resource.py +++ b/xlators/features/marker/utils/syncdaemon/resource.py @@ -12,7 +12,7 @@ import tempfile import threading import subprocess from errno import EEXIST, ENOENT, ENODATA, ENOTDIR, ELOOP, EISDIR -from select import error as selecterror +from select import error as SelectError from gconf import gconf import repce @@ -121,7 +121,7 @@ class Popen(subprocess.Popen): errstore = cls.errstore.copy() try: poe, _ ,_ = select([po.stderr for po in errstore], [], [], 1) - except ValueError, selecterror: + except (ValueError, SelectError): continue for po in errstore: if po.stderr not in poe: |