File rtslib-load-rbd-mod-on-startup.patch of Package python-rtslib.1545

Index: rtslib-2.2/rtslib/root.py
===================================================================
--- rtslib-2.2.orig/rtslib/root.py
+++ rtslib-2.2/rtslib/root.py
@@ -56,6 +56,8 @@ class RTSRoot(CFSNode):
 
     # The core target/tcm kernel module
     target_core_mod = 'target_core_mod'
+    # rbd backstore module
+    target_rbd_mod = 'target_core_rbd'
 
     # RTSRoot private stuff
     def __init__(self):
@@ -65,6 +67,11 @@ class RTSRoot(CFSNode):
         '''
         super(RTSRoot, self).__init__()
         modprobe(self.target_core_mod)
+        # attempt to load the rbd backstore module if available
+        try:
+            modprobe(self.target_rbd_mod)
+        except Exception:
+            pass
         mount_configfs()
         self._create_in_cfs_ine('any')
 
openSUSE Build Service is sponsored by