From e830c8d3fa0abc64e5ff75dfd0729d053f26971a Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Thu, 11 Jul 2013 18:26:22 +0100 Subject: [PATCH] Fixed Ceph backup librbd segfault Change-Id: I1a6b9935eb7da9fca5b572ea4823bae3def99ea0 Fixes: bug #1198271 --- cinder/volume/drivers/rbd.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 533d58441..288742b08 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -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): """ -- 2.45.2