Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package crmsh for openSUSE:Factory checked 
in at 2022-08-11 18:33:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/crmsh (Old)
 and      /work/SRC/openSUSE:Factory/.crmsh.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "crmsh"

Thu Aug 11 18:33:00 2022 rev:252 rq:994557 version:4.4.1+20220811.e3a59fc7

Changes:
--------
--- /work/SRC/openSUSE:Factory/crmsh/crmsh.changes      2022-08-09 
15:28:31.477654716 +0200
+++ /work/SRC/openSUSE:Factory/.crmsh.new.1521/crmsh.changes    2022-08-11 
18:33:15.822202830 +0200
@@ -1,0 +2,13 @@
+Thu Aug 11 12:09:28 UTC 2022 - xli...@suse.com
+
+- Update to version 4.4.1+20220811.e3a59fc7:
+  * Fix: bootstrap: Use crmsh.parallax instead of parallax module directly 
(bsc#1202006)
+
+-------------------------------------------------------------------
+Wed Aug 10 15:00:30 UTC 2022 - xli...@suse.com
+
+- Update to version 4.4.0+20220810.387d071f:
+  * Dev: unittest: Adjust unit test based on previous changes
+  * Dev: bootstrap: Generate public key from private key
+
+-------------------------------------------------------------------

Old:
----
  crmsh-4.4.0+20220809.4f90c4ef.tar.bz2

New:
----
  crmsh-4.4.1+20220811.e3a59fc7.tar.bz2

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

Other differences:
------------------
++++++ crmsh.spec ++++++
--- /var/tmp/diff_new_pack.QDkANo/_old  2022-08-11 18:33:16.366201995 +0200
+++ /var/tmp/diff_new_pack.QDkANo/_new  2022-08-11 18:33:16.370201989 +0200
@@ -36,7 +36,7 @@
 Summary:        High Availability cluster command-line interface
 License:        GPL-2.0-or-later
 Group:          %{pkg_group}
-Version:        4.4.0+20220809.4f90c4ef
+Version:        4.4.1+20220811.e3a59fc7
 Release:        0
 URL:            http://crmsh.github.io
 Source0:        %{name}-%{version}.tar.bz2

++++++ _service ++++++
--- /var/tmp/diff_new_pack.QDkANo/_old  2022-08-11 18:33:16.398201946 +0200
+++ /var/tmp/diff_new_pack.QDkANo/_new  2022-08-11 18:33:16.402201940 +0200
@@ -3,7 +3,7 @@
     <param name="url">https://github.com/ClusterLabs/crmsh.git</param>
     <param name="scm">git</param>
     <param name="filename">crmsh</param>
-    <param name="versionformat">4.4.0+%cd.%h</param>
+    <param name="versionformat">4.4.1+%cd.%h</param>
     <param name="revision">master</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.QDkANo/_old  2022-08-11 18:33:16.418201916 +0200
+++ /var/tmp/diff_new_pack.QDkANo/_new  2022-08-11 18:33:16.418201916 +0200
@@ -9,7 +9,7 @@
 </service>
 <service name="tar_scm">
   <param name="url">https://github.com/ClusterLabs/crmsh.git</param>
-  <param 
name="changesrevision">4f90c4ef75b4d6d3e4d3d11ec94eead2e5619172</param>
+  <param 
name="changesrevision">e3a59fc7fda76339197455c477df102048ede726</param>
 </service>
 </servicedata>
 (No newline at EOF)

++++++ crmsh-4.4.0+20220809.4f90c4ef.tar.bz2 -> 
crmsh-4.4.1+20220811.e3a59fc7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh-4.4.0+20220809.4f90c4ef/crmsh/bootstrap.py 
new/crmsh-4.4.1+20220811.e3a59fc7/crmsh/bootstrap.py
--- old/crmsh-4.4.0+20220809.4f90c4ef/crmsh/bootstrap.py        2022-08-09 
08:47:48.000000000 +0200
+++ new/crmsh-4.4.1+20220811.e3a59fc7/crmsh/bootstrap.py        2022-08-11 
13:53:08.000000000 +0200
@@ -35,6 +35,7 @@
 from .constants import SSH_OPTION, QDEVICE_HELP_INFO, STONITH_TIMEOUT_DEFAULT, 
REJOIN_COUNT, REJOIN_INTERVAL
 from . import ocfs2
 from . import qdevice
+from . import parallax
 from . import log
 
 
@@ -828,10 +829,14 @@
     """
     change_user_shell(user)
 
+    cmd = ""
     private_key, public_key, authorized_file = key_files(user).values()
     if not utils.detect_file(private_key, remote=remote):
         logger.info("SSH key for {} does not exist, hence generate it 
now".format(user))
         cmd = "ssh-keygen -q -f {} -C 'Cluster Internal on {}' -N 
''".format(private_key, remote if remote else utils.this_node())
+    elif not utils.detect_file(public_key, remote=remote):
+        cmd = "ssh-keygen -y -f {} > {}".format(private_key, public_key)
+    if cmd:
         cmd = utils.add_su(cmd, user)
         utils.get_stdout_or_raise_error(cmd, remote=remote)
 
@@ -1495,6 +1500,9 @@
 
 
 def join_ssh_merge(_cluster_node):
+    """
+    Ensure known_hosts is the same in all nodes
+    """
     logger.info("Merging known_hosts")
 
     hosts = [m.group(1)
@@ -1503,22 +1511,14 @@
         hosts = [_cluster_node]
         logger.warning("Unable to extract host list from %s" % (CSYNC2_CFG))
 
-    try:
-        import parallax
-    except ImportError:
-        utils.fatal("parallax python library is missing")
-
-    opts = parallax.Options()
-    opts.ssh_options = ['StrictHostKeyChecking=no']
-
-    # The act of using pssh to connect to every host (without strict host key
-    # checking) ensures that at least *this* host has every other host in its
-    # known_hosts
+    # To create local entry in known_hosts
+    utils.get_stdout_or_raise_error("ssh {} {} true".format(SSH_OPTION, 
utils.this_node()))
+
     known_hosts_new = set()
     cat_cmd = "[ -e /root/.ssh/known_hosts ] && cat /root/.ssh/known_hosts || 
true"
     logger_utils.log_only_to_file("parallax.call {} : {}".format(hosts, 
cat_cmd))
-    results = parallax.call(hosts, cat_cmd, opts)
-    for host, result in results.items():
+    results = parallax.parallax_call(hosts, cat_cmd, strict=False)
+    for host, result in results:
         if isinstance(result, parallax.Error):
             logger.warning("Failed to get known_hosts from {}: 
{}".format(host, str(result)))
         else:
@@ -1528,8 +1528,8 @@
         hoststxt = "\n".join(sorted(known_hosts_new))
         tmpf = utils.str2tmp(hoststxt)
         logger_utils.log_only_to_file("parallax.copy {} : {}".format(hosts, 
hoststxt))
-        results = parallax.copy(hosts, tmpf, "/root/.ssh/known_hosts")
-        for host, result in results.items():
+        results = parallax.parallax_copy(hosts, tmpf, 
"/root/.ssh/known_hosts", strict=False)
+        for host, result in results:
             if isinstance(result, parallax.Error):
                 logger.warning("scp to {} failed ({}), known_hosts update may 
be incomplete".format(host, str(result)))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crmsh-4.4.0+20220809.4f90c4ef/crmsh/parallax.py 
new/crmsh-4.4.1+20220811.e3a59fc7/crmsh/parallax.py
--- old/crmsh-4.4.0+20220809.4f90c4ef/crmsh/parallax.py 2022-08-09 
08:47:48.000000000 +0200
+++ new/crmsh-4.4.1+20220811.e3a59fc7/crmsh/parallax.py 2022-08-11 
13:53:08.000000000 +0200
@@ -6,6 +6,9 @@
 import parallax
 
 
+Error = parallax.Error
+
+
 class Parallax(object):
     """
     # Parallax SSH API
@@ -45,10 +48,8 @@
 
     def handle(self, results):
         for host, result in results:
-            if isinstance(result, parallax.Error):
-                exception_str = "Failed on {}: {}".format(host, result)
-                if self.strict:
-                    raise ValueError(exception_str)
+            if isinstance(result, parallax.Error) and self.strict:
+                raise ValueError("Failed on {}: {}".format(host, result))
         return results
 
     def call(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/crmsh-4.4.0+20220809.4f90c4ef/test/unittests/test_bootstrap.py 
new/crmsh-4.4.1+20220811.e3a59fc7/test/unittests/test_bootstrap.py
--- old/crmsh-4.4.0+20220809.4f90c4ef/test/unittests/test_bootstrap.py  
2022-08-09 08:47:48.000000000 +0200
+++ new/crmsh-4.4.1+20220811.e3a59fc7/test/unittests/test_bootstrap.py  
2022-08-11 13:53:08.000000000 +0200
@@ -362,7 +362,7 @@
     @mock.patch('crmsh.bootstrap.change_user_shell')
     def test_configure_ssh_key(self, mock_change_shell, mock_key_files, 
mock_detect, mock_run, mock_append_unique):
         mock_key_files.return_value = {"private": "/test/.ssh/id_rsa", 
"public": "/test/.ssh/id_rsa.pub", "authorized": "/test/.ssh/authorized_keys"}
-        mock_detect.side_effect = [True, False]
+        mock_detect.side_effect = [True, True, False]
 
         bootstrap.configure_ssh_key("test")
 
@@ -370,6 +370,7 @@
         mock_key_files.assert_called_once_with("test")
         mock_detect.assert_has_calls([
             mock.call("/test/.ssh/id_rsa", remote=None),
+            mock.call("/test/.ssh/id_rsa.pub", remote=None),
             mock.call("/test/.ssh/authorized_keys", remote=None)
             ])
         mock_append_unique.assert_called_once_with("/test/.ssh/id_rsa.pub", 
"/test/.ssh/authorized_keys", remote=None)

Reply via email to