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-05-08 21:52:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rtslib-fb (Old)
and /work/SRC/openSUSE:Factory/.python-rtslib-fb.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rtslib-fb"
Sun May 8 21:52:04 2022 rev:30 rq:975466 version:2.1.75
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rtslib-fb/python-rtslib-fb.changes
2022-02-09 20:38:26.270266581 +0100
+++
/work/SRC/openSUSE:Factory/.python-rtslib-fb.new.1538/python-rtslib-fb.changes
2022-05-08 21:52:05.459443384 +0200
@@ -1,0 +2,16 @@
+Fri May 06 16:54:21 UTC 2022 - [email protected]
+
+- Update to version v2.1.75:
+ * version 2.1.75
+ * rtslib: fix missing ':' after else statement
+ * dbroot: let the user change the dbroot directory freely.
+ * handle target kernel module new attribute cpus_allowed_list
+ * fix "This _Backstore already exists in configFS" exception
+ * Check whether the enable attribute exists before fread
+ * Filter fabric wwns by reading driver name
+ * Add support of efct fabric driver
+ * tcmu: add support for config param data_pages_per_blk
+ * Relax restrictions on TPG Tag range
+ * rtslib: Use O_RDWR for sg devices alone.
+
+-------------------------------------------------------------------
Old:
----
python-rtslib-fb-v2.1.74.tar.xz
New:
----
python-rtslib-fb-v2.1.75.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rtslib-fb.spec ++++++
--- /var/tmp/diff_new_pack.4V5dBp/_old 2022-05-08 21:52:06.087444174 +0200
+++ /var/tmp/diff_new_pack.4V5dBp/_new 2022-05-08 21:52:06.095444184 +0200
@@ -25,7 +25,7 @@
%define dbdir %{_sysconfdir}/target
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-rtslib-fb
-Version: 2.1.74
+Version: 2.1.75
Release: 0%{?dist}
Summary: API for Linux kernel SCSI target (aka LIO)
License: Apache-2.0
@@ -50,7 +50,7 @@
BuildRequires: alts
%else
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
%endif
Provides: python-rtslib = %{version}-%{release}
Obsoletes: python-rtslib < %{version}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.4V5dBp/_old 2022-05-08 21:52:06.143444245 +0200
+++ /var/tmp/diff_new_pack.4V5dBp/_new 2022-05-08 21:52:06.147444249 +0200
@@ -7,7 +7,7 @@
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(\d*\.\d*\.)fb(\d*)</param>
<param name="versionrewrite-replacement">\1\2</param>
- <param name="revision">v2.1.74</param>
+ <param name="revision">v2.1.75</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.4V5dBp/_old 2022-05-08 21:52:06.167444275 +0200
+++ /var/tmp/diff_new_pack.4V5dBp/_new 2022-05-08 21:52:06.171444280 +0200
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param
name="url">https://github.com/open-iscsi/rtslib-fb.git</param>
- <param
name="changesrevision">33b174f313ba4f8aec2e2a159ff337ae7ca42cb8</param></service></servicedata>
+ <param
name="changesrevision">5469e71cfc47a5a869dae6bc7c1e0b2db7ae4c6a</param></service></servicedata>
(No newline at EOF)
++++++ python-rtslib-fb-v2.1.74.tar.xz -> python-rtslib-fb-v2.1.75.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/__init__.py
new/python-rtslib-fb-v2.1.75/rtslib/__init__.py
--- old/python-rtslib-fb-v2.1.74/rtslib/__init__.py 2020-08-24
10:05:02.000000000 +0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/__init__.py 2022-05-02
14:16:07.000000000 +0200
@@ -36,7 +36,7 @@
from .alua import ALUATargetPortGroup
-__version__ = '2.1.74'
+__version__ = '2.1.75'
__author__ = "Jerome Martin <[email protected]>"
__url__ = 'http://github.com/open-iscsi/rtslib-fb'
__description__ = 'API for Linux kernel SCSI target (aka LIO)'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/fabric.py
new/python-rtslib-fb-v2.1.75/rtslib/fabric.py
--- old/python-rtslib-fb-v2.1.74/rtslib/fabric.py 2020-08-24
10:05:02.000000000 +0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/fabric.py 2022-05-02
14:16:07.000000000 +0200
@@ -118,9 +118,15 @@
from .target import Target
from .utils import _get_auth_attr, _set_auth_attr
-version_attributes = set(["lio_version", "version"])
-discovery_auth_attributes = set(["discovery_auth"])
-target_names_excludes = version_attributes | discovery_auth_attributes
+excludes_list = [
+ # version_attributes
+ "lio_version", "version",
+ # discovery_auth_attributes
+ "discovery_auth",
+ # cpus_allowed_list_attributes
+ "cpus_allowed_list",
+]
+target_names_excludes = set(excludes_list)
class _BaseFabricModule(CFSNode):
@@ -144,7 +150,8 @@
self.name = name
self.spec_file = "N/A"
self._path = "%s/%s" % (self.configfs_dir, self.name)
- self.features = ('discovery_auth', 'acls', 'auth', 'nps', 'tpgts')
+ self.features = ('discovery_auth', 'acls', 'auth', 'nps', 'tpgts',
+ 'cpus_allowed_list')
self.wwn_types = ('free',)
self.kernel_module = "%s_target_mod" % self.name
@@ -220,6 +227,18 @@
raise RTSLibError("Fabric module %s does not implement "
+ "the %s feature" % (self.name, feature))
+ def _get_cpus_allowed_list(self):
+ self._check_self()
+ self._assert_feature('cpus_allowed_list')
+ path = "%s/cpus_allowed_list" % self.path
+ return fread(path)
+
+ def _set_cpus_allowed_list(self, allowed):
+ self._check_self()
+ self._assert_feature('cpus_allowed_list')
+ path = "%s/cpus_allowed_list" % self.path
+ fwrite(path, allowed)
+
def clear_discovery_auth_settings(self):
self._check_self()
self._assert_feature('discovery_auth')
@@ -267,6 +286,11 @@
self._assert_feature('discovery_auth')
_set_auth_attr(self, *args, **kwargs)
+ cpus_allowed_list = \
+ property(_get_cpus_allowed_list,
+ _set_cpus_allowed_list,
+ doc="Set or get the cpus_allowed_list attribute.")
+
discovery_enable_auth = \
property(_get_discovery_enable_auth,
_set_discovery_enable_auth,
@@ -375,7 +399,35 @@
def wwns(self):
for wwn_file in glob("/sys/class/fc_host/host*/port_name"):
with ignored(IOError):
- if not
fread(os.path.dirname(wwn_file)+"/symbolic_name").startswith("fcoe"):
+ host = os.path.realpath(os.path.dirname(wwn_file))
+ device = host.rsplit('/', 3)[0]
+ driver = os.path.basename(os.path.realpath(device+"/driver"))
+ if driver == "qla2xxx":
+ yield "naa." + fread(wwn_file)[2:]
+
+
+class EfctFabricModule(_BaseFabricModule):
+ def __init__(self):
+ super(EfctFabricModule, self).__init__('efct')
+ self.features = ("acls",)
+ self.wwn_types = ('naa',)
+ self.kernel_module = "efct"
+
+ def to_fabric_wwn(self, wwn):
+ # strip 'naa.' and add colons
+ return colonize(wwn[4:])
+
+ def from_fabric_wwn(self, wwn):
+ return "naa." + wwn.replace(":", "")
+
+ @property
+ def wwns(self):
+ for wwn_file in glob("/sys/class/fc_host/host*/port_name"):
+ with ignored(IOError):
+ host = os.path.realpath(os.path.dirname(wwn_file))
+ device = host.rsplit('/', 3)[0]
+ driver = os.path.basename(os.path.realpath(device+"/driver"))
+ if driver == "efct":
yield "naa." + fread(wwn_file)[2:]
@@ -419,7 +471,10 @@
def wwns(self):
for wwn_file in glob("/sys/class/fc_host/host*/port_name"):
with ignored(IOError):
- if
fread(os.path.dirname(wwn_file)+"/symbolic_name").startswith("fcoe"):
+ host = os.path.realpath(os.path.dirname(wwn_file))
+ device = host.rsplit('/', 3)[0]
+ subsystem =
os.path.basename(os.path.realpath(device+"/subsystem"))
+ if subsystem == "fcoe":
yield "naa." + fread(wwn_file)[2:]
@@ -465,6 +520,7 @@
"iscsi": ISCSIFabricModule,
"loopback": LoopbackFabricModule,
"qla2xxx": Qla2xxxFabricModule,
+ "efct": EfctFabricModule,
"sbp": SBPFabricModule,
"tcm_fc": FCoEFabricModule,
# "usb_gadget": USBGadgetFabricModule, # very rare, don't show
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/root.py
new/python-rtslib-fb-v2.1.75/rtslib/root.py
--- old/python-rtslib-fb-v2.1.74/rtslib/root.py 2020-08-24 10:05:02.000000000
+0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/root.py 2022-05-02 14:16:07.000000000
+0200
@@ -167,20 +167,20 @@
return
self._dbroot = fread(dbroot_path)
if self._dbroot != self._preferred_dbroot:
- if len(FabricModule.list_registered_drivers()) != 0:
- # Writing to dbroot_path after drivers have been registered
will make the kernel emit this error:
- # db_root: cannot be changed: target drivers registered
- from warnings import warn
- warn("Cannot set dbroot to {}. Target drivers have already
been registered."
- .format(self._preferred_dbroot))
- return
-
try:
fwrite(dbroot_path, self._preferred_dbroot+"\n")
except:
if not os.path.isdir(self._preferred_dbroot):
raise RTSLibError("Cannot set dbroot to {}. Please check
if this directory exists."
.format(self._preferred_dbroot))
+ else:
+ # Writing to dbroot_path after devices have been
registered will make the kernel emit this error:
+ # db_root: cannot be changed: target devices registered
+ from warnings import warn
+ warn("Cannot set dbroot to {}. Target devices have already
been registered."
+ .format(self._preferred_dbroot))
+ return
+
self._dbroot = fread(dbroot_path)
def _get_dbroot(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/target.py
new/python-rtslib-fb-v2.1.75/rtslib/target.py
--- old/python-rtslib-fb-v2.1.74/rtslib/target.py 2020-08-24
10:05:02.000000000 +0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/target.py 2022-05-02
14:16:07.000000000 +0200
@@ -159,7 +159,7 @@
@param parent_target: The parent Target object of the TPG.
@type parent_target: Target
@param tag: The TPG Tag (TPGT).
- @type tag: int > 0
+ @type tag: positive int
@param mode:An optionnal string containing the object creation mode:
- I{'any'} means the configFS object will be either looked up or
created.
@@ -181,8 +181,8 @@
raise RTSLibError("Cannot find an available TPG Tag")
else:
tag = int(tag)
- if not tag > 0:
- raise RTSLibError("The TPG Tag must be >0")
+ if tag < 0:
+ raise RTSLibError("The TPG Tag must be >=0")
self._tag = tag
if isinstance(parent_target, Target):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/tcm.py
new/python-rtslib-fb-v2.1.75/rtslib/tcm.py
--- old/python-rtslib-fb-v2.1.74/rtslib/tcm.py 2020-08-24 10:05:02.000000000
+0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/tcm.py 2022-05-02 14:16:07.000000000
+0200
@@ -22,6 +22,7 @@
import stat
import re
import glob
+import fcntl
import resource
from six.moves import range
@@ -32,6 +33,10 @@
from .utils import is_dev_in_use, get_blockdev_type
from .utils import get_size_for_blk_dev, get_size_for_disk_name
+lock_file = '/var/run/rtslib_backstore.lock'
+if not os.path.exists('/var/run'):
+ os.makedirs('/var/run')
+
def storage_object_get_alua_support_attr(so):
'''
Helper function that can be called by passthrough type of backends.
@@ -282,16 +287,15 @@
'''
@return: True if the StorageObject is configured, else returns False
'''
-
self._check_self()
path = "%s/enable" % self.path
- try:
- configured = fread(path)
- except IOError:
+ # If the StorageObject does not have the enable attribute,
+ # then it is always enabled.
+ if os.path.isfile(path):
+ return bool(int(fread(path)))
+ else:
return True
- return bool(int(configured))
-
version = property(_get_version,
doc="Get the version of the StorageObject's backstore")
name = property(_get_name,
@@ -876,7 +880,11 @@
val = self.get_attribute('hw_block_size')
if val != "NULL":
tuples.append("hw_block_size=%s" % val)
- # 3. add next ...
+ # 3. data_pages_per_blk
+ val = self._parse_info('DataPagesPerBlk')
+ if val != "NULL":
+ tuples.append("data_pages_per_blk=%s" % val)
+ # 4. add next ...
return ",".join(tuples)
@@ -993,6 +1001,8 @@
(self._plugin, name))
else:
# Allocate new index value
+ lkfd = open(lock_file, 'w+')
+ fcntl.flock(lkfd, fcntl.LOCK_EX)
indexes = set(bs_cache.values())
for index in range(1048576):
if index not in indexes:
@@ -1000,7 +1010,9 @@
bs_cache[self._lookup_key] = self._index
break
else:
+ fcntl.flock(lkfd, fcntl.LOCK_UN)
raise RTSLibError("No available backstore index")
+ fcntl.flock(lkfd, fcntl.LOCK_UN)
self._path = "%s/core/%s_%d" % (self.configfs_dir,
dirp,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-rtslib-fb-v2.1.74/rtslib/utils.py
new/python-rtslib-fb-v2.1.75/rtslib/utils.py
--- old/python-rtslib-fb-v2.1.74/rtslib/utils.py 2020-08-24
10:05:02.000000000 +0200
+++ new/python-rtslib-fb-v2.1.75/rtslib/utils.py 2022-05-02
14:16:07.000000000 +0200
@@ -114,7 +114,11 @@
'''
path = os.path.realpath(str(path))
try:
- file_fd = os.open(path, os.O_EXCL|os.O_NDELAY|os.O_RDWR)
+ device = pyudev.Device.from_device_file(_CONTEXT, path)
+ if device.subsystem == u'scsi_generic':
+ file_fd = os.open(path, os.O_EXCL|os.O_NDELAY|os.O_RDWR)
+ else:
+ file_fd = os.open(path, os.O_EXCL|os.O_NDELAY)
except OSError:
return True
else: