diff --git a/_lastrevision b/_lastrevision index 2975e7d..92e8a2a 100644 --- a/_lastrevision +++ b/_lastrevision @@ -1 +1 @@ -6fdab5ecba96a2695eadd798abc2dcfe6ff2b99b \ No newline at end of file +5c46ca0c3961fc3954afcf884bf2ac754507c151 \ No newline at end of file diff --git a/add-missing-fun-for-returns-from-wfunc-executions.patch b/add-missing-fun-for-returns-from-wfunc-executions.patch new file mode 100644 index 0000000..ee0faba --- /dev/null +++ b/add-missing-fun-for-returns-from-wfunc-executions.patch @@ -0,0 +1,36 @@ +From fa957bcb842a29a340a980a03cd8e54b06e7e21b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Wed, 9 Oct 2019 13:03:33 +0100 +Subject: [PATCH] Add missing 'fun' for returns from wfunc executions + +--- + salt/client/ssh/__init__.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py +index 1453430e73..0df918d634 100644 +--- a/salt/client/ssh/__init__.py ++++ b/salt/client/ssh/__init__.py +@@ -682,6 +682,8 @@ class SSH(object): + data = {'return': data} + if 'id' not in data: + data['id'] = id_ ++ if 'fun' not in data: ++ data['fun'] = fun + data['jid'] = jid # make the jid in the payload the same as the jid in the tag + self.event.fire_event( + data, +@@ -797,6 +799,8 @@ class SSH(object): + data = {'return': data} + if 'id' not in data: + data['id'] = id_ ++ if 'fun' not in data: ++ data['fun'] = fun + data['jid'] = jid # make the jid in the payload the same as the jid in the tag + self.event.fire_event( + data, +-- +2.22.0 + + diff --git a/fix-failing-unit-tests-for-batch-async.patch b/fix-failing-unit-tests-for-batch-async.patch new file mode 100644 index 0000000..c4b335f --- /dev/null +++ b/fix-failing-unit-tests-for-batch-async.patch @@ -0,0 +1,185 @@ +From 8378bb24a5a53973e8dba7658b8b3465d967329f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Fri, 4 Oct 2019 15:00:50 +0100 +Subject: [PATCH] Fix failing unit tests for batch async + +--- + salt/cli/batch_async.py | 2 +- + tests/unit/cli/test_batch_async.py | 57 +++++++++++++++++------------- + 2 files changed, 34 insertions(+), 25 deletions(-) + +diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py +index f9e736f804..6d0dca1da5 100644 +--- a/salt/cli/batch_async.py ++++ b/salt/cli/batch_async.py +@@ -88,7 +88,7 @@ class BatchAsync(object): + io_loop=ioloop, + keep_loop=True) + self.scheduled = False +- self.patterns = {} ++ self.patterns = set() + + def __set_event_handler(self): + ping_return_pattern = 'salt/job/{0}/ret/*'.format(self.ping_jid) +diff --git a/tests/unit/cli/test_batch_async.py b/tests/unit/cli/test_batch_async.py +index 441f9c58b9..12dfe543bc 100644 +--- a/tests/unit/cli/test_batch_async.py ++++ b/tests/unit/cli/test_batch_async.py +@@ -68,8 +68,8 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + ret = self.batch.start() + # assert start_batch is called later with batch_presence_ping_timeout as param + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.batch_presence_ping_timeout, self.batch.start_batch)) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.start_batch,)) + # assert test.ping called + self.assertEqual( + self.batch.local.run_job_async.call_args[0], +@@ -88,8 +88,8 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + ret = self.batch.start() + # assert start_batch is called later with gather_job_timeout as param + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.opts['gather_job_timeout'], self.batch.start_batch)) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.start_batch,)) + + def test_batch_fire_start_event(self): + self.batch.minions = set(['foo', 'bar']) +@@ -113,12 +113,11 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + def test_start_batch_calls_next(self): + self.batch.run_next = MagicMock(return_value=MagicMock()) + self.batch.event = MagicMock() +- future = tornado.gen.Future() +- future.set_result(None) +- self.batch.run_next = MagicMock(return_value=future) + self.batch.start_batch() + self.assertEqual(self.batch.initialized, True) +- self.assertEqual(len(self.batch.run_next.mock_calls), 1) ++ self.assertEqual( ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.run_next,)) + + def test_batch_fire_done_event(self): + self.batch.targeted_minions = {'foo', 'baz', 'bar'} +@@ -154,14 +153,14 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + future = tornado.gen.Future() + future.set_result({'minions': ['foo', 'bar']}) + self.batch.local.run_job_async.return_value = future +- ret = self.batch.run_next().result() ++ self.batch.run_next() + self.assertEqual( + self.batch.local.run_job_async.call_args[0], + ({'foo', 'bar'}, 'my.fun', [], 'list') + ) + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.opts['timeout'], self.batch.find_job, {'foo', 'bar'}) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.find_job, {'foo', 'bar'}) + ) + self.assertEqual(self.batch.active, {'bar', 'foo'}) + +@@ -252,13 +251,14 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + self.assertEqual(self.batch.active, set()) + self.assertEqual(self.batch.done_minions, {'foo'}) + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.batch_delay, self.batch.run_next)) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.schedule_next,)) + + def test_batch__event_handler_find_job_return(self): + self.batch.event = MagicMock( +- unpack=MagicMock(return_value=('salt/job/1236/ret/foo', {'id': 'foo'}))) ++ unpack=MagicMock(return_value=('salt/job/1236/ret/foo', {'id': 'foo', 'return': 'deadbeaf'}))) + self.batch.start() ++ self.batch.patterns.add(('salt/job/1236/ret/*', 'find_job_return')) + self.batch._BatchAsync__event_handler(MagicMock()) + self.assertEqual(self.batch.find_job_returned, {'foo'}) + +@@ -275,10 +275,13 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + future = tornado.gen.Future() + future.set_result({}) + self.batch.local.run_job_async.return_value = future ++ self.batch.minions = set(['foo', 'bar']) ++ self.batch.jid_gen = MagicMock(return_value="1234") ++ tornado.gen.sleep = MagicMock(return_value=future) + self.batch.find_job({'foo', 'bar'}) + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.opts['gather_job_timeout'], self.batch.check_find_job, {'foo', 'bar'}) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.check_find_job, {'foo', 'bar'}, "1234") + ) + + @tornado.testing.gen_test +@@ -288,17 +291,21 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + future = tornado.gen.Future() + future.set_result({}) + self.batch.local.run_job_async.return_value = future ++ self.batch.minions = set(['foo', 'bar']) ++ self.batch.jid_gen = MagicMock(return_value="1234") ++ tornado.gen.sleep = MagicMock(return_value=future) + self.batch.find_job({'foo', 'bar'}) + self.assertEqual( +- self.batch.event.io_loop.call_later.call_args[0], +- (self.batch.opts['gather_job_timeout'], self.batch.check_find_job, {'foo'}) ++ self.batch.event.io_loop.spawn_callback.call_args[0], ++ (self.batch.check_find_job, {'foo'}, "1234") + ) + + def test_batch_check_find_job_did_not_return(self): + self.batch.event = MagicMock() + self.batch.active = {'foo'} + self.batch.find_job_returned = set() +- self.batch.check_find_job({'foo'}) ++ self.batch.patterns = { ('salt/job/1234/ret/*', 'find_job_return') } ++ self.batch.check_find_job({'foo'}, jid="1234") + self.assertEqual(self.batch.find_job_returned, set()) + self.assertEqual(self.batch.active, set()) + self.assertEqual(len(self.batch.event.io_loop.add_callback.mock_calls), 0) +@@ -306,9 +313,10 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + def test_batch_check_find_job_did_return(self): + self.batch.event = MagicMock() + self.batch.find_job_returned = {'foo'} +- self.batch.check_find_job({'foo'}) ++ self.batch.patterns = { ('salt/job/1234/ret/*', 'find_job_return') } ++ self.batch.check_find_job({'foo'}, jid="1234") + self.assertEqual( +- self.batch.event.io_loop.add_callback.call_args[0], ++ self.batch.event.io_loop.spawn_callback.call_args[0], + (self.batch.find_job, {'foo'}) + ) + +@@ -329,7 +337,8 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + # both not yet done but only 'foo' responded to find_job + not_done = {'foo', 'bar'} + +- self.batch.check_find_job(not_done) ++ self.batch.patterns = { ('salt/job/1234/ret/*', 'find_job_return') } ++ self.batch.check_find_job(not_done, jid="1234") + + # assert 'bar' removed from active + self.assertEqual(self.batch.active, {'foo'}) +@@ -339,7 +348,7 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + + # assert 'find_job' schedueled again only for 'foo' + self.assertEqual( +- self.batch.event.io_loop.add_callback.call_args[0], ++ self.batch.event.io_loop.spawn_callback.call_args[0], + (self.batch.find_job, {'foo'}) + ) + +@@ -347,4 +356,4 @@ class AsyncBatchTestCase(AsyncTestCase, TestCase): + self.batch.event = MagicMock() + self.batch.scheduled = True + self.batch.schedule_next() +- self.assertEqual(len(self.batch.event.io_loop.call_later.mock_calls), 0) ++ self.assertEqual(len(self.batch.event.io_loop.spawn_callback.mock_calls), 0) +-- +2.22.0 + + diff --git a/prevent-systemd-run-description-issue-when-running-a.patch b/prevent-systemd-run-description-issue-when-running-a.patch new file mode 100644 index 0000000..9f14025 --- /dev/null +++ b/prevent-systemd-run-description-issue-when-running-a.patch @@ -0,0 +1,42 @@ +From 44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Mon, 30 Sep 2019 12:06:08 +0100 +Subject: [PATCH] Prevent systemd-run description issue when running + aptpkg (bsc#1152366) + +--- + salt/modules/aptpkg.py | 2 +- + tests/unit/modules/test_aptpkg.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py +index d49a48310e..a11bb51c16 100644 +--- a/salt/modules/aptpkg.py ++++ b/salt/modules/aptpkg.py +@@ -165,7 +165,7 @@ def _call_apt(args, scope=True, **kwargs): + ''' + cmd = [] + if scope and salt.utils.systemd.has_scope(__context__) and __salt__['config.get']('systemd.scope', True): +- cmd.extend(['systemd-run', '--scope', '--description "{0}"'.format(__name__)]) ++ cmd.extend(['systemd-run', '--scope', '--description', '"{0}"'.format(__name__)]) + cmd.extend(args) + + params = {'output_loglevel': 'trace', +diff --git a/tests/unit/modules/test_aptpkg.py b/tests/unit/modules/test_aptpkg.py +index 06f3a9f6aa..85360da181 100644 +--- a/tests/unit/modules/test_aptpkg.py ++++ b/tests/unit/modules/test_aptpkg.py +@@ -544,7 +544,7 @@ class AptUtilsTestCase(TestCase, LoaderModuleMockMixin): + with patch.dict(aptpkg.__salt__, {'cmd.run_all': MagicMock(), 'config.get': MagicMock(return_value=True)}): + aptpkg._call_apt(['apt-get', 'purge', 'vim']) # pylint: disable=W0106 + aptpkg.__salt__['cmd.run_all'].assert_called_once_with( +- ['systemd-run', '--scope', '--description "salt.modules.aptpkg"', 'apt-get', 'purge', 'vim'], env={}, ++ ['systemd-run', '--scope', '--description', '"salt.modules.aptpkg"', 'apt-get', 'purge', 'vim'], env={}, + output_loglevel='trace', python_shell=False) + + def test_call_apt_with_kwargs(self): +-- +2.22.0 + + diff --git a/salt.changes b/salt.changes index 2c9018b..665fee1 100644 --- a/salt.changes +++ b/salt.changes @@ -1,3 +1,48 @@ +------------------------------------------------------------------- +Wed Oct 9 12:40:33 UTC 2019 - Pablo Suárez Hernández + +- Add missing 'fun' on events coming from salt-ssh wfunc executions (bsc#1151947) + +- Added: + * add-missing-fun-for-returns-from-wfunc-executions.patch + +------------------------------------------------------------------- +Fri Oct 4 14:35:10 UTC 2019 - Pablo Suárez Hernández + +- Fix failing unit tests for batch async + +- Added: + * fix-failing-unit-tests-for-batch-async.patch + +------------------------------------------------------------------- +Thu Oct 3 14:50:41 UTC 2019 - Pablo Suárez Hernández + +- Fix memory consumption problem on BatchAsync (bsc#1137642) + +- Added: + * use-current-ioloop-for-the-localclient-instance-of-b.patch + +------------------------------------------------------------------- +Tue Oct 1 13:17:58 UTC 2019 - Pablo Suárez Hernández + +- Fix dependencies for RHEL 8 + +------------------------------------------------------------------- +Mon Sep 30 11:15:32 UTC 2019 - Pablo Suárez Hernández + +- Prevent systemd-run description issue when running aptpkg (bsc#1152366) + +- Added: + * prevent-systemd-run-description-issue-when-running-a.patch + +------------------------------------------------------------------- +Thu Sep 26 15:17:59 UTC 2019 - Pablo Suárez Hernández + +- Take checksums arg into account for postgres.datadir_init (bsc#1151650) + +- Added: + * take-checksums-arg-into-account-for-postgres.datadir.patch + ------------------------------------------------------------------- Thu Sep 26 10:23:39 UTC 2019 - Pablo Suárez Hernández diff --git a/salt.spec b/salt.spec index 7935a33..fd87409 100644 --- a/salt.spec +++ b/salt.spec @@ -14,6 +14,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # +%global debug_package %{nil} %if 0%{?suse_version} >= 1320 # SLE15 @@ -243,8 +244,18 @@ Patch82: virt.volume_infos-silence-libvirt-error-message-175.patch Patch83: fix-virt.full_info-176.patch # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/002543df392f65d95dbc127dc058ac897f2035ed Patch84: improve-batch_async-to-release-consumed-memory-bsc-1.patch +# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54770 +Patch85: take-checksums-arg-into-account-for-postgres.datadir.patch +# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077 +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 +Patch86: prevent-systemd-run-description-issue-when-running-a.patch +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/55d8a777d6a9b19c959e14a4060e5579e92cd106 +Patch87: use-current-ioloop-for-the-localclient-instance-of-b.patch +# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/8378bb24a5a53973e8dba7658b8b3465d967329f +Patch88: fix-failing-unit-tests-for-batch-async.patch +# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54935 +Patch89: add-missing-fun-for-returns-from-wfunc-executions.patch -# BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: logrotate %if 0%{?suse_version} > 1020 @@ -424,12 +435,18 @@ BuildRequires: python3-devel # requirements/base.txt %if 0%{?rhel} BuildRequires: python3-jinja2 +BuildRequires: python3-markupsafe +BuildRequires: python3-msgpack > 0.3 +BuildRequires: python3-zmq >= 2.2.0 +BuildRequires: python3-m2crypto %else BuildRequires: python3-Jinja2 -%endif BuildRequires: python3-MarkupSafe -BuildRequires: python3-PyYAML BuildRequires: python3-msgpack-python > 0.3 +BuildRequires: python3-pyzmq >= 2.2.0 +BuildRequires: python3-pycrypto >= 2.6.1 +%endif +BuildRequires: python3-PyYAML BuildRequires: python3-psutil BuildRequires: python3-requests >= 1.0.0 BuildRequires: python3-tornado >= 4.2.1 @@ -437,8 +454,6 @@ BuildRequires: python3-tornado >= 4.2.1 BuildConflicts: python3-tornado >= 5 # requirements/zeromq.txt -BuildRequires: python3-pycrypto >= 2.6.1 -BuildRequires: python3-pyzmq >= 2.2.0 %if %{with test} # requirements/dev_python27.txt BuildRequires: python3-boto >= 2.32.1 @@ -461,15 +476,24 @@ Requires: python3-certifi %if 0%{?rhel} Requires: python3-jinja2 Requires: yum +Requires: python3-markupsafe +Requires: python3-msgpack > 0.3 +Requires: python3-m2crypto +Requires: python3-zmq >= 2.2.0 +%if 0%{?rhel} == 8 +Requires: dnf +%endif %if 0%{?rhel} == 6 Requires: yum-plugin-security %endif %else Requires: python3-Jinja2 -%endif Requires: python3-MarkupSafe -Requires: python3-PyYAML Requires: python3-msgpack-python > 0.3 +Requires: python3-pycrypto >= 2.6.1 +Requires: python3-pyzmq >= 2.2.0 +%endif +Requires: python3-PyYAML Requires: python3-psutil Requires: python3-requests >= 1.0.0 Requires: python3-tornado >= 4.2.1 @@ -486,8 +510,6 @@ Suggests: python3-timelib Suggests: python3-gnupg # requirements/zeromq.txt %endif -Requires: python3-pycrypto >= 2.6.1 -Requires: python3-pyzmq >= 2.2.0 # %if 0%{?suse_version} # python-xml is part of python-base in all rhel versions @@ -805,6 +827,11 @@ cp %{S:5} ./.travis.yml %patch82 -p1 %patch83 -p1 %patch84 -p1 +%patch85 -p1 +%patch86 -p1 +%patch87 -p1 +%patch88 -p1 +%patch89 -p1 %build %if 0%{?build_py2} @@ -1311,10 +1338,12 @@ fi %endif %endif +%if 0%{?build_py2} %posttrans -n python2-salt # force re-generate a new thin.tgz rm -f %{_localstatedir}/cache/salt/master/thin/version rm -f %{_localstatedir}/cache/salt/minion/thin/version +%endif %if 0%{?build_py3} %posttrans -n python3-salt @@ -1345,10 +1374,8 @@ rm -f %{_localstatedir}/cache/salt/minion/thin/version %config(noreplace) %attr(0640, root, salt) %{_sysconfdir}/salt/cloud.providers %dir %attr(0750, root, salt) %{_localstatedir}/cache/salt/cloud %if 0%{?default_py3} -%{python3_sitelib}/salt/cloud/deploy/bootstrap-salt.sh %attr(755,root,root)%{python3_sitelib}/salt/cloud/deploy/bootstrap-salt.sh %else -%{python_sitelib}/salt/cloud/deploy/bootstrap-salt.sh %attr(755,root,root)%{python_sitelib}/salt/cloud/deploy/bootstrap-salt.sh %endif %{_mandir}/man1/salt-cloud.1.* @@ -1378,7 +1405,6 @@ rm -f %{_localstatedir}/cache/salt/minion/thin/version %dir %attr(0750, root, root) %{_sysconfdir}/salt/minion.d/ %dir %attr(0750, root, root) %{_sysconfdir}/salt/pki/minion/ %dir %attr(0750, root, root) %{_localstatedir}/cache/salt/minion/ -#%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt/minion %{_sbindir}/rcsalt-minion # Install plugin only on SUSE machines @@ -1450,7 +1476,6 @@ rm -f %{_localstatedir}/cache/salt/minion/thin/version %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/roots/ %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/syndics/ %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/tokens/ -#%dir %ghost %attr(0750, salt, salt) %{_localstatedir}/run/salt/master/ %files %defattr(-,root,root,-) @@ -1473,7 +1498,6 @@ rm -f %{_localstatedir}/cache/salt/minion/thin/version %dir %attr(0750, root, salt) %{_sysconfdir}/salt/pki %dir %attr(0750, salt, salt) %{_localstatedir}/log/salt %dir %attr(0750, root, salt) %{_localstatedir}/cache/salt -#%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt %dir %attr(0750, root, salt) /srv/spm %if %{with systemd} /usr/lib/tmpfiles.d/salt.conf diff --git a/take-checksums-arg-into-account-for-postgres.datadir.patch b/take-checksums-arg-into-account-for-postgres.datadir.patch new file mode 100644 index 0000000..79d6cd6 --- /dev/null +++ b/take-checksums-arg-into-account-for-postgres.datadir.patch @@ -0,0 +1,41 @@ +From 7ed3e99a4979a13c7142ed5ba73c09a282e03147 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Thu, 26 Sep 2019 15:57:58 +0100 +Subject: [PATCH] Take checksums arg into account for + postgres.datadir_init (bsc#1151650) + +Update unit test for postgres.datadir_init +--- + salt/modules/postgres.py | 1 + + tests/unit/modules/test_postgres.py | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/salt/modules/postgres.py b/salt/modules/postgres.py +index b6f7cbe5d4..f0d1b034b9 100644 +--- a/salt/modules/postgres.py ++++ b/salt/modules/postgres.py +@@ -3151,6 +3151,7 @@ def datadir_init(name, + password=password, + encoding=encoding, + locale=locale, ++ checksums=checksums, + runas=runas) + return ret['retcode'] == 0 + +diff --git a/tests/unit/modules/test_postgres.py b/tests/unit/modules/test_postgres.py +index 03fb7fddfd..6f10fcf2e0 100644 +--- a/tests/unit/modules/test_postgres.py ++++ b/tests/unit/modules/test_postgres.py +@@ -1467,6 +1467,7 @@ class PostgresTestCase(TestCase, LoaderModuleMockMixin): + locale=None, + password='test', + runas='postgres', ++ checksums=False, + user='postgres', + ) + self.assertTrue(ret) +-- +2.22.0 + + diff --git a/use-current-ioloop-for-the-localclient-instance-of-b.patch b/use-current-ioloop-for-the-localclient-instance-of-b.patch new file mode 100644 index 0000000..945ff8b --- /dev/null +++ b/use-current-ioloop-for-the-localclient-instance-of-b.patch @@ -0,0 +1,36 @@ +From 55d8a777d6a9b19c959e14a4060e5579e92cd106 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Thu, 3 Oct 2019 15:19:02 +0100 +Subject: [PATCH] Use current IOLoop for the LocalClient instance of + BatchAsync (bsc#1137642) + +--- + salt/cli/batch_async.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py +index 2bb50459c8..f9e736f804 100644 +--- a/salt/cli/batch_async.py ++++ b/salt/cli/batch_async.py +@@ -52,7 +52,7 @@ class BatchAsync(object): + ''' + def __init__(self, parent_opts, jid_gen, clear_load): + ioloop = tornado.ioloop.IOLoop.current() +- self.local = salt.client.get_local_client(parent_opts['conf_file']) ++ self.local = salt.client.get_local_client(parent_opts['conf_file'], io_loop=ioloop) + if 'gather_job_timeout' in clear_load['kwargs']: + clear_load['gather_job_timeout'] = clear_load['kwargs'].pop('gather_job_timeout') + else: +@@ -266,6 +266,7 @@ class BatchAsync(object): + yield + + def __del__(self): ++ self.local = None + self.event = None + self.ioloop = None + gc.collect() +-- +2.22.0 + +