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
This commit is contained in:
parent
cb07a130b1
commit
deb04ab4ba
@ -1 +1 @@
|
||||
b5b0d996824665d5e87b375b74a2bd22ff73cbb0
|
||||
84e27c403e61c28793ecffea4e280b3cdbb365a0
|
27
prevent-already-reading-continuous-exception-message.patch
Normal file
27
prevent-already-reading-continuous-exception-message.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 6c84612b52b5f14e74a1c44f03d78a85c6f0c5dc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
||||
<psuarezhernandez@suse.com>
|
||||
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
|
||||
|
||||
|
34
remove-unnecessary-yield-causing-badyielderror-bsc-1.patch
Normal file
34
remove-unnecessary-yield-causing-badyielderror-bsc-1.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 53d182abfbf7ab1156496481801e5e64e7f112e6 Mon Sep 17 00:00:00 2001
|
||||
From: Mihai Dinca <mdinca@suse.de>
|
||||
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
|
||||
|
||||
|
76
remove-virt.pool_delete-fast-parameter-178.patch
Normal file
76
remove-virt.pool_delete-fast-parameter-178.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 6dfe6e1370f330c0d300bf0effd7e6cf8a28c734 Mon Sep 17 00:00:00 2001
|
||||
From: Cedric Bosdonnat <cbosdonnat@suse.com>
|
||||
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
|
||||
|
||||
|
26
salt.changes
26
salt.changes
@ -1,3 +1,27 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 30 11:23:05 UTC 2019 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>
|
||||
|
||||
- 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ă <mihai.dinca@suse.com>
|
||||
|
||||
- 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 <pablo.suarezhernandez@suse.com>
|
||||
|
||||
- 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 <jbreuer@suse.de>
|
||||
|
||||
@ -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
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user