Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nvme-stas for openSUSE:Factory 
checked in at 2023-06-06 19:56:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvme-stas (Old)
 and      /work/SRC/openSUSE:Factory/.nvme-stas.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvme-stas"

Tue Jun  6 19:56:19 2023 rev:12 rq:1091049 version:2.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvme-stas/nvme-stas.changes      2023-04-01 
19:32:36.821464514 +0200
+++ /work/SRC/openSUSE:Factory/.nvme-stas.new.15902/nvme-stas.changes   
2023-06-06 19:57:10.926801539 +0200
@@ -1,0 +2,6 @@
+Fri Jun  2 16:01:46 UTC 2023 - Martin Wilck <[email protected]>
+
+- Update to version 2.2.1:
+  * staslib: Fix setting controller DHCHAP key (bsc#1211557)
+
+-------------------------------------------------------------------

Old:
----
  nvme-stas-2.2.obscpio

New:
----
  nvme-stas-2.2.1.obscpio

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

Other differences:
------------------
++++++ nvme-stas.spec ++++++
--- /var/tmp/diff_new_pack.DN2HT7/_old  2023-06-06 19:57:11.482804836 +0200
+++ /var/tmp/diff_new_pack.DN2HT7/_new  2023-06-06 19:57:11.490804883 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           nvme-stas
-Version:        2.2
+Version:        2.2.1
 Release:        0
 Summary:        NVMe STorage Appliance Services
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.DN2HT7/_old  2023-06-06 19:57:11.522805072 +0200
+++ /var/tmp/diff_new_pack.DN2HT7/_new  2023-06-06 19:57:11.526805096 +0200
@@ -4,7 +4,7 @@
     <param name="url">https://github.com/linux-nvme/nvme-stas.git</param>
     <param name="filename">nvme-stas</param>
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="revision">v2.2</param>
+    <param name="revision">v2.2.1</param>
     <param name="versionrewrite-pattern">v(\d+.\d+(\.d+)?)</param>
     <param name="versionrewrite-replacement">\1</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.DN2HT7/_old  2023-06-06 19:57:11.554805262 +0200
+++ /var/tmp/diff_new_pack.DN2HT7/_new  2023-06-06 19:57:11.558805286 +0200
@@ -1,7 +1,7 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/linux-nvme/nvme-stas.git</param>
-    <param 
name="changesrevision">c128b8afe7d5bf3027b767cf9c8ff50aa3c8b3cc</param>
+    <param 
name="changesrevision">435248b73cdc080c5b9fdd1c5915d29ea9e57827</param>
   </service>
 </servicedata>
 (No newline at EOF)

++++++ nvme-stas-2.2.obscpio -> nvme-stas-2.2.1.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/NEWS.md new/nvme-stas-2.2.1/NEWS.md
--- old/nvme-stas-2.2/NEWS.md   2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/NEWS.md 2023-03-20 21:00:54.000000000 +0100
@@ -1,5 +1,14 @@
 # STorage Appliance Services (STAS)
 
+## Changes with release 2.2.1
+
+Added a few more unit and coverage tests. Fixed the following bugs.
+
+Bug fixes:
+
+* Fix errors with some debug commands (e.g. `stafctl ls --detailed`)
+* Fix setting controller DHCHAP key (this requires [corresponding changes in 
libnvme](https://github.com/linux-nvme/libnvme/pull/597)) 
+
 ## Changes with release 2.2
 
 Support for in-band authentication. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/coverage.sh.in 
new/nvme-stas-2.2.1/coverage.sh.in
--- old/nvme-stas-2.2/coverage.sh.in    2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/coverage.sh.in  2023-03-20 21:00:54.000000000 +0100
@@ -373,7 +373,7 @@
 zeroconf-connections-persistence  = 1:01
 
 [Controllers]
-controller = transport = tcp ; traddr = localhost ; ; ;
+controller = transport = tcp ; traddr = localhost ; ; ; kato=31; 
dhchap-ctrl-secret=not-so-secret
 controller=transport=tcp;traddr=1.1.1.1
 controller=transport=tcp;traddr=100.100.100.100
 controller=transport=tcp;traddr=2607:f8b0:4002:c2c::71
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/meson.build 
new/nvme-stas-2.2.1/meson.build
--- old/nvme-stas-2.2/meson.build       2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/meson.build     2023-03-20 21:00:54.000000000 +0100
@@ -9,7 +9,7 @@
 project(
     'nvme-stas',
     meson_version: '>= 0.53.0',
-    version: '2.2',
+    version: '2.2.1',
     license: 'Apache-2.0',
     default_options: [
         'buildtype=release',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/staslib/conf.py 
new/nvme-stas-2.2.1/staslib/conf.py
--- old/nvme-stas-2.2/staslib/conf.py   2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/staslib/conf.py 2023-03-20 21:00:54.000000000 +0100
@@ -653,6 +653,7 @@
             'discovery': defs.KERNEL_VERSION >= defs.KERNEL_TP8013_MIN_VERSION,
             'host_iface': defs.KERNEL_VERSION >= defs.KERNEL_IFACE_MIN_VERSION,
             'dhchap_secret': defs.KERNEL_VERSION >= 
defs.KERNEL_HOSTKEY_MIN_VERSION,
+            'dhchap_ctrl_secret': defs.KERNEL_VERSION >= 
defs.KERNEL_CTRLKEY_MIN_VERSION,
         }
 
         # If some of the options are False, we need to check wether they can be
@@ -692,6 +693,11 @@
         return self._supported_options['host_iface']
 
     @property
-    def dhchap_secret_supp(self):
+    def dhchap_hostkey_supp(self):
         '''This option allows specifying the host DHCHAP key used for 
authentication.'''
         return self._supported_options['dhchap_secret']
+
+    @property
+    def dhchap_ctrlkey_supp(self):
+        '''This option allows specifying the controller DHCHAP key used for 
authentication.'''
+        return self._supported_options['dhchap_ctrl_secret']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/staslib/ctrl.py 
new/nvme-stas-2.2.1/staslib/ctrl.py
--- old/nvme-stas-2.2/staslib/ctrl.py   2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/staslib/ctrl.py 2023-03-20 21:00:54.000000000 +0100
@@ -52,23 +52,10 @@
         sysconf = conf.SysConf()
         self._nvme_options = conf.NvmeOptions()
         self._root = nvme.root()
-        if 'hostkey' in inspect.signature(nvme.host).parameters:
-            self._host = nvme.host(  # hostkey: pylint: 
disable=unexpected-keyword-arg
-                self._root,
-                hostnqn=sysconf.hostnqn,
-                hostid=sysconf.hostid,
-                hostkey=sysconf.hostkey if 
self._nvme_options.dhchap_secret_supp else None,
-                hostsymname=sysconf.hostsymname,
-            )
-        else:
-            # To be removed at some point.
-            # This is for backward compatibility with older libnvme
-            self._host = nvme.host(
-                self._root,
-                hostnqn=sysconf.hostnqn,
-                hostid=sysconf.hostid,
-                hostsymname=sysconf.hostsymname,
-            )
+        self._host = nvme.host(
+            self._root, hostnqn=sysconf.hostnqn, hostid=sysconf.hostid, 
hostsymname=sysconf.hostsymname
+        )
+        self._host.dhchap_key = sysconf.hostkey if 
self._nvme_options.dhchap_hostkey_supp else None
         self._udev = udev.UDEV
         self._device = None  # Refers to the nvme device (e.g. /dev/nvme[n])
         self._ctrl = None  # libnvme's nvme.ctrl object
@@ -235,6 +222,22 @@
         )
         self._ctrl.discovery_ctrl_set(self._discovery_ctrl)
 
+        # Set the DHCHAP key on the controller
+        # NOTE that this will eventually have to
+        # change once we have support for AVE (TP8019)
+        ctrl_dhchap_key = self.tid.cfg.get('dhchap-ctrl-secret')
+        if ctrl_dhchap_key and self._nvme_options.dhchap_ctrlkey_supp:
+            has_dhchap_key = hasattr(self._ctrl, 'dhchap_key')
+            if not has_dhchap_key:
+                logging.warning(
+                    '%s | %s - libnvme-%s does not allow setting the 
controller DHCHAP key. Please upgrade libnvme.',
+                    self.id,
+                    self.device,
+                    defs.LIBNVME_VERSION,
+                )
+            else:
+                self._ctrl.dhchap_key = ctrl_dhchap_key
+
         # Audit existing nvme devices. If we find a match, then
         # we'll just borrow that device instead of creating a new one.
         udev_obj = self._find_existing_connection()
@@ -553,7 +556,6 @@
     def _post_registration_actions(self):
         # Need to check that supported_log_pages() is available (introduced in 
libnvme 1.2)
         has_supported_log_pages = hasattr(self._ctrl, 'supported_log_pages')
-
         if not has_supported_log_pages:
             logging.warning(
                 '%s | %s - libnvme-%s does not support "Get supported log 
pages". Please upgrade libnvme.',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/staslib/defs.py 
new/nvme-stas-2.2.1/staslib/defs.py
--- old/nvme-stas-2.2/staslib/defs.py   2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/staslib/defs.py 2023-03-20 21:00:54.000000000 +0100
@@ -34,6 +34,7 @@
 KERNEL_IFACE_MIN_VERSION = KernelVersion('5.14')
 KERNEL_TP8013_MIN_VERSION = KernelVersion('5.16')
 KERNEL_HOSTKEY_MIN_VERSION = KernelVersion('5.20')
+KERNEL_CTRLKEY_MIN_VERSION = KernelVersion('5.20')
 
 WELL_KNOWN_DISC_NQN = 'nqn.2014-08.org.nvmexpress.discovery'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/staslib/stas.py 
new/nvme-stas-2.2.1/staslib/stas.py
--- old/nvme-stas-2.2/staslib/stas.py   2023-03-16 18:57:26.000000000 +0100
+++ new/nvme-stas-2.2.1/staslib/stas.py 2023-03-20 21:00:54.000000000 +0100
@@ -171,7 +171,7 @@
 
     def controller_id_dict(self) -> dict:
         '''@brief return the controller ID as a dict.'''
-        return self.tid.as_dict()
+        return {k: str(v) for k, v in self.tid.as_dict().items()}
 
     def details(self) -> dict:
         '''@brief return detailed debug info about this controller'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/test/test-config.py 
new/nvme-stas-2.2.1/test/test-config.py
--- old/nvme-stas-2.2/test/test-config.py       2023-03-16 18:57:26.000000000 
+0100
+++ new/nvme-stas-2.2.1/test/test-config.py     2023-03-20 21:00:54.000000000 
+0100
@@ -155,6 +155,8 @@
         self.assertIn(4, service_conf.ip_family)
         self.assertIn(6, service_conf.ip_family)
 
+        self.assertRaises(KeyError, service_conf.get_option, 'Babylon', 5)
+
 
 class StasSysConfUnitTest(unittest.TestCase):
     '''Sys config unit tests'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/test/test-nvme_options.py 
new/nvme-stas-2.2.1/test/test-nvme_options.py
--- old/nvme-stas-2.2/test/test-nvme_options.py 2023-03-16 18:57:26.000000000 
+0100
+++ new/nvme-stas-2.2.1/test/test-nvme_options.py       2023-03-20 
21:00:54.000000000 +0100
@@ -40,16 +40,20 @@
 
     def test_fabrics_correct_file(self):
         self.assertFalse(os.path.exists("/dev/nvme-fabrics"))
-        self.fs.create_file('/dev/nvme-fabrics', 
contents='host_iface=%s,discovery,dhchap_secret=%s\n')
+        self.fs.create_file(
+            '/dev/nvme-fabrics', 
contents='host_iface=%s,discovery,dhchap_secret=%s,dhchap_ctrl_secret=%s\n'
+        )
         self.assertTrue(os.path.exists('/dev/nvme-fabrics'))
         nvme_options = conf.NvmeOptions()
         self.assertTrue(nvme_options.discovery_supp)
         self.assertTrue(nvme_options.host_iface_supp)
-        self.assertTrue(nvme_options.dhchap_secret_supp)
-        self.assertEqual(nvme_options.get(), {'discovery': True, 'host_iface': 
True, 'dhchap_secret': True})
+        self.assertTrue(nvme_options.dhchap_hostkey_supp)
+        self.assertTrue(nvme_options.dhchap_ctrlkey_supp)
         self.assertEqual(
-            str(nvme_options), "supported options: {'discovery': True, 
'host_iface': True, 'dhchap_secret': True}"
+            nvme_options.get(),
+            {'discovery': True, 'host_iface': True, 'dhchap_secret': True, 
'dhchap_ctrl_secret': True},
         )
+        self.assertTrue(str(nvme_options).startswith("supported options:"))
         del nvme_options
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-stas-2.2/utils/nvmet/nvmet.py 
new/nvme-stas-2.2.1/utils/nvmet/nvmet.py
--- old/nvme-stas-2.2/utils/nvmet/nvmet.py      2023-03-16 18:57:26.000000000 
+0100
+++ new/nvme-stas-2.2.1/utils/nvmet/nvmet.py    2023-03-20 21:00:54.000000000 
+0100
@@ -30,7 +30,12 @@
 
 
 def _get_loaded_nvmet_modules():
-    cp = subprocess.run('/usr/sbin/lsmod', capture_output=True, text=True)
+    try:
+        cp = subprocess.run('/usr/sbin/lsmod', capture_output=True, text=True)
+    except TypeError:
+        # For older Python versions that don't support "capture_output" or 
"text"
+        cp = subprocess.run('/usr/sbin/lsmod', stdout=subprocess.PIPE, 
universal_newlines=True)
+
     if cp.returncode != 0 or not cp.stdout:
         return []
 

++++++ nvme-stas.obsinfo ++++++
--- /var/tmp/diff_new_pack.DN2HT7/_old  2023-06-06 19:57:11.738806354 +0200
+++ /var/tmp/diff_new_pack.DN2HT7/_new  2023-06-06 19:57:11.750806424 +0200
@@ -1,5 +1,5 @@
 name: nvme-stas
-version: 2.2
-mtime: 1678989446
-commit: c128b8afe7d5bf3027b767cf9c8ff50aa3c8b3cc
+version: 2.2.1
+mtime: 1679342454
+commit: 435248b73cdc080c5b9fdd1c5915d29ea9e57827
 

Reply via email to