From deb04ab4ba9fe1236c836cdf9cc0886d9eba30bc6ffcebefc0b7bc847ea1dfc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Fri, 8 Nov 2019 09:16:30 +0000 Subject: [PATCH] osc copypac from project:systemsmanagement:saltstack:testing package:salt revision:306 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=155 --- _lastrevision | 2 +- ...reading-continuous-exception-message.patch | 27 +++++++ ...ry-yield-causing-badyielderror-bsc-1.patch | 34 +++++++++ ...-virt.pool_delete-fast-parameter-178.patch | 76 +++++++++++++++++++ salt.changes | 26 ++++++- salt.spec | 9 +++ 6 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 prevent-already-reading-continuous-exception-message.patch create mode 100644 remove-unnecessary-yield-causing-badyielderror-bsc-1.patch create mode 100644 remove-virt.pool_delete-fast-parameter-178.patch diff --git a/_lastrevision b/_lastrevision index 0aa4287..89044b9 100644 --- a/_lastrevision +++ b/_lastrevision @@ -1 +1 @@ -b5b0d996824665d5e87b375b74a2bd22ff73cbb0 \ No newline at end of file +84e27c403e61c28793ecffea4e280b3cdbb365a0 \ No newline at end of file diff --git a/prevent-already-reading-continuous-exception-message.patch b/prevent-already-reading-continuous-exception-message.patch new file mode 100644 index 0000000..cc1dc5e --- /dev/null +++ b/prevent-already-reading-continuous-exception-message.patch @@ -0,0 +1,27 @@ +From 6c84612b52b5f14e74a1c44f03d78a85c6f0c5dc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Tue, 29 Oct 2019 09:08:52 +0000 +Subject: [PATCH] Prevent 'Already reading' continuous exception message + (bsc#1137642) + +--- + salt/transport/ipc.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py +index 8235f104ef..0ed0baeec2 100644 +--- a/salt/transport/ipc.py ++++ b/salt/transport/ipc.py +@@ -770,6 +770,7 @@ class IPCMessageSubscriber(IPCClient): + break + except Exception as exc: + log.error('Exception occurred while Subscriber handling stream: %s', exc) ++ yield tornado.gen.sleep(1) + + def __run_callbacks(self, raw): + for callback in self.callbacks: +-- +2.23.0 + + diff --git a/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch b/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch new file mode 100644 index 0000000..0d1f348 --- /dev/null +++ b/remove-unnecessary-yield-causing-badyielderror-bsc-1.patch @@ -0,0 +1,34 @@ +From 53d182abfbf7ab1156496481801e5e64e7f112e6 Mon Sep 17 00:00:00 2001 +From: Mihai Dinca +Date: Wed, 30 Oct 2019 10:19:12 +0100 +Subject: [PATCH] Remove unnecessary yield causing BadYieldError + (bsc#1154620) + +--- + salt/cli/batch_async.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py +index 6d0dca1da5..754c257b36 100644 +--- a/salt/cli/batch_async.py ++++ b/salt/cli/batch_async.py +@@ -227,7 +227,6 @@ class BatchAsync(object): + self.event.unsubscribe(pattern, match_type='glob') + del self + gc.collect() +- yield + + @tornado.gen.coroutine + def schedule_next(self): +@@ -263,7 +262,6 @@ class BatchAsync(object): + else: + yield self.end_batch() + gc.collect() +- yield + + def __del__(self): + self.local = None +-- +2.23.0 + + diff --git a/remove-virt.pool_delete-fast-parameter-178.patch b/remove-virt.pool_delete-fast-parameter-178.patch new file mode 100644 index 0000000..5feae35 --- /dev/null +++ b/remove-virt.pool_delete-fast-parameter-178.patch @@ -0,0 +1,76 @@ +From 6dfe6e1370f330c0d300bf0effd7e6cf8a28c734 Mon Sep 17 00:00:00 2001 +From: Cedric Bosdonnat +Date: Wed, 30 Oct 2019 12:18:51 +0100 +Subject: [PATCH] Remove virt.pool_delete fast parameter (#178) + +There are two reasons to remove this parameter without deprecating it: + * the meaning has been mistakenly inversed + * fast=True will raise an exception for every libvirt storage backend +since that flag has never been implemented in any of those. + +Fixes issue #54474 +--- + salt/modules/virt.py | 9 ++------- + tests/unit/modules/test_virt.py | 17 +++++++++++++++++ + 2 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/salt/modules/virt.py b/salt/modules/virt.py +index d01b6c3f1e..3abc140a00 100644 +--- a/salt/modules/virt.py ++++ b/salt/modules/virt.py +@@ -4885,13 +4885,11 @@ def pool_undefine(name, **kwargs): + conn.close() + + +-def pool_delete(name, fast=True, **kwargs): ++def pool_delete(name, **kwargs): + ''' + Delete the resources of a defined libvirt storage pool. + + :param name: libvirt storage pool name +- :param fast: if set to False, zeroes out all the data. +- Default value is True. + :param connection: libvirt connection URI, overriding defaults + :param username: username to connect with, overriding defaults + :param password: password to connect with, overriding defaults +@@ -4907,10 +4905,7 @@ def pool_delete(name, fast=True, **kwargs): + conn = __get_conn(**kwargs) + try: + pool = conn.storagePoolLookupByName(name) +- flags = libvirt.VIR_STORAGE_POOL_DELETE_NORMAL +- if fast: +- flags = libvirt.VIR_STORAGE_POOL_DELETE_ZEROED +- return not bool(pool.delete(flags)) ++ return not bool(pool.delete(libvirt.VIR_STORAGE_POOL_DELETE_NORMAL)) + finally: + conn.close() + +diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py +index 4d20e998d8..b95f51807f 100644 +--- a/tests/unit/modules/test_virt.py ++++ b/tests/unit/modules/test_virt.py +@@ -3006,3 +3006,20 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): + self.assertEqual('vnc', graphics['type']) + self.assertEqual('5900', graphics['port']) + self.assertEqual('0.0.0.0', graphics['listen']) ++ ++ def test_pool_delete(self): ++ ''' ++ Test virt.pool_delete function ++ ''' ++ mock_pool = MagicMock() ++ mock_pool.delete = MagicMock(return_value=0) ++ self.mock_conn.storagePoolLookupByName = MagicMock(return_value=mock_pool) ++ ++ res = virt.pool_delete('test-pool') ++ self.assertTrue(res) ++ ++ self.mock_conn.storagePoolLookupByName.assert_called_once_with('test-pool') ++ ++ # Shouldn't be called with another parameter so far since those are not implemented ++ # and thus throwing exceptions. ++ mock_pool.delete.assert_called_once_with(self.mock_libvirt.VIR_STORAGE_POOL_DELETE_NORMAL) +-- +2.23.0 + + diff --git a/salt.changes b/salt.changes index 1906484..8402240 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,27 @@ +------------------------------------------------------------------- +Wed Oct 30 11:23:05 UTC 2019 - Pablo Suárez Hernández + +- Remove virt.pool_delete fast parameter (U#54474) + +- Added: + * remove-virt.pool_delete-fast-parameter-178.patch + +------------------------------------------------------------------- +Wed Oct 30 10:22:18 UTC 2019 - Mihai Dincă + +- Remove unnecessary yield causing BadYieldError (bsc#1154620) + +- Added: + * remove-unnecessary-yield-causing-badyielderror-bsc-1.patch + +------------------------------------------------------------------- +Tue Oct 29 09:14:07 UTC 2019 - Pablo Suárez Hernández + +- Prevent 'Already reading' continuous exception message (bsc#1137642) + +- Added: + * prevent-already-reading-continuous-exception-message.patch + ------------------------------------------------------------------- Fri Oct 25 14:39:23 UTC 2019 - Jochen Breuer @@ -281,7 +305,7 @@ Fri May 24 16:03:09 UTC 2019 - psuarezhernandez@suse.com ------------------------------------------------------------------- Thu May 23 08:27:52 UTC 2019 - psuarezhernandez@suse.com -- Add new "salt-standalone-formulas-configuration" package +- Add new "salt-standalone-formulas-configuration" package (fate#327791) - Added: * add-standalone-configuration-file-for-enabling-packa.patch diff --git a/salt.spec b/salt.spec index 741fb71..56580da 100644 --- a/salt.spec +++ b/salt.spec @@ -264,6 +264,12 @@ Patch91: accumulated-changes-from-yomi-167.patch Patch92: fix-a-wrong-rebase-in-test_core.py-180.patch # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/181 Patch93: fix-for-older-mock-module.patch +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6c84612b52b5f14e74a1c44f03d78a85c6f0c5dc +Patch94: prevent-already-reading-continuous-exception-message.patch +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/182 +Patch95: remove-unnecessary-yield-causing-badyielderror-bsc-1.patch +# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54475 +Patch96: remove-virt.pool_delete-fast-parameter-178.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: logrotate @@ -857,6 +863,9 @@ cp %{S:5} ./.travis.yml %patch91 -p1 %patch92 -p1 %patch93 -p1 +%patch94 -p1 +%patch95 -p1 +%patch96 -p1 %build %if 0%{?build_py2}