]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixed Ceph backup librbd segfault
authorEdward Hope-Morley <edward.hope-morley@canonical.com>
Thu, 11 Jul 2013 17:26:22 +0000 (18:26 +0100)
committerEdward Hope-Morley <edward.hope-morley@canonical.com>
Thu, 11 Jul 2013 20:11:57 +0000 (21:11 +0100)
Change-Id: I1a6b9935eb7da9fca5b572ea4823bae3def99ea0
Fixes: bug #1198271
cinder/volume/drivers/rbd.py

index 533d58441de168fa47a97d332f0423c9d86013db..288742b089343085fe5f70c5dce85b48a5bda9fc 100644 (file)
@@ -159,6 +159,13 @@ class RBDImageIOWrapper(io.RawIOBase):
         """
         raise IOError("fileno() not supported by RBD()")
 
+    # NOTE(dosaboy): if IO object is not closed explicitly, Python auto closes
+    # it which, if this is not overridden, calls flush() prior to close which
+    # in this case is unwanted since the rbd image may have been closed prior
+    # to the autoclean - currently triggering a segfault in librbd.
+    def close(self):
+        pass
+
 
 class RBDVolumeProxy(object):
     """