Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-rtslib-fb for 
openSUSE:Factory checked in at 2022-02-09 20:38:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rtslib-fb (Old)
 and      /work/SRC/openSUSE:Factory/.python-rtslib-fb.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rtslib-fb"

Wed Feb  9 20:38:15 2022 rev:29 rq:952652 version:2.1.74

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rtslib-fb/python-rtslib-fb.changes        
2021-10-25 15:17:09.853665534 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-rtslib-fb.new.1898/python-rtslib-fb.changes  
    2022-02-09 20:38:26.270266581 +0100
@@ -1,0 +2,6 @@
+Sun Jan 30 17:07:00 UTC 2022 - Mykola Golub <[email protected]>
+
+- Update parameters description in rbd-support.patch
+- Add rbd-support-disable_emulate_legacy_capacity.patch
+
+-------------------------------------------------------------------

New:
----
  rbd-support-disable_emulate_legacy_capacity.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-rtslib-fb.spec ++++++
--- /var/tmp/diff_new_pack.7aM3YQ/_old  2022-02-09 20:38:26.946268198 +0100
+++ /var/tmp/diff_new_pack.7aM3YQ/_new  2022-02-09 20:38:26.954268218 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-rtslib-fb
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -35,6 +35,7 @@
 Patch1:         rbd-support.patch
 Patch2:         
rtslib-Fix-handling-of-sysfs-RW-attrs-that-are-actually-RO.patch
 Patch3:         rtslib-target-service-for-suse.patch
+Patch4:         rbd-support-disable_emulate_legacy_capacity.patch
 BuildRequires:  %{python_module pyudev}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module six}
@@ -81,6 +82,7 @@
 %if 0%{?sle_version} >= 150000
 # RBD support is dependent on LIO changes present in the SLE/Leap kernel
 %patch1 -p1
+%patch4 -p1
 %endif
 %patch2 -p1
 %patch3 -p1

++++++ rbd-support-disable_emulate_legacy_capacity.patch ++++++
>From 4e633572ef8a9b07d1ae1252cf4c2b2daf673998 Mon Sep 17 00:00:00 2001
From: Mykola Golub <[email protected]>
Date: Thu, 3 Feb 2022 18:40:47 +0000
Subject: [PATCH] disable emulate_legacy_capacity on creating RBD backstore

When rbd image has object-map feature set, `enable` will fail
unless emulate_legacy_capacity (default is 1) is set to 0.

Provide a possibility to disable emulate_legacy_capacity when
creating backstore (before enabling it) via additional
disable_emulate_legacy_capacity parameter.

We might eventually want to merge the rbd support patches into one,
but right now keeping them separate looks useful for tracking the
change (feature) added here.

This patch is for the changes added by "rbd support" patch
(rbd-support.patch) and thus it is not needed upstream until
the rbd support is added upstream.

Eventualy we might want to merge this and "rbd support" patches
into one. For now it looks useful to keep it separate to track
the change (feature) added by this patch.

ceph-iscsi needs this change to support rbd images with
object-map feature enabled.

Reviewed-by: David Disseldorp <[email protected]>
Signed-off-by: Mykola Golub <[email protected]>
---
 rtslib/tcm.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/rtslib/tcm.py b/rtslib/tcm.py
index d42a78f..3bf599d 100644
--- a/rtslib/tcm.py
+++ b/rtslib/tcm.py
@@ -809,7 +809,8 @@ class RBDStorageObject(StorageObject):
     # RBDStorageObject private stuff
 
     def __init__(self, name, dev=None, wwn=None, readonly=False,
-                 write_back=False, index=None):
+                 write_back=False, index=None,
+                 disable_emulate_legacy_capacity=False):
         '''
         A RBDIOStorageObject can be instantiated in two ways:
             - B{Creation mode}: If I{dev} is specified, the underlying configFS
@@ -822,6 +823,10 @@ class RBDStorageObject(StorageObject):
               I{name}. The underlying configFS object must already exist in
               that mode, or instantiation will fail.
 
+        Note, setting disable_emulate_legacy_capacity to True is dangerous
+        for any image that has previously been iSCSI exported with
+        emulate_legacy_capacity enabled.
+
         @param name: The name of the RBDIOStorageObject.
         @type name: string
         @param dev: The path to the backend rbd device to be used.
@@ -835,20 +840,23 @@ class RBDStorageObject(StorageObject):
         @type readonly: boolean
         @param write_back: Enable write back cache.
         @type write_back: boolean
+        @param disable_emulate_legacy_capacity: Disable 
emulate_legacy_capacity mode.
+        @type disable_emulate_legacy_capacity: boolean
         @return: A RBDIOStorageObject object.
         '''
 
         if dev is not None:
             super(RBDStorageObject, self).__init__(name, 'create', index)
             try:
-                self._configure(dev, wwn, readonly)
+                self._configure(dev, wwn, readonly,
+                    disable_emulate_legacy_capacity)
             except:
                 self.delete()
                 raise
         else:
             super(RBDStorageObject, self).__init__(name, 'lookup', index)
 
-    def _configure(self, dev, wwn, readonly):
+    def _configure(self, dev, wwn, readonly, disable_emulate_legacy_capacity):
         self._check_self()
         if get_blockdev_type(dev) != 0:
             raise RTSLibError("Device %s is not a TYPE_DISK rbd device" % dev)
@@ -858,6 +866,8 @@ class RBDStorageObject(StorageObject):
         self._set_udev_path(dev)
         self._control("udev_path=%s" % dev)
         self._control("readonly=%d" % readonly)
+        if disable_emulate_legacy_capacity:
+            self.set_attribute("emulate_legacy_capacity", 0)
         self._enable()
 
         super(RBDStorageObject, self)._configure(wwn)
-- 
2.33.1


++++++ rbd-support.patch ++++++
--- /var/tmp/diff_new_pack.7aM3YQ/_old  2022-02-09 20:38:27.038268418 +0100
+++ /var/tmp/diff_new_pack.7aM3YQ/_new  2022-02-09 20:38:27.042268428 +0100
@@ -24,7 +24,7 @@
  from .alua import ALUATargetPortGroup
 --- a/rtslib/tcm.py
 +++ b/rtslib/tcm.py
-@@ -801,6 +801,107 @@ class BlockStorageObject(StorageObject):
+@@ -801,6 +801,111 @@ class BlockStorageObject(StorageObject):
          d['dev'] = self.udev_path
          return d
  
@@ -58,6 +58,10 @@
 +        @type dev: string
 +        @param wwn: T10 WWN Unit Serial, will generate if None
 +        @type wwn: string
++        @param readonly: Use to read only.
++        @type readonly: boolean
++        @param write_back: Enable write back cache.
++        @type write_back: boolean
 +        @return: A RBDIOStorageObject object.
 +        '''
 +

Reply via email to