Accepting request 753172 from systemsmanagement:saltstack

- Prevent test_mod_del_repo_multiline_values to fail
- Read repo info without using interpolation (bsc#1135656)
- Requires vs BuildRequires
- Limiting M2Crypto to >= SLE15
- Replacing pycrypto with M2Crypto
- Fix for log checking in x509 test
- Update to 2019.2.2 release
- Added:
  * fix-for-log-checking-in-x509-test.patch
  * prevent-test_mod_del_repo_multiline_values-to-fail.patch
  * read-repo-info-without-using-interpolation-bsc-11356.patch
- Modified:
  * async-batch-implementation.patch
  * add-hold-unhold-functions.patch
  * adds-the-possibility-to-also-use-downloadonly-in-kwa.patch
  * decide-if-the-source-should-be-actually-skipped.patch
  * allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch
  * add-batch_presence_ping_timeout-and-batch_presence_p.patch
  * run-salt-master-as-dedicated-salt-user.patch
  * run-salt-api-as-user-salt-bsc-1064520.patch
  * fix-unit-test-for-grains-core.patch
  * add-environment-variable-to-know-if-yum-is-invoked-f.patch
  * fix-async-batch-multiple-done-events.patch
  * activate-all-beacons-sources-config-pillar-grains.patch
  * fix-for-older-mock-module.patch
  * do-not-break-repo-files-with-multiple-line-values-on.patch
  * fall-back-to-pymysql.patch
  * add-missing-fun-for-returns-from-wfunc-executions.patch
  * loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch
  * add-virt.volume_infos-and-virt.volume_delete.patch

OBS-URL: https://build.opensuse.org/request/show/753172
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/salt?expand=0&rev=96
This commit is contained in:
Dominique Leuenberger 2019-12-07 14:16:15 +00:00 committed by Git OBS Bridge
commit 78c7bb39ac
105 changed files with 876 additions and 1743 deletions

View File

@ -1,4 +1,4 @@
From 3119bc27584472b0f0d440a37ec4cff2504165f2 Mon Sep 17 00:00:00 2001 From c9e39c7af97180414205a8ad752f86f579e75a58 Mon Sep 17 00:00:00 2001
From: Cedric Bosdonnat <cbosdonnat@suse.com> From: Cedric Bosdonnat <cbosdonnat@suse.com>
Date: Tue, 3 Sep 2019 15:16:30 +0200 Date: Tue, 3 Sep 2019 15:16:30 +0200
Subject: [PATCH] 2019.2.0 PR 54196 backport (#173) Subject: [PATCH] 2019.2.0 PR 54196 backport (#173)
@ -219,6 +219,6 @@ index 8022989937..2904fa224d 100644
'virt.pool_start': mocks['start'] 'virt.pool_start': mocks['start']
}): }):
-- --
2.20.1 2.16.4

View File

@ -1 +1 @@
84e27c403e61c28793ecffea4e280b3cdbb365a0 8ec046fadeba7bd58a5bf2a3f561c4bffd6c4510

View File

@ -3,7 +3,7 @@
<param name="url">https://github.com/openSUSE/salt-packaging.git</param> <param name="url">https://github.com/openSUSE/salt-packaging.git</param>
<param name="subdir">salt</param> <param name="subdir">salt</param>
<param name="filename">package</param> <param name="filename">package</param>
<param name="revision">2019.2.0</param> <param name="revision">2019.2.2</param>
<param name="scm">git</param> <param name="scm">git</param>
</service> </service>
<service name="extract_file" mode="disabled"> <service name="extract_file" mode="disabled">
@ -12,8 +12,9 @@
</service> </service>
<service name="download_url" mode="disabled"> <service name="download_url" mode="disabled">
<param name="host">codeload.github.com</param> <param name="host">codeload.github.com</param>
<param name="path">openSUSE/salt/tar.gz/v2019.2.0-suse</param> <param name="path">openSUSE/salt/tar.gz/v2019.2.2-suse</param>
<param name="filename">v2019.2.0.tar.gz</param> <param name="filename">v2019.2.2.tar.gz</param>
</service> </service>
<service name="update_changelog" mode="disabled"></service> <service name="update_changelog" mode="disabled"></service>
</services> </services>

View File

@ -1,4 +1,4 @@
From 46a60d81604eaf6f9fc3712e02d1066e959c96e3 Mon Sep 17 00:00:00 2001 From bfaac404ffa334157f4408b312b12a59b059df69 Mon Sep 17 00:00:00 2001
From: Alberto Planas <aplanas@gmail.com> From: Alberto Planas <aplanas@gmail.com>
Date: Tue, 22 Oct 2019 11:02:33 +0200 Date: Tue, 22 Oct 2019 11:02:33 +0200
Subject: [PATCH] Accumulated changes from Yomi (#167) Subject: [PATCH] Accumulated changes from Yomi (#167)
@ -17,17 +17,17 @@ This patch ignore this kind of issue during the grains creation.
(cherry picked from commit b865491b74679140f7a71c5ba50d482db47b600f) (cherry picked from commit b865491b74679140f7a71c5ba50d482db47b600f)
--- ---
salt/grains/core.py | 4 +++ salt/grains/core.py | 4 ++++
salt/modules/zypperpkg.py | 30 +++++++++++++------ salt/modules/zypperpkg.py | 30 ++++++++++++++++--------
tests/unit/grains/test_core.py | 45 ++++++++++++++++++++++++++++ tests/unit/grains/test_core.py | 45 ++++++++++++++++++++++++++++++++++++
tests/unit/modules/test_zypperpkg.py | 26 ++++++++++++++++ tests/unit/modules/test_zypperpkg.py | 26 +++++++++++++++++++++
4 files changed, 96 insertions(+), 9 deletions(-) 4 files changed, 96 insertions(+), 9 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index fa188a6ff7..fdabe484a8 100644 index e1d08b76cf..6b1f2d2223 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -986,6 +986,10 @@ def _virtual(osdata): @@ -987,6 +987,10 @@ def _virtual(osdata):
grains['virtual'] = 'gce' grains['virtual'] = 'gce'
elif 'BHYVE' in output: elif 'BHYVE' in output:
grains['virtual'] = 'bhyve' grains['virtual'] = 'bhyve'
@ -88,10 +88,10 @@ index da1953b2a5..a87041aa70 100644
'install_date_time_t': None, 'install_date_time_t': None,
}] }]
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index 889fb90074..aa04a7a7ac 100644 index 09e197a2e4..7153a078f4 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -1117,6 +1117,51 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -1317,6 +1317,51 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
'uuid': '' 'uuid': ''
}) })
@ -181,6 +181,6 @@ index 695d982ca6..7617113401 100644
''' '''
Test package removal Test package removal
-- --
2.23.0 2.16.4

View File

@ -1,4 +1,4 @@
From 8cd87eba73df54a9ede47eda9425e6ffceff7ac0 Mon Sep 17 00:00:00 2001 From 78f5d1bd931f5329792d0e430c75025b45c14041 Mon Sep 17 00:00:00 2001
From: Alberto Planas <aplanas@gmail.com> From: Alberto Planas <aplanas@gmail.com>
Date: Tue, 30 Jul 2019 11:23:12 +0200 Date: Tue, 30 Jul 2019 11:23:12 +0200
Subject: [PATCH] Accumulated changes required for Yomi (#165) Subject: [PATCH] Accumulated changes required for Yomi (#165)
@ -58,14 +58,14 @@ so the cached data will be separated too.
(cherry picked from commit 9c54bb3e8c93ba21fc583bdefbcadbe53cbcd7b5) (cherry picked from commit 9c54bb3e8c93ba21fc583bdefbcadbe53cbcd7b5)
--- ---
salt/modules/chroot.py | 36 +++++++++------- salt/modules/chroot.py | 36 +++++++++++----------
salt/modules/cmdmod.py | 12 ++++-- salt/modules/cmdmod.py | 12 +++++--
salt/modules/freezer.py | 20 ++++++--- salt/modules/freezer.py | 20 ++++++++----
salt/modules/zypperpkg.py | 13 ++++-- salt/modules/zypperpkg.py | 13 ++++++--
tests/unit/modules/test_chroot.py | 36 +++++++++++++++- tests/unit/modules/test_chroot.py | 36 +++++++++++++++++++--
tests/unit/modules/test_cmdmod.py | 50 ++++++++++++++++++++++ tests/unit/modules/test_cmdmod.py | 50 +++++++++++++++++++++++++++++
tests/unit/modules/test_freezer.py | 62 +++++++++++++++++++++++++--- tests/unit/modules/test_freezer.py | 62 ++++++++++++++++++++++++++++++++----
tests/unit/modules/test_zypperpkg.py | 21 ++++++++++ tests/unit/modules/test_zypperpkg.py | 21 ++++++++++++
8 files changed, 214 insertions(+), 36 deletions(-) 8 files changed, 214 insertions(+), 36 deletions(-)
diff --git a/salt/modules/chroot.py b/salt/modules/chroot.py diff --git a/salt/modules/chroot.py b/salt/modules/chroot.py
@ -181,10 +181,10 @@ index 6e4705b67e..17b5890d8c 100644
raise CommandExecutionError(ret['stderr']) raise CommandExecutionError(ret['stderr'])
diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py
index d0819f2f79..b279d00a11 100644 index 1801147f57..a7e1553ec3 100644
--- a/salt/modules/cmdmod.py --- a/salt/modules/cmdmod.py
+++ b/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py
@@ -3064,13 +3064,19 @@ def run_chroot(root, @@ -3079,13 +3079,19 @@ def run_chroot(root,
if isinstance(cmd, (list, tuple)): if isinstance(cmd, (list, tuple)):
cmd = ' '.join([six.text_type(i) for i in cmd]) cmd = ' '.join([six.text_type(i) for i in cmd])
@ -575,6 +575,6 @@ index 0a3053680f..695d982ca6 100644
+ zypper._clean_cache() + zypper._clean_cache()
+ self.assertEqual(zypper.__context__, {'pkg.other_data': None}) + self.assertEqual(zypper.__context__, {'pkg.other_data': None})
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From 5b48dee2f1b9a8203490e97620581b3a04d42632 Mon Sep 17 00:00:00 2001 From 45b3ee6c8255c2daa6ed291a430a6325155ef29c Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 17 Oct 2017 16:52:33 +0200 Date: Tue, 17 Oct 2017 16:52:33 +0200
Subject: [PATCH] Activate all beacons sources: config/pillar/grains Subject: [PATCH] Activate all beacons sources: config/pillar/grains
@ -8,10 +8,10 @@ Subject: [PATCH] Activate all beacons sources: config/pillar/grains
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/minion.py b/salt/minion.py diff --git a/salt/minion.py b/salt/minion.py
index 9468695880..0a6771dccd 100644 index 6912d9587f..c5f637eaa6 100644
--- a/salt/minion.py --- a/salt/minion.py
+++ b/salt/minion.py +++ b/salt/minion.py
@@ -439,7 +439,7 @@ class MinionBase(object): @@ -484,7 +484,7 @@ class MinionBase(object):
the pillar or grains changed the pillar or grains changed
''' '''
if 'config.merge' in functions: if 'config.merge' in functions:
@ -21,6 +21,6 @@ index 9468695880..0a6771dccd 100644
return self.beacons.process(b_conf, self.opts['grains']) # pylint: disable=no-member return self.beacons.process(b_conf, self.opts['grains']) # pylint: disable=no-member
return [] return []
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From c059d617a77184c3bec8159d5197355f3cab8c4e Mon Sep 17 00:00:00 2001 From 56c38610b083997cebf00070efe781d114fc33b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 14 May 2018 11:33:13 +0100 Date: Mon, 14 May 2018 11:33:13 +0100
@ -62,6 +62,6 @@ index 0aca1e0af8..2034262b23 100644
cver = new_pkgs.get(pkgname) cver = new_pkgs.get(pkgname)
if not cver and pkgname in new_caps: if not cver and pkgname in new_caps:
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 902a3527415807448be0aa28a651374a189d102c Mon Sep 17 00:00:00 2001 From 669a03b26870a7109c3f4b327dd2b5a4ec4fa1ba Mon Sep 17 00:00:00 2001
From: Marcelo Chiaradia <mchiaradia@suse.com> From: Marcelo Chiaradia <mchiaradia@suse.com>
Date: Thu, 4 Apr 2019 13:57:38 +0200 Date: Thu, 4 Apr 2019 13:57:38 +0200
Subject: [PATCH] Add 'batch_presence_ping_timeout' and Subject: [PATCH] Add 'batch_presence_ping_timeout' and
@ -9,7 +9,7 @@ Subject: [PATCH] Add 'batch_presence_ping_timeout' and
1 file changed, 5 insertions(+), 2 deletions(-) 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/salt/cli/batch.py b/salt/cli/batch.py diff --git a/salt/cli/batch.py b/salt/cli/batch.py
index 4bd07f584a..ce239215cb 100644 index 36e66da1af..67f03c8a45 100644
--- a/salt/cli/batch.py --- a/salt/cli/batch.py
+++ b/salt/cli/batch.py +++ b/salt/cli/batch.py
@@ -83,6 +83,9 @@ def batch_get_opts( @@ -83,6 +83,9 @@ def batch_get_opts(
@ -41,6 +41,6 @@ index 4bd07f584a..ce239215cb 100644
# Broadcast to targets # Broadcast to targets
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From c2c002a2b8f106388fda3c1abaf518f2d47ce1cf Mon Sep 17 00:00:00 2001 From 2c4676963dfb4646ae0d2ad8aedba0aa83d266e9 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 9 Oct 2018 14:08:50 +0200 Date: Tue, 9 Oct 2018 14:08:50 +0200
Subject: [PATCH] Add CPE_NAME for osversion* grain parsing (U#49946) Subject: [PATCH] Add CPE_NAME for osversion* grain parsing (U#49946)
@ -29,10 +29,10 @@ Fix proper part name in the string-bound CPE
1 file changed, 28 insertions(+) 1 file changed, 28 insertions(+)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index 29e8371c2b..d688b6c757 100644 index cd7ee39d2f..f59eeb5780 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -1571,6 +1571,34 @@ def _parse_cpe_name(cpe): @@ -1623,6 +1623,34 @@ def _parse_cpe_name(cpe):
return ret return ret
@ -68,6 +68,6 @@ index 29e8371c2b..d688b6c757 100644
''' '''
Return grains pertaining to the operating system Return grains pertaining to the operating system
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From b02aee33a3aa1676cbfdf3a0ed936eef8a40adfe Mon Sep 17 00:00:00 2001 From a96d99e4bf7a43c99037aee6b6e030cdc46ab542 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Thu, 21 Jun 2018 11:57:57 +0100 Date: Thu, 21 Jun 2018 11:57:57 +0100
@ -24,6 +24,6 @@ index fff70e9f5b..4fb58674bf 100644
+ '__suse_reserved_pkg_patches_support': True + '__suse_reserved_pkg_patches_support': True
+ } + }
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From d9d459f62d53acddd67313d9d66e1fe8caf4fd45 Mon Sep 17 00:00:00 2001 From 960c7f29239a23c3d46c31692d2e881735f4d2a7 Mon Sep 17 00:00:00 2001
From: Marcelo Chiaradia <mchiaradia@suse.com> From: Marcelo Chiaradia <mchiaradia@suse.com>
Date: Thu, 7 Jun 2018 10:29:41 +0200 Date: Thu, 7 Jun 2018 10:29:41 +0200
Subject: [PATCH] Add environment variable to know if yum is invoked from Subject: [PATCH] Add environment variable to know if yum is invoked from
@ -73,6 +73,6 @@ index c250b94f0e..a56a2e8366 100644
for line in salt.utils.itertools.split(ret, os.linesep): for line in salt.utils.itertools.split(ret, os.linesep):
inst, advisory_id, sev, pkg = re.match(r'([i|\s]) ([^\s]+) +([^\s]+) +([^\s]+)', inst, advisory_id, sev, pkg = re.match(r'([i|\s]) ([^\s]+) +([^\s]+) +([^\s]+)',
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 4219d3d69799bc20f88eed0a02ef15c932e6782e Mon Sep 17 00:00:00 2001 From 1a98027d94dc7491182a16eef2e6134c2d8423b6 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Thu, 6 Dec 2018 16:26:23 +0100 Date: Thu, 6 Dec 2018 16:26:23 +0100
Subject: [PATCH] Add hold/unhold functions Subject: [PATCH] Add hold/unhold functions
@ -7,7 +7,7 @@ Add unhold function
Add warnings Add warnings
--- ---
salt/modules/zypperpkg.py | 88 ++++++++++++++++++++++++++++++++++++++- salt/modules/zypperpkg.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 87 insertions(+), 1 deletion(-) 1 file changed, 87 insertions(+), 1 deletion(-)
diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py
@ -139,6 +139,6 @@ index 001b852fc4..0c26e2214c 100644
added = [] added = []
try: try:
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From fa957bcb842a29a340a980a03cd8e54b06e7e21b Mon Sep 17 00:00:00 2001 From 3ae0b949dacc7ac597dc94a5141d2f4c23d6efc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Wed, 9 Oct 2019 13:03:33 +0100 Date: Wed, 9 Oct 2019 13:03:33 +0100
@ -31,6 +31,6 @@ index 1453430e73..0df918d634 100644
self.event.fire_event( self.event.fire_event(
data, data,
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From 671bb9d48e120c806ca1f6f176b0ada43b1e7594 Mon Sep 17 00:00:00 2001 From ddc5439536e8d7a0b2fca1fcb9db0b18ed961d54 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 12 Oct 2018 16:20:40 +0200 Date: Fri, 12 Oct 2018 16:20:40 +0200
Subject: [PATCH] Add multi-file support and globbing to the filetree Subject: [PATCH] Add multi-file support and globbing to the filetree
@ -12,8 +12,8 @@ Collect system logs and boot logs
Support globbing in filetree Support globbing in filetree
--- ---
salt/cli/support/intfunc.py | 49 ++++++++++++++++----------- salt/cli/support/intfunc.py | 49 +++++++++++++++++++++--------------
salt/cli/support/profiles/default.yml | 7 ++++ salt/cli/support/profiles/default.yml | 7 +++++
2 files changed, 37 insertions(+), 19 deletions(-) 2 files changed, 37 insertions(+), 19 deletions(-)
diff --git a/salt/cli/support/intfunc.py b/salt/cli/support/intfunc.py diff --git a/salt/cli/support/intfunc.py b/salt/cli/support/intfunc.py
@ -111,6 +111,6 @@ index 01d9a26193..3defb5eef3 100644
+ - /var/log/messages + - /var/log/messages
-- --
2.19.0 2.16.4

View File

@ -1,4 +1,4 @@
From aa9df9a08aa2a761cd91d91376a6a7dfa820c48f Mon Sep 17 00:00:00 2001 From 27e882ff23e24ec26339503e727e5dec0507b55f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Fri, 24 May 2019 16:27:07 +0100 Date: Fri, 24 May 2019 16:27:07 +0100
@ -22,6 +22,6 @@ index 828b0cecda..cb85eb99fe 100644
ARCHES_SPARC = ( ARCHES_SPARC = (
'sparc', 'sparcv8', 'sparcv9', 'sparcv9v', 'sparc64', 'sparc64v' 'sparc', 'sparcv8', 'sparcv9', 'sparcv9v', 'sparc64', 'sparc64v'
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 18c46c301b98841d941e2d07901e7468de30b83a Mon Sep 17 00:00:00 2001 From ee67c569786f5381fa0fb34c64f6796ecef5b21f Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Mon, 12 Mar 2018 12:01:39 +0100 Date: Mon, 12 Mar 2018 12:01:39 +0100
Subject: [PATCH] Add SaltSSH multi-version support across Python Subject: [PATCH] Add SaltSSH multi-version support across Python
@ -254,7 +254,7 @@ Lintfix
Set master_top_first to False by default Set master_top_first to False by default
--- ---
doc/topics/releases/fluorine.rst | 178 +++++++++++++++++++++++++++++++ doc/topics/releases/fluorine.rst | 178 +++++++++++++++++++++++++++++++++++++++
salt/client/ssh/ssh_py_shim.py | 4 + salt/client/ssh/ssh_py_shim.py | 4 +
salt/utils/thin.py | 1 + salt/utils/thin.py | 1 +
3 files changed, 183 insertions(+) 3 files changed, 183 insertions(+)
@ -445,10 +445,10 @@ index 0000000000..40c69e25cc
+Salt version is also available on the Master machine, although does not need to be directly +Salt version is also available on the Master machine, although does not need to be directly
+installed together with the older Python interpreter. +installed together with the older Python interpreter.
diff --git a/salt/client/ssh/ssh_py_shim.py b/salt/client/ssh/ssh_py_shim.py diff --git a/salt/client/ssh/ssh_py_shim.py b/salt/client/ssh/ssh_py_shim.py
index be17a1a38c..595d1c40c7 100644 index cd7549a178..95b3931a32 100644
--- a/salt/client/ssh/ssh_py_shim.py --- a/salt/client/ssh/ssh_py_shim.py
+++ b/salt/client/ssh/ssh_py_shim.py +++ b/salt/client/ssh/ssh_py_shim.py
@@ -164,6 +164,9 @@ def unpack_thin(thin_path): @@ -165,6 +165,9 @@ def unpack_thin(thin_path):
old_umask = os.umask(0o077) # pylint: disable=blacklisted-function old_umask = os.umask(0o077) # pylint: disable=blacklisted-function
tfile.extractall(path=OPTIONS.saltdir) tfile.extractall(path=OPTIONS.saltdir)
tfile.close() tfile.close()
@ -458,7 +458,7 @@ index be17a1a38c..595d1c40c7 100644
os.umask(old_umask) # pylint: disable=blacklisted-function os.umask(old_umask) # pylint: disable=blacklisted-function
try: try:
os.unlink(thin_path) os.unlink(thin_path)
@@ -357,5 +360,6 @@ def main(argv): # pylint: disable=W0613 @@ -358,5 +361,6 @@ def main(argv): # pylint: disable=W0613
return retcode return retcode
@ -466,7 +466,7 @@ index be17a1a38c..595d1c40c7 100644
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main(sys.argv)) sys.exit(main(sys.argv))
diff --git a/salt/utils/thin.py b/salt/utils/thin.py diff --git a/salt/utils/thin.py b/salt/utils/thin.py
index b60815225e..172b0938f5 100644 index 3c8ffec8af..b6fa90abae 100644
--- a/salt/utils/thin.py --- a/salt/utils/thin.py
+++ b/salt/utils/thin.py +++ b/salt/utils/thin.py
@@ -9,6 +9,7 @@ from __future__ import absolute_import, print_function, unicode_literals @@ -9,6 +9,7 @@ from __future__ import absolute_import, print_function, unicode_literals
@ -478,6 +478,6 @@ index b60815225e..172b0938f5 100644
import subprocess import subprocess
import sys import sys
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 74160010c0fdddb04980ad664e155550382ef82b Mon Sep 17 00:00:00 2001 From d150fed197f47d17227f1801b29357ab509ebbd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Wed, 22 May 2019 13:00:46 +0100 Date: Wed, 22 May 2019 13:00:46 +0100
@ -21,6 +21,6 @@ index 0000000000..94d05fb2ee
+ - /usr/share/salt-formulas/states + - /usr/share/salt-formulas/states
+ - /srv/salt + - /srv/salt
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 2bb024d871acaf5726eeb6e89fb83785605b4c83 Mon Sep 17 00:00:00 2001 From 4bf9567fd28470085ee501e5e17c75a932b5dde5 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 19 Oct 2018 15:44:47 +0200 Date: Fri, 19 Oct 2018 15:44:47 +0200
Subject: [PATCH] Add supportconfig module for remote calls and SaltSSH Subject: [PATCH] Add supportconfig module for remote calls and SaltSSH
@ -198,13 +198,13 @@ Check last function by full name
salt/cli/support/__init__.py | 2 +- salt/cli/support/__init__.py | 2 +-
salt/cli/support/collector.py | 12 +- salt/cli/support/collector.py | 12 +-
salt/loader.py | 6 +- salt/loader.py | 6 +-
salt/modules/saltsupport.py | 381 ++++++++++++++++++++++++ salt/modules/saltsupport.py | 381 +++++++++++++++++++++++++++++++
salt/state.py | 34 ++- salt/state.py | 34 ++-
salt/states/saltsupport.py | 206 +++++++++++++ salt/states/saltsupport.py | 206 +++++++++++++++++
salt/utils/args.py | 4 +- salt/utils/args.py | 6 +-
salt/utils/decorators/__init__.py | 24 ++ salt/utils/decorators/__init__.py | 24 ++
tests/unit/modules/test_saltsupport.py | 394 +++++++++++++++++++++++++ tests/unit/modules/test_saltsupport.py | 394 +++++++++++++++++++++++++++++++++
9 files changed, 1044 insertions(+), 19 deletions(-) 9 files changed, 1044 insertions(+), 21 deletions(-)
create mode 100644 salt/modules/saltsupport.py create mode 100644 salt/modules/saltsupport.py
create mode 100644 salt/states/saltsupport.py create mode 100644 salt/states/saltsupport.py
create mode 100644 tests/unit/modules/test_saltsupport.py create mode 100644 tests/unit/modules/test_saltsupport.py
@ -267,10 +267,10 @@ index a4343297b6..cbae189aea 100644
archive_path = self.collector.archive_path archive_path = self.collector.archive_path
diff --git a/salt/loader.py b/salt/loader.py diff --git a/salt/loader.py b/salt/loader.py
index ae024ccac9..094a816d11 100644 index 0cff0c72bb..d494c452ed 100644
--- a/salt/loader.py --- a/salt/loader.py
+++ b/salt/loader.py +++ b/salt/loader.py
@@ -1570,8 +1570,10 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1687,8 +1687,10 @@ class LazyLoader(salt.utils.lazy.LazyDict):
)) ))
for attr in getattr(mod, '__load__', dir(mod)): for attr in getattr(mod, '__load__', dir(mod)):
@ -671,10 +671,10 @@ index 0000000000..750b2655d6
+ +
+ return __virtualname__ + return __virtualname__
diff --git a/salt/state.py b/salt/state.py diff --git a/salt/state.py b/salt/state.py
index e7288bce2e..b4b2a00601 100644 index dfa9c6de58..c3119b6a33 100644
--- a/salt/state.py --- a/salt/state.py
+++ b/salt/state.py +++ b/salt/state.py
@@ -1315,8 +1315,9 @@ class State(object): @@ -1358,8 +1358,9 @@ class State(object):
names = [] names = []
if state.startswith('__'): if state.startswith('__'):
continue continue
@ -686,7 +686,7 @@ index e7288bce2e..b4b2a00601 100644
if orchestration_jid is not None: if orchestration_jid is not None:
chunk['__orchestration_jid__'] = orchestration_jid chunk['__orchestration_jid__'] = orchestration_jid
if '__sls__' in body: if '__sls__' in body:
@@ -1901,8 +1902,12 @@ class State(object): @@ -1929,8 +1930,12 @@ class State(object):
ret = self.call_parallel(cdata, low) ret = self.call_parallel(cdata, low)
else: else:
self.format_slots(cdata) self.format_slots(cdata)
@ -701,7 +701,7 @@ index e7288bce2e..b4b2a00601 100644
self.states.inject_globals = {} self.states.inject_globals = {}
if 'check_cmd' in low and '{0[state]}.mod_run_check_cmd'.format(low) not in self.states: if 'check_cmd' in low and '{0[state]}.mod_run_check_cmd'.format(low) not in self.states:
ret.update(self._run_check_cmd(low)) ret.update(self._run_check_cmd(low))
@@ -2729,10 +2734,31 @@ class State(object): @@ -2762,10 +2767,31 @@ class State(object):
running.update(errors) running.update(errors)
return running return running
@ -946,19 +946,21 @@ index 0000000000..f245f7f137
+ ''' + '''
+ return __virtualname__ + return __virtualname__
diff --git a/salt/utils/args.py b/salt/utils/args.py diff --git a/salt/utils/args.py b/salt/utils/args.py
index a3d8099c7f..19de7d5d39 100644 index 57dbf5861a..1f4d5d2e0f 100644
--- a/salt/utils/args.py --- a/salt/utils/args.py
+++ b/salt/utils/args.py +++ b/salt/utils/args.py
@@ -19,7 +19,7 @@ import salt.utils.data @@ -20,9 +20,7 @@ import salt.utils.data
import salt.utils.jid import salt.utils.jid
import salt.utils.versions import salt.utils.versions
import salt.utils.yaml import salt.utils.yaml
- -
-log = logging.getLogger(__name__)
-
+from salt.utils.odict import OrderedDict +from salt.utils.odict import OrderedDict
if six.PY3: if six.PY3:
KWARG_REGEX = re.compile(r'^([^\d\W][\w.-]*)=(?!=)(.*)$', re.UNICODE) KWARG_REGEX = re.compile(r'^([^\d\W][\w.-]*)=(?!=)(.*)$', re.UNICODE)
@@ -409,7 +409,7 @@ def format_call(fun, @@ -423,7 +421,7 @@ def format_call(fun,
ret = initial_ret is not None and initial_ret or {} ret = initial_ret is not None and initial_ret or {}
ret['args'] = [] ret['args'] = []
@ -968,10 +970,10 @@ index a3d8099c7f..19de7d5d39 100644
aspec = get_function_argspec(fun, is_class_method=is_class_method) aspec = get_function_argspec(fun, is_class_method=is_class_method)
diff --git a/salt/utils/decorators/__init__.py b/salt/utils/decorators/__init__.py diff --git a/salt/utils/decorators/__init__.py b/salt/utils/decorators/__init__.py
index 81d1812833..c5da5b6d4b 100644 index a6da91447a..7529013a8e 100644
--- a/salt/utils/decorators/__init__.py --- a/salt/utils/decorators/__init__.py
+++ b/salt/utils/decorators/__init__.py +++ b/salt/utils/decorators/__init__.py
@@ -596,3 +596,27 @@ def ensure_unicode_args(function): @@ -671,3 +671,27 @@ def ensure_unicode_args(function):
else: else:
return function(*args, **kwargs) return function(*args, **kwargs)
return wrapped return wrapped
@ -1400,6 +1402,6 @@ index 0000000000..7bd652a90e
+ assert out.messages[saltsupport.LogCollector.INFO] == ['00:00:00.000 - The real TTYs became ' + assert out.messages[saltsupport.LogCollector.INFO] == ['00:00:00.000 - The real TTYs became '
+ 'pseudo TTYs and vice versa'] + 'pseudo TTYs and vice versa']
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 0fd1e40e7149dd1a33f9a4497fa4e31c78ddfba7 Mon Sep 17 00:00:00 2001 From fdc0a1f4adc40d9e5b5f7164f750e4580b9cd3f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com> From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Thu, 18 Oct 2018 13:32:59 +0200 Date: Thu, 18 Oct 2018 13:32:59 +0200
Subject: [PATCH] Add virt.all_capabilities Subject: [PATCH] Add virt.all_capabilities
@ -10,15 +10,15 @@ before calling virt.domain_capabilities for each of them.
This commit embeds all this logic to get them all in a single This commit embeds all this logic to get them all in a single
virt.all_capabilities call. virt.all_capabilities call.
--- ---
salt/modules/virt.py | 107 +++++++++++++++++++++++--------- salt/modules/virt.py | 107 +++++++++++++++++++++++++++++-----------
tests/unit/modules/test_virt.py | 56 +++++++++++++++++ tests/unit/modules/test_virt.py | 56 +++++++++++++++++++++
2 files changed, 134 insertions(+), 29 deletions(-) 2 files changed, 134 insertions(+), 29 deletions(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py diff --git a/salt/modules/virt.py b/salt/modules/virt.py
index b45c5f522d..0921122a8a 100644 index 8d63b6ff4c..195da49296 100644
--- a/salt/modules/virt.py --- a/salt/modules/virt.py
+++ b/salt/modules/virt.py +++ b/salt/modules/virt.py
@@ -4094,37 +4094,10 @@ def _parse_caps_loader(node): @@ -4097,37 +4097,10 @@ def _parse_caps_loader(node):
return result return result
@ -58,7 +58,7 @@ index b45c5f522d..0921122a8a 100644
result = { result = {
'emulator': caps.find('path').text if caps.find('path') is not None else None, 'emulator': caps.find('path').text if caps.find('path') is not None else None,
'domain': caps.find('domain').text if caps.find('domain') is not None else None, 'domain': caps.find('domain').text if caps.find('domain') is not None else None,
@@ -4164,6 +4137,82 @@ def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **k @@ -4167,6 +4140,82 @@ def domain_capabilities(emulator=None, arch=None, machine=None, domain=None, **k
return result return result
@ -142,7 +142,7 @@ index b45c5f522d..0921122a8a 100644
''' '''
Return the optimal 'custom' CPU baseline config for VM's on this minion Return the optimal 'custom' CPU baseline config for VM's on this minion
diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
index 3a69adece1..bd34962a6a 100644 index 6546a0467c..36fcf0d4c0 100644
--- a/tests/unit/modules/test_virt.py --- a/tests/unit/modules/test_virt.py
+++ b/tests/unit/modules/test_virt.py +++ b/tests/unit/modules/test_virt.py
@@ -2204,6 +2204,62 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): @@ -2204,6 +2204,62 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
@ -209,6 +209,6 @@ index 3a69adece1..bd34962a6a 100644
''' '''
Test virt._get_net_xml() with VLAN tag Test virt._get_net_xml() with VLAN tag
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 5e202207d02d2bf4860cc5487ed19f9d835993d1 Mon Sep 17 00:00:00 2001 From 3bb798795f89e1af5132c6a97ddb0cf414912265 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com> From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Fri, 15 Feb 2019 17:28:00 +0100 Date: Fri, 15 Feb 2019 17:28:00 +0100
Subject: [PATCH] Add virt.volume_infos() and virt.volume_delete() Subject: [PATCH] Add virt.volume_infos() and virt.volume_delete()
@ -11,15 +11,15 @@ names of the virtual machines using the volumes of file type.
virt.volume_delete() allows removing a given volume. virt.volume_delete() allows removing a given volume.
--- ---
salt/modules/virt.py | 126 +++++++++++++++++++++ salt/modules/virt.py | 126 ++++++++++++++++++++++++++
tests/unit/modules/test_virt.py | 195 ++++++++++++++++++++++++++++++++ tests/unit/modules/test_virt.py | 195 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 321 insertions(+) 2 files changed, 321 insertions(+)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py diff --git a/salt/modules/virt.py b/salt/modules/virt.py
index 0921122a8a..17039444c4 100644 index 195da49296..9bb3636bd1 100644
--- a/salt/modules/virt.py --- a/salt/modules/virt.py
+++ b/salt/modules/virt.py +++ b/salt/modules/virt.py
@@ -4988,3 +4988,129 @@ def pool_list_volumes(name, **kwargs): @@ -4991,3 +4991,129 @@ def pool_list_volumes(name, **kwargs):
return pool.listVolumes() return pool.listVolumes()
finally: finally:
conn.close() conn.close()
@ -150,7 +150,7 @@ index 0921122a8a..17039444c4 100644
+ finally: + finally:
+ conn.close() + conn.close()
diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
index bd34962a6a..14e51e1e2a 100644 index 36fcf0d4c0..6f9eea241a 100644
--- a/tests/unit/modules/test_virt.py --- a/tests/unit/modules/test_virt.py
+++ b/tests/unit/modules/test_virt.py +++ b/tests/unit/modules/test_virt.py
@@ -2698,3 +2698,198 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin): @@ -2698,3 +2698,198 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
@ -353,6 +353,6 @@ index bd34962a6a..14e51e1e2a 100644
+ virt.volume_delete('missing', 'test_volume') + virt.volume_delete('missing', 'test_volume')
+ self.assertEqual(mock_delete.call_count, 2) + self.assertEqual(mock_delete.call_count, 2)
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From f9e7ace2f7c56a7fb4df60a048131dbd6887340b Mon Sep 17 00:00:00 2001 From 812709918226b98cccdcb388863ce68b6cf076b6 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de> From: Jochen Breuer <jbreuer@suse.de>
Date: Fri, 27 Sep 2019 11:33:47 +0200 Date: Fri, 27 Sep 2019 11:33:47 +0200
Subject: [PATCH] Adds the possibility to also use downloadonly in kwargs Subject: [PATCH] Adds the possibility to also use downloadonly in kwargs

View File

@ -1,4 +1,4 @@
From 9e2139213bc2eeb8afbf10fdff663ebe7ed23887 Mon Sep 17 00:00:00 2001 From eadcab9b1b03041360d27421e5e8204f2a463e61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Wed, 3 Jul 2019 09:34:50 +0100 Date: Wed, 3 Jul 2019 09:34:50 +0100
@ -63,6 +63,6 @@ index d2ae06a98e..0a3053680f 100644
@patch('os.path.getsize', MagicMock(return_value=123456)) @patch('os.path.getsize', MagicMock(return_value=123456))
@patch('os.path.getctime', MagicMock(return_value=1234567890.123456)) @patch('os.path.getctime', MagicMock(return_value=1234567890.123456))
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From dfd16dd5968aae96e36e0dee412864fc765b62fb Mon Sep 17 00:00:00 2001 From 6dea5186842285588ee02b66701cc91a4a2c4fa9 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Fri, 16 Nov 2018 17:05:29 +0100 Date: Fri, 16 Nov 2018 17:05:29 +0100
Subject: [PATCH] Async batch implementation Subject: [PATCH] Async batch implementation
@ -31,18 +31,18 @@ Add separate batch presence_ping timeout
salt/client/__init__.py | 44 +--- salt/client/__init__.py | 44 +---
salt/master.py | 25 ++ salt/master.py | 25 ++
salt/netapi/__init__.py | 3 +- salt/netapi/__init__.py | 3 +-
salt/transport/ipc.py | 11 +- salt/transport/ipc.py | 9 +-
salt/utils/event.py | 11 +- salt/utils/event.py | 8 +-
tests/unit/cli/test_batch_async.py | 351 +++++++++++++++++++++++++++++ tests/unit/cli/test_batch_async.py | 351 +++++++++++++++++++++++++++++
9 files changed, 707 insertions(+), 60 deletions(-) 9 files changed, 703 insertions(+), 59 deletions(-)
create mode 100644 salt/cli/batch_async.py create mode 100644 salt/cli/batch_async.py
create mode 100644 tests/unit/cli/test_batch_async.py create mode 100644 tests/unit/cli/test_batch_async.py
diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py
index 61fbb018fd..a8aefa7091 100644 index d43c57338c..e44c94fb37 100644
--- a/salt/auth/__init__.py --- a/salt/auth/__init__.py
+++ b/salt/auth/__init__.py +++ b/salt/auth/__init__.py
@@ -51,7 +51,9 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ @@ -52,7 +52,9 @@ AUTH_INTERNAL_KEYWORDS = frozenset([
'metadata', 'metadata',
'print_event', 'print_event',
'raw', 'raw',
@ -54,7 +54,7 @@ index 61fbb018fd..a8aefa7091 100644
diff --git a/salt/cli/batch.py b/salt/cli/batch.py diff --git a/salt/cli/batch.py b/salt/cli/batch.py
index e3a7bf9bcf..4bd07f584a 100644 index 723944b60a..36e66da1af 100644
--- a/salt/cli/batch.py --- a/salt/cli/batch.py
+++ b/salt/cli/batch.py +++ b/salt/cli/batch.py
@@ -26,6 +26,79 @@ import logging @@ -26,6 +26,79 @@ import logging
@ -67,7 +67,7 @@ index e3a7bf9bcf..4bd07f584a 100644
+ ''' + '''
+ partition = lambda x: float(x) / 100.0 * len(minions) + partition = lambda x: float(x) / 100.0 * len(minions)
+ try: + try:
+ if '%' in opts['batch']: + if isinstance(opts['batch'], six.string_types) and '%' in opts['batch']:
+ res = partition(float(opts['batch'].strip('%'))) + res = partition(float(opts['batch'].strip('%')))
+ if res < 1: + if res < 1:
+ return int(math.ceil(res)) + return int(math.ceil(res))
@ -104,7 +104,7 @@ index e3a7bf9bcf..4bd07f584a 100644
+ 'tgt_type': tgt_type, + 'tgt_type': tgt_type,
+ 'ret': ret, + 'ret': ret,
+ 'batch': batch, + 'batch': batch,
+ 'failhard': kwargs.get('failhard', False), + 'failhard': kwargs.get('failhard', parent_opts.get('failhard', False)),
+ 'raw': kwargs.get('raw', False)} + 'raw': kwargs.get('raw', False)}
+ +
+ if 'timeout' in kwargs: + if 'timeout' in kwargs:
@ -146,7 +146,7 @@ index e3a7bf9bcf..4bd07f584a 100644
- ''' - '''
- partition = lambda x: float(x) / 100.0 * len(self.minions) - partition = lambda x: float(x) / 100.0 * len(self.minions)
- try: - try:
- if '%' in self.opts['batch']: - if isinstance(self.opts['batch'], six.string_types) and '%' in self.opts['batch']:
- res = partition(float(self.opts['batch'].strip('%'))) - res = partition(float(self.opts['batch'].strip('%')))
- if res < 1: - if res < 1:
- return int(math.ceil(res)) - return int(math.ceil(res))
@ -396,7 +396,7 @@ index 0000000000..3160d46d8b
+ self.event.io_loop.call_later(self.opts['timeout'], self.find_job, set(next_batch)) + self.event.io_loop.call_later(self.opts['timeout'], self.find_job, set(next_batch))
+ self.active = self.active.union(next_batch) + self.active = self.active.union(next_batch)
diff --git a/salt/client/__init__.py b/salt/client/__init__.py diff --git a/salt/client/__init__.py b/salt/client/__init__.py
index 9f0903c7f0..8b37422cbf 100644 index 6a62e53fdc..8b37422cbf 100644
--- a/salt/client/__init__.py --- a/salt/client/__init__.py
+++ b/salt/client/__init__.py +++ b/salt/client/__init__.py
@@ -531,45 +531,14 @@ class LocalClient(object): @@ -531,45 +531,14 @@ class LocalClient(object):
@ -424,7 +424,7 @@ index 9f0903c7f0..8b37422cbf 100644
- 'tgt_type': tgt_type, - 'tgt_type': tgt_type,
- 'ret': ret, - 'ret': ret,
- 'batch': batch, - 'batch': batch,
- 'failhard': kwargs.get('failhard', False), - 'failhard': kwargs.get('failhard', self.opts.get('failhard', False)),
- 'raw': kwargs.get('raw', False)} - 'raw': kwargs.get('raw', False)}
- -
- if 'timeout' in kwargs: - if 'timeout' in kwargs:
@ -461,7 +461,7 @@ index 9f0903c7f0..8b37422cbf 100644
'Salt request timed out. The master is not responding. You ' 'Salt request timed out. The master is not responding. You '
'may need to run your command with `--async` in order to ' 'may need to run your command with `--async` in order to '
diff --git a/salt/master.py b/salt/master.py diff --git a/salt/master.py b/salt/master.py
index 6881aae137..f08c126280 100644 index 606be7319c..ee968410f7 100644
--- a/salt/master.py --- a/salt/master.py
+++ b/salt/master.py +++ b/salt/master.py
@@ -32,6 +32,7 @@ import tornado.gen # pylint: disable=F0401 @@ -32,6 +32,7 @@ import tornado.gen # pylint: disable=F0401
@ -472,7 +472,7 @@ index 6881aae137..f08c126280 100644
import salt.client import salt.client
import salt.client.ssh.client import salt.client.ssh.client
import salt.exceptions import salt.exceptions
@@ -2039,6 +2040,27 @@ class ClearFuncs(object): @@ -2040,6 +2041,27 @@ class ClearFuncs(object):
return False return False
return self.loadauth.get_tok(clear_load['token']) return self.loadauth.get_tok(clear_load['token'])
@ -500,7 +500,7 @@ index 6881aae137..f08c126280 100644
def publish(self, clear_load): def publish(self, clear_load):
''' '''
This method sends out publications to the minions, it can only be used This method sends out publications to the minions, it can only be used
@@ -2130,6 +2152,9 @@ class ClearFuncs(object): @@ -2131,6 +2153,9 @@ class ClearFuncs(object):
'error': 'Master could not resolve minions for target {0}'.format(clear_load['tgt']) 'error': 'Master could not resolve minions for target {0}'.format(clear_load['tgt'])
} }
} }
@ -525,29 +525,20 @@ index 95f6384889..43b6e943a7 100644
def local(self, *args, **kwargs): def local(self, *args, **kwargs):
''' '''
diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py diff --git a/salt/transport/ipc.py b/salt/transport/ipc.py
index 40a172991d..8235f104ef 100644 index dbcba18e5c..d0e1639b6e 100644
--- a/salt/transport/ipc.py --- a/salt/transport/ipc.py
+++ b/salt/transport/ipc.py +++ b/salt/transport/ipc.py
@@ -669,6 +669,8 @@ class IPCMessageSubscriber(IPCClient): @@ -615,6 +615,7 @@ class IPCMessageSubscriber(IPCClient):
self._sync_ioloop_running = False self._read_stream_future = None
self.saved_data = [] self._saved_data = []
self._sync_read_in_progress = Semaphore() self._read_in_progress = Lock()
+ self.callbacks = set() + self.callbacks = set()
+ self.reading = False
@tornado.gen.coroutine @tornado.gen.coroutine
def _read_sync(self, timeout): def _read(self, timeout, callback=None):
@@ -756,6 +758,7 @@ class IPCMessageSubscriber(IPCClient): @@ -689,8 +690,12 @@ class IPCMessageSubscriber(IPCClient):
while not self.stream.closed(): return self._saved_data.pop(0)
try: return self.io_loop.run_sync(lambda: self._read(timeout))
self._read_stream_future = self.stream.read_bytes(4096, partial=True)
+ self.reading = True
wire_bytes = yield self._read_stream_future
self._read_stream_future = None
self.unpacker.feed(wire_bytes)
@@ -768,8 +771,12 @@ class IPCMessageSubscriber(IPCClient):
except Exception as exc:
log.error('Exception occurred while Subscriber handling stream: %s', exc)
+ def __run_callbacks(self, raw): + def __run_callbacks(self, raw):
+ for callback in self.callbacks: + for callback in self.callbacks:
@ -559,20 +550,20 @@ index 40a172991d..8235f104ef 100644
''' '''
Asynchronously read messages and invoke a callback when they are ready. Asynchronously read messages and invoke a callback when they are ready.
@@ -784,7 +791,7 @@ class IPCMessageSubscriber(IPCClient): @@ -705,7 +710,7 @@ class IPCMessageSubscriber(IPCClient):
except Exception as exc: except Exception as exc:
log.error('Exception occurred while Subscriber connecting: %s', exc) log.error('Exception occurred while Subscriber connecting: %s', exc)
yield tornado.gen.sleep(1) yield tornado.gen.sleep(1)
- yield self._read_async(callback) - yield self._read(None, callback)
+ yield self._read_async(self.__run_callbacks) + yield self._read(None, self.__run_callbacks)
def close(self): def close(self):
''' '''
diff --git a/salt/utils/event.py b/salt/utils/event.py diff --git a/salt/utils/event.py b/salt/utils/event.py
index 296a296084..d2700bd2a0 100644 index 0b877980aa..ad9c85b576 100644
--- a/salt/utils/event.py --- a/salt/utils/event.py
+++ b/salt/utils/event.py +++ b/salt/utils/event.py
@@ -863,6 +863,10 @@ class SaltEvent(object): @@ -858,6 +858,10 @@ class SaltEvent(object):
# Minion fired a bad retcode, fire an event # Minion fired a bad retcode, fire an event
self._fire_ret_load_specific_fun(load) self._fire_ret_load_specific_fun(load)
@ -583,17 +574,15 @@ index 296a296084..d2700bd2a0 100644
def set_event_handler(self, event_handler): def set_event_handler(self, event_handler):
''' '''
Invoke the event_handler callback each time an event arrives. Invoke the event_handler callback each time an event arrives.
@@ -871,8 +875,11 @@ class SaltEvent(object): @@ -866,8 +870,10 @@ class SaltEvent(object):
if not self.cpub: if not self.cpub:
self.connect_pub() self.connect_pub()
- # This will handle reconnects
- return self.subscriber.read_async(event_handler)
+ +
+ self.subscriber.callbacks.add(event_handler) + self.subscriber.callbacks.add(event_handler)
+ if not self.subscriber.reading: # This will handle reconnects
+ # This will handle reconnects - return self.subscriber.read_async(event_handler)
+ self.subscriber.read_async() + return self.subscriber.read_async()
def __del__(self): def __del__(self):
# skip exceptions in destroy-- since destroy() doesn't cover interpreter # skip exceptions in destroy-- since destroy() doesn't cover interpreter
@ -955,6 +944,6 @@ index 0000000000..f65b6a06c3
+ (self.batch.find_job, {'foo'}) + (self.batch.find_job, {'foo'})
+ ) + )
-- --
2.20.1 2.23.0

View File

@ -1,4 +1,4 @@
From 310f8eb22db6010ba48ab371a7223c1345cfbcf0 Mon Sep 17 00:00:00 2001 From 47adf8fbd8ff1baeef83b2ba8f525dfd5eaef123 Mon Sep 17 00:00:00 2001
From: Hubert Mantel <mantel@suse.de> From: Hubert Mantel <mantel@suse.de>
Date: Mon, 27 Nov 2017 13:55:13 +0100 Date: Mon, 27 Nov 2017 13:55:13 +0100
Subject: [PATCH] avoid excessive syslogging by watchdog cronjob (#58) Subject: [PATCH] avoid excessive syslogging by watchdog cronjob (#58)
@ -21,6 +21,6 @@ index 2e418094ed..73a91ebd62 100755
/usr/bin/salt-daemon-watcher --with-init & disown /usr/bin/salt-daemon-watcher --with-init & disown
fi fi
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From 36433f3f81fb45ff40ed2d294494342c9f622c2e Mon Sep 17 00:00:00 2001 From 58504344b62fd577c0ef9c8d55378ea668a57912 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 29 Jul 2019 11:17:53 +0100 Date: Mon, 29 Jul 2019 11:17:53 +0100
@ -11,7 +11,7 @@ Improve error logging when http.query cannot be performed
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/salt/utils/http.py b/salt/utils/http.py diff --git a/salt/utils/http.py b/salt/utils/http.py
index 78043b1d6c..1b7dff6202 100644 index c75ca73a85..ced01e110f 100644
--- a/salt/utils/http.py --- a/salt/utils/http.py
+++ b/salt/utils/http.py +++ b/salt/utils/http.py
@@ -567,11 +567,13 @@ def query(url, @@ -567,11 +567,13 @@ def query(url,
@ -30,6 +30,6 @@ index 78043b1d6c..1b7dff6202 100644
if stream is True or handle is True: if stream is True or handle is True:
-- --
2.21.0 2.16.4

View File

@ -1,31 +0,0 @@
From d914a1e952e393f3e72aee2cb8d9056533f490cc Mon Sep 17 00:00:00 2001
From: Robert Munteanu <rombert@apache.org>
Date: Mon, 19 Nov 2018 17:52:34 +0100
Subject: [PATCH] azurefs: gracefully handle AttributeError
It is possible that the azure.storage object has no __version__ defined.
In that case, prevent console spam with unhandled AttributeError
messages and instead consider that Azure support is not present.
Problem was encountered on openSUSE Tumbleweed.
---
salt/fileserver/azurefs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/fileserver/azurefs.py b/salt/fileserver/azurefs.py
index 547a681016..032739d160 100644
--- a/salt/fileserver/azurefs.py
+++ b/salt/fileserver/azurefs.py
@@ -68,7 +68,7 @@ try:
if LooseVersion(azure.storage.__version__) < LooseVersion('0.20.0'):
raise ImportError('azure.storage.__version__ must be >= 0.20.0')
HAS_AZURE = True
-except ImportError:
+except (ImportError, AttributeError):
HAS_AZURE = False
# Import third party libs
--
2.17.1

View File

@ -1,6 +1,7 @@
From 50377852ca989ffa141fcf32d5ca57d120b455b8 Mon Sep 17 00:00:00 2001 From b7e1ff5b0d023fef1f86fa970323dc01bfaabd41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Guilherme=20Vanz?= <jvanz@jvanz.com> From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
Date: Tue, 21 May 2019 16:13:18 -0300 <psuarezhernandez@suse.com>
Date: Wed, 5 Jun 2019 15:15:04 +0100
Subject: [PATCH] batch.py: avoid exception when minion does not respond Subject: [PATCH] batch.py: avoid exception when minion does not respond
(bsc#1135507) (bsc#1135507)
MIME-Version: 1.0 MIME-Version: 1.0
@ -21,11 +22,11 @@ Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/salt/cli/batch.py b/salt/cli/batch.py diff --git a/salt/cli/batch.py b/salt/cli/batch.py
index ce239215cb..1623fc5be8 100644 index 67f03c8a45..10fc81a5f4 100644
--- a/salt/cli/batch.py --- a/salt/cli/batch.py
+++ b/salt/cli/batch.py +++ b/salt/cli/batch.py
@@ -315,6 +315,11 @@ class Batch(object): @@ -318,6 +318,11 @@ class Batch(object):
if self.opts.get('failhard') and data['ret']['retcode'] > 0: if self.opts.get('failhard') and data['retcode'] > 0:
failhard = True failhard = True
+ # avoid an exception if the minion does not respond. + # avoid an exception if the minion does not respond.
@ -37,6 +38,6 @@ index ce239215cb..1623fc5be8 100644
ret[minion] = data ret[minion] = data
yield data yield data
-- --
2.21.0 2.16.4

View File

@ -1,27 +1,29 @@
From 8fc3419db49497ca33f99d7bbc3a251d7b07ff09 Mon Sep 17 00:00:00 2001 From 160103e536cfb5c956d64ed13b9c633153fb7a2e Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 5 Oct 2018 12:02:08 +0200 Date: Fri, 5 Oct 2018 12:02:08 +0200
Subject: [PATCH] Bugfix: any unicode string of length 16 will raise Subject: [PATCH] Bugfix: any unicode string of length 16 will raise
TypeError instead of ValueError TypeError instead of ValueError
--- ---
salt/_compat.py | 2 +- salt/_compat.py | 4 ++--
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/salt/_compat.py b/salt/_compat.py diff --git a/salt/_compat.py b/salt/_compat.py
index 8628833dcf..98931c6cce 100644 index 61842b4bf3..42153f2395 100644
--- a/salt/_compat.py --- a/salt/_compat.py
+++ b/salt/_compat.py +++ b/salt/_compat.py
@@ -191,7 +191,7 @@ class IPv6AddressScoped(ipaddress.IPv6Address): @@ -190,8 +190,8 @@ class IPv6AddressScoped(ipaddress.IPv6Address):
packed = False
if isinstance(data, bytes) and len(data) == 16 and b':' not in data: if isinstance(data, bytes) and len(data) == 16 and b':' not in data:
try: try:
packed = bool(int(str(bytearray(data)).encode('hex'), 16)) - packed = bool(int(binascii.hexlify(data), 16))
- except ValueError: - except ValueError:
+ packed = bool(int(str(bytearray(data)).encode('hex'), 16))
+ except (ValueError, TypeError): + except (ValueError, TypeError):
pass pass
return packed return packed
-- --
2.20.1 2.16.4

View File

@ -1,8 +1,9 @@
From 722b9395a6489da7626e6a388c78bf8e8812190e Mon Sep 17 00:00:00 2001 From e27ccce1429fa604137df35d8dabbc8016c2b5c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Fri, 12 Apr 2019 16:47:03 +0100 Date: Fri, 12 Apr 2019 16:47:03 +0100
Subject: [PATCH] Calculate FQDNs in parallel to avoid blockings (bsc#1129079) Subject: [PATCH] Calculate FQDNs in parallel to avoid blockings
(bsc#1129079)
Fix pylint issue Fix pylint issue
--- ---
@ -10,10 +11,10 @@ Fix pylint issue
1 file changed, 26 insertions(+), 5 deletions(-) 1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index 05a9d5035d..796458939d 100644 index 7d75d48bb5..ac66a437fd 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -20,11 +20,14 @@ import platform @@ -20,12 +20,15 @@ import platform
import logging import logging
import locale import locale
import uuid import uuid
@ -22,13 +23,14 @@ index 05a9d5035d..796458939d 100644
from errno import EACCES, EPERM from errno import EACCES, EPERM
import datetime import datetime
import warnings import warnings
import time
+from multiprocessing.dummy import Pool as ThreadPool +from multiprocessing.dummy import Pool as ThreadPool
+ +
# pylint: disable=import-error # pylint: disable=import-error
try: try:
import dateutil.tz import dateutil.tz
@@ -2200,13 +2203,10 @@ def fqdns(): @@ -2255,13 +2258,10 @@ def fqdns():
grains = {} grains = {}
fqdns = set() fqdns = set()
@ -44,9 +46,9 @@ index 05a9d5035d..796458939d 100644
except socket.herror as err: except socket.herror as err:
if err.errno == 0: if err.errno == 0:
# No FQDN for this IP address, so we don't need to know this all the time. # No FQDN for this IP address, so we don't need to know this all the time.
@@ -2216,6 +2216,27 @@ def fqdns(): @@ -2271,6 +2271,27 @@ def fqdns():
except (socket.error, socket.gaierror, socket.timeout) as err: except (socket.error, socket.gaierror, socket.timeout) as err:
log.error(err_message, err) log.error(err_message, ip, err)
+ start = time.time() + start = time.time()
+ +
@ -73,5 +75,6 @@ index 05a9d5035d..796458939d 100644
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 8ced9cdeb53e7dc20a1665ba2e373fbdc5d30c5d Mon Sep 17 00:00:00 2001 From d1e016a5deb8f79adc8473b02171b5661cb93ea8 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de> From: Jochen Breuer <jbreuer@suse.de>
Date: Tue, 9 Apr 2019 16:32:46 +0200 Date: Tue, 9 Apr 2019 16:32:46 +0200
Subject: [PATCH] Checking for jid before returning data Subject: [PATCH] Checking for jid before returning data
@ -30,6 +30,6 @@ index 8b37422cbf..aff354a021 100644
# Ignore other erroneous messages # Ignore other erroneous messages
continue continue
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From afdfd35222223d81c304854b5ae7af60f3820ed3 Mon Sep 17 00:00:00 2001 From f7ae2b3ebe7d78ca60ada7fd2bb30f3cdbd75427 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 20 Nov 2018 16:06:31 +0100 Date: Tue, 20 Nov 2018 16:06:31 +0100
Subject: [PATCH] Debian info_installed compatibility (#50453) Subject: [PATCH] Debian info_installed compatibility (#50453)
@ -49,10 +49,10 @@ Adjust architecture getter according to the lowpkg info
Fix wrong Git merge: missing function signature Fix wrong Git merge: missing function signature
--- ---
salt/modules/aptpkg.py | 20 +++- salt/modules/aptpkg.py | 20 ++++-
salt/modules/dpkg_lowpkg.py | 93 +++++++++++++-- salt/modules/dpkg_lowpkg.py | 93 +++++++++++++++++---
tests/unit/modules/test_aptpkg.py | 151 ++++++++++++++++--------- tests/unit/modules/test_aptpkg.py | 151 +++++++++++++++++++++------------
tests/unit/modules/test_dpkg_lowpkg.py | 69 +++++++++++ tests/unit/modules/test_dpkg_lowpkg.py | 69 +++++++++++++++
4 files changed, 267 insertions(+), 66 deletions(-) 4 files changed, 267 insertions(+), 66 deletions(-)
diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
@ -588,6 +588,6 @@ index bdcb7eec89..d16ce3cc1a 100644
+ assert ret['emacs']['license'] == 'BSD v3' + assert ret['emacs']['license'] == 'BSD v3'
+ assert ret['emacs']['version'] == '46.1' + assert ret['emacs']['version'] == '46.1'
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 5eacdf8fef35cdd05cae1b65485b3f820c86bc68 Mon Sep 17 00:00:00 2001 From 263c8c98a5601179a53c00523a1579883e705f1f Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 4 Dec 2018 16:39:08 +0100 Date: Tue, 4 Dec 2018 16:39:08 +0100
Subject: [PATCH] Decide if the source should be actually skipped Subject: [PATCH] Decide if the source should be actually skipped
@ -8,10 +8,10 @@ Subject: [PATCH] Decide if the source should be actually skipped
1 file changed, 22 insertions(+), 1 deletion(-) 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
index dc27903230..42d606926f 100644 index 64620647c2..4a331444c9 100644
--- a/salt/modules/aptpkg.py --- a/salt/modules/aptpkg.py
+++ b/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py
@@ -1698,6 +1698,27 @@ def list_repo_pkgs(*args, **kwargs): # pylint: disable=unused-import @@ -1574,6 +1574,27 @@ def list_repo_pkgs(*args, **kwargs): # pylint: disable=unused-import
return ret return ret
@ -39,7 +39,7 @@ index dc27903230..42d606926f 100644
def list_repos(): def list_repos():
''' '''
Lists all repos in the sources.list (and sources.lists.d) files Lists all repos in the sources.list (and sources.lists.d) files
@@ -1713,7 +1734,7 @@ def list_repos(): @@ -1589,7 +1610,7 @@ def list_repos():
repos = {} repos = {}
sources = sourceslist.SourcesList() sources = sourceslist.SourcesList()
for source in sources.list: for source in sources.list:
@ -49,6 +49,6 @@ index dc27903230..42d606926f 100644
repo = {} repo = {}
repo['file'] = source.file repo['file'] = source.file
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From b99e55aab52d086315d54cf44af68f40dcf79dc9 Mon Sep 17 00:00:00 2001 From a8f289c4eb03c051d8ffc60eed28985f3b49d921 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Wed, 29 May 2019 11:03:16 +0100 Date: Wed, 29 May 2019 11:03:16 +0100
@ -6,8 +6,8 @@ Subject: [PATCH] Do not break repo files with multiple line values on
yumpkg (bsc#1135360) yumpkg (bsc#1135360)
--- ---
salt/modules/yumpkg.py | 16 ++++++--- salt/modules/yumpkg.py | 16 +++++++++---
tests/integration/modules/test_pkg.py | 48 +++++++++++++++++++++++++++ tests/integration/modules/test_pkg.py | 48 +++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 4 deletions(-) 2 files changed, 60 insertions(+), 4 deletions(-)
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py
@ -47,10 +47,10 @@ index 5ec3835574..3a4fe47a45 100644
content += comments + '\n' content += comments + '\n'
diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py
index 0271cea81f..a82c9662c7 100644 index 66ac3cfb61..7204428eca 100644
--- a/tests/integration/modules/test_pkg.py --- a/tests/integration/modules/test_pkg.py
+++ b/tests/integration/modules/test_pkg.py +++ b/tests/integration/modules/test_pkg.py
@@ -123,6 +123,54 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin): @@ -136,6 +136,54 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin):
if repo is not None: if repo is not None:
self.run_function('pkg.del_repo', [repo]) self.run_function('pkg.del_repo', [repo])
@ -106,6 +106,6 @@ index 0271cea81f..a82c9662c7 100644
def test_owner(self): def test_owner(self):
''' '''
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From f185eabfb4b529157cf7464b32beebeb8b944310 Mon Sep 17 00:00:00 2001 From c6c8ce93bb0be6fe22fb5d65517a002595a9eb7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Tue, 7 May 2019 15:33:51 +0100 Date: Tue, 7 May 2019 15:33:51 +0100
@ -7,12 +7,12 @@ Subject: [PATCH] Do not crash when there are IPv6 established
Add unit test for '_netlink_tool_remote_on' Add unit test for '_netlink_tool_remote_on'
--- ---
salt/utils/network.py | 9 +++++---- salt/utils/network.py | 5 +++--
tests/unit/utils/test_network.py | 16 ++++++++++++++++ tests/unit/utils/test_network.py | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 4 deletions(-) 2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/salt/utils/network.py b/salt/utils/network.py diff --git a/salt/utils/network.py b/salt/utils/network.py
index c72d2aec41..3f0522b9a5 100644 index a183c9776a..a3fd6e848e 100644
--- a/salt/utils/network.py --- a/salt/utils/network.py
+++ b/salt/utils/network.py +++ b/salt/utils/network.py
@@ -1457,7 +1457,7 @@ def _parse_tcp_line(line): @@ -1457,7 +1457,7 @@ def _parse_tcp_line(line):
@ -32,16 +32,7 @@ index c72d2aec41..3f0522b9a5 100644
''' '''
remotes = set() remotes = set()
valid = False valid = False
@@ -1486,14 +1487,14 @@ def _netlink_tool_remote_on(port, which_end): @@ -1493,7 +1494,7 @@ def _netlink_tool_remote_on(port, which_end):
elif 'ESTAB' not in line:
continue
chunks = line.split()
- local_host, local_port = chunks[3].split(':', 1)
- remote_host, remote_port = chunks[4].split(':', 1)
+ local_host, local_port = chunks[3].rsplit(':', 1)
+ remote_host, remote_port = chunks[4].rsplit(':', 1)
if which_end == 'remote_port' and int(remote_port) != port:
continue continue
if which_end == 'local_port' and int(local_port) != port: if which_end == 'local_port' and int(local_port) != port:
continue continue
@ -51,11 +42,11 @@ index c72d2aec41..3f0522b9a5 100644
if valid is False: if valid is False:
remotes = None remotes = None
diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py
index ca627777a7..ecf7d7c45b 100644 index f4c849d124..06e3aea6ea 100644
--- a/tests/unit/utils/test_network.py --- a/tests/unit/utils/test_network.py
+++ b/tests/unit/utils/test_network.py +++ b/tests/unit/utils/test_network.py
@@ -120,6 +120,14 @@ USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS @@ -128,6 +128,14 @@ ESTAB 0 0 127.0.0.1:56726 127.0.
salt-master python2.781106 35 tcp4 127.0.0.1:61115 127.0.0.1:4506 ESTAB 0 0 ::ffff:1.2.3.4:5678 ::ffff:1.2.3.4:4505
''' '''
+LINUX_NETLINK_SS_OUTPUT = '''\ +LINUX_NETLINK_SS_OUTPUT = '''\
@ -69,7 +60,7 @@ index ca627777a7..ecf7d7c45b 100644
IPV4_SUBNETS = {True: ('10.10.0.0/24',), IPV4_SUBNETS = {True: ('10.10.0.0/24',),
False: ('10.10.0.0', '10.10.0.0/33', 'FOO', 9, '0.9.800.1000/24')} False: ('10.10.0.0', '10.10.0.0/33', 'FOO', 9, '0.9.800.1000/24')}
IPV6_SUBNETS = {True: ('::1/128',), IPV6_SUBNETS = {True: ('::1/128',),
@@ -453,6 +461,14 @@ class NetworkTestCase(TestCase): @@ -491,6 +499,14 @@ class NetworkTestCase(TestCase):
remotes = network._freebsd_remotes_on('4506', 'remote') remotes = network._freebsd_remotes_on('4506', 'remote')
self.assertEqual(remotes, set(['127.0.0.1'])) self.assertEqual(remotes, set(['127.0.0.1']))
@ -85,6 +76,6 @@ index ca627777a7..ecf7d7c45b 100644
''' '''
Test if minion IDs are distinct in the pool. Test if minion IDs are distinct in the pool.
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From ab7d69b3438c719f7ad6b4b346e56556e8a7bd10 Mon Sep 17 00:00:00 2001 From 016e0c30718dac2a144090f82a2c35d5ce13bb8c Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 21 Sep 2018 17:31:39 +0200 Date: Fri, 21 Sep 2018 17:31:39 +0200
Subject: [PATCH] Do not load pip state if there is no 3rd party Subject: [PATCH] Do not load pip state if there is no 3rd party
@ -40,6 +40,6 @@ index eac40c719c..988ae695a7 100644
def _clear_context(bin_env=None): def _clear_context(bin_env=None):
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 189a19b6e8d28cc49e5ad5f2a683e1dfdce66a86 Mon Sep 17 00:00:00 2001 From ee69f252a71b950377987d7fad3515082e09abff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Fri, 28 Jun 2019 15:17:56 +0100 Date: Fri, 28 Jun 2019 15:17:56 +0100
@ -10,10 +10,10 @@ Move MockTimedProc implementation to tests.support.mock
Add unit test for ansible caller Add unit test for ansible caller
--- ---
salt/modules/ansiblegate.py | 14 +++++++-- salt/modules/ansiblegate.py | 14 +++++++++---
tests/support/mock.py | 31 +++++++++++++++++++ tests/support/mock.py | 31 +++++++++++++++++++++++++
tests/unit/modules/test_ansiblegate.py | 41 ++++++++++++++++++++++++++ tests/unit/modules/test_ansiblegate.py | 41 ++++++++++++++++++++++++++++++++++
tests/unit/modules/test_cmdmod.py | 34 +-------------------- tests/unit/modules/test_cmdmod.py | 34 +---------------------------
4 files changed, 84 insertions(+), 36 deletions(-) 4 files changed, 84 insertions(+), 36 deletions(-)
diff --git a/salt/modules/ansiblegate.py b/salt/modules/ansiblegate.py diff --git a/salt/modules/ansiblegate.py b/salt/modules/ansiblegate.py
@ -214,6 +214,6 @@ index 8da672dd22..a20afaca0f 100644
class CMDMODTestCase(TestCase, LoaderModuleMockMixin): class CMDMODTestCase(TestCase, LoaderModuleMockMixin):
''' '''
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From 769c9e85499bc9912b050fff7d3105690f1d7c7b Mon Sep 17 00:00:00 2001 From 3c39b7ae5e4a0cd11a77241abde9407a8e1b3f07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Wed, 13 Mar 2019 16:14:07 +0000 Date: Wed, 13 Mar 2019 16:14:07 +0000
@ -40,6 +40,6 @@ index 4f26a41670..5ec3835574 100644
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 5e0fe08c6afd75a7d65d6ccd6cf6b4b197fb1064 Mon Sep 17 00:00:00 2001 From a2e40158ad3b92a20ec9c12f7cd75edb4a01c2fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com> From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Tue, 29 Jan 2019 09:44:03 +0100 Date: Tue, 29 Jan 2019 09:44:03 +0100
Subject: [PATCH] Don't call zypper with more than one --no-refresh Subject: [PATCH] Don't call zypper with more than one --no-refresh
@ -37,6 +37,6 @@ index f586c23fd0..5c5091a570 100644
self.assertEqual(sniffer.calls[0]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'foo']) self.assertEqual(sniffer.calls[0]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'foo'])
self.assertEqual(sniffer.calls[1]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'bar']) self.assertEqual(sniffer.calls[1]['args'][0], ['zypper', '--non-interactive', '--no-refresh', 'bar'])
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 7c72c080c6b47cccecdf058cfe1be8f465d568a6 Mon Sep 17 00:00:00 2001 From 0e4ac6001d552e649f8ab9d6c04b18bd531e4240 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 10 Jul 2018 12:06:33 +0200 Date: Tue, 10 Jul 2018 12:06:33 +0200
Subject: [PATCH] early feature: support-config Subject: [PATCH] early feature: support-config
@ -291,24 +291,24 @@ Remove development stub. Ughh...
Removed blacklist of pkg_resources Removed blacklist of pkg_resources
--- ---
salt/cli/support/__init__.py | 65 +++ salt/cli/support/__init__.py | 65 ++++
salt/cli/support/collector.py | 495 ++++++++++++++++++++++ salt/cli/support/collector.py | 495 ++++++++++++++++++++++++++++++
salt/cli/support/console.py | 165 ++++++++ salt/cli/support/console.py | 165 ++++++++++
salt/cli/support/intfunc.py | 42 ++ salt/cli/support/intfunc.py | 42 +++
salt/cli/support/localrunner.py | 34 ++ salt/cli/support/localrunner.py | 34 ++
salt/cli/support/profiles/default.yml | 71 ++++ salt/cli/support/profiles/default.yml | 71 +++++
salt/cli/support/profiles/jobs-active.yml | 3 + salt/cli/support/profiles/jobs-active.yml | 3 +
salt/cli/support/profiles/jobs-last.yml | 3 + salt/cli/support/profiles/jobs-last.yml | 3 +
salt/cli/support/profiles/jobs-trace.yml | 7 + salt/cli/support/profiles/jobs-trace.yml | 7 +
salt/cli/support/profiles/network.yml | 27 ++ salt/cli/support/profiles/network.yml | 27 ++
salt/cli/support/profiles/postgres.yml | 11 + salt/cli/support/profiles/postgres.yml | 11 +
salt/cli/support/profiles/salt.yml | 9 + salt/cli/support/profiles/salt.yml | 9 +
salt/cli/support/profiles/users.yml | 22 + salt/cli/support/profiles/users.yml | 22 ++
salt/scripts.py | 14 + salt/scripts.py | 14 +
salt/utils/parsers.py | 65 +++ salt/utils/parsers.py | 65 ++++
scripts/salt-support | 11 + scripts/salt-support | 11 +
setup.py | 2 + setup.py | 2 +
tests/unit/cli/test_support.py | 477 +++++++++++++++++++++ tests/unit/cli/test_support.py | 477 ++++++++++++++++++++++++++++
18 files changed, 1523 insertions(+) 18 files changed, 1523 insertions(+)
create mode 100644 salt/cli/support/__init__.py create mode 100644 salt/cli/support/__init__.py
create mode 100644 salt/cli/support/collector.py create mode 100644 salt/cli/support/collector.py
@ -1359,10 +1359,10 @@ index 0000000000..391acdb606
+ info: List of all available groups + info: List of all available groups
+ output: table + output: table
diff --git a/salt/scripts.py b/salt/scripts.py diff --git a/salt/scripts.py b/salt/scripts.py
index e677368a0f..7a1b4bb133 100644 index 71120366e0..c789df4e39 100644
--- a/salt/scripts.py --- a/salt/scripts.py
+++ b/salt/scripts.py +++ b/salt/scripts.py
@@ -508,3 +508,17 @@ def salt_extend(extension, name, description, salt_dir, merge): @@ -539,3 +539,17 @@ def salt_extend(extension, name, description, salt_dir, merge):
description=description, description=description,
salt_dir=salt_dir, salt_dir=salt_dir,
merge=merge) merge=merge)
@ -1381,7 +1381,7 @@ index e677368a0f..7a1b4bb133 100644
+ _install_signal_handlers(client) + _install_signal_handlers(client)
+ client.run() + client.run()
diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py
index 9a7f27ac11..56a8961c3a 100644 index 1e652a845e..aa13310d5a 100644
--- a/salt/utils/parsers.py --- a/salt/utils/parsers.py
+++ b/salt/utils/parsers.py +++ b/salt/utils/parsers.py
@@ -20,6 +20,7 @@ import getpass @@ -20,6 +20,7 @@ import getpass
@ -1400,7 +1400,7 @@ index 9a7f27ac11..56a8961c3a 100644
import salt.utils.platform import salt.utils.platform
import salt.utils.process import salt.utils.process
import salt.utils.stringutils import salt.utils.stringutils
@@ -1863,6 +1865,69 @@ class SyndicOptionParser(six.with_metaclass(OptionParserMeta, @@ -1902,6 +1904,69 @@ class SyndicOptionParser(six.with_metaclass(OptionParserMeta,
self.get_config_file_path('minion')) self.get_config_file_path('minion'))
@ -1488,18 +1488,18 @@ index 0000000000..48ce141c67
+if __name__ == '__main__': +if __name__ == '__main__':
+ salt_support() + salt_support()
diff --git a/setup.py b/setup.py diff --git a/setup.py b/setup.py
index 0841c93553..8d0dcaa4b8 100755 index 3e930df8db..25e06a42f6 100755
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -1015,6 +1015,7 @@ class SaltDistribution(distutils.dist.Distribution): @@ -1051,6 +1051,7 @@ class SaltDistribution(distutils.dist.Distribution):
'scripts/salt-key',
'scripts/salt-master', 'scripts/salt-master',
'scripts/salt-minion', 'scripts/salt-minion',
'scripts/salt-proxy',
+ 'scripts/salt-support', + 'scripts/salt-support',
'scripts/salt-ssh', 'scripts/salt-ssh',
'scripts/salt-syndic', 'scripts/salt-syndic',
'scripts/salt-unity', 'scripts/salt-unity',
@@ -1052,6 +1053,7 @@ class SaltDistribution(distutils.dist.Distribution): @@ -1086,6 +1087,7 @@ class SaltDistribution(distutils.dist.Distribution):
'salt-key = salt.scripts:salt_key', 'salt-key = salt.scripts:salt_key',
'salt-master = salt.scripts:salt_master', 'salt-master = salt.scripts:salt_master',
'salt-minion = salt.scripts:salt_minion', 'salt-minion = salt.scripts:salt_minion',
@ -1991,6 +1991,6 @@ index 0000000000..85ea957d79
+ assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['info'] == 'Details on JID 0000' + assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['info'] == 'Details on JID 0000'
+ assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['args'] == [0] + assert jobs_trace['jobs-details'][0]['run:jobs.list_job']['args'] == [0]
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From d937d1edb837bc084c1eaa320e8433382135e2d9 Mon Sep 17 00:00:00 2001 From 7482f815a80c2c789bc09e2c72c522e6eb091fa3 Mon Sep 17 00:00:00 2001
From: Maximilian Meister <mmeister@suse.de> From: Maximilian Meister <mmeister@suse.de>
Date: Thu, 3 May 2018 15:52:23 +0200 Date: Thu, 3 May 2018 15:52:23 +0200
Subject: [PATCH] enable passing a unix_socket for mysql returners Subject: [PATCH] enable passing a unix_socket for mysql returners
@ -19,7 +19,7 @@ Signed-off-by: Maximilian Meister <mmeister@suse.de>
1 file changed, 8 insertions(+), 3 deletions(-) 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py diff --git a/salt/returners/mysql.py b/salt/returners/mysql.py
index 85892cb06c..a286731d5c 100644 index fbaaacfe0d..06b249e664 100644
--- a/salt/returners/mysql.py --- a/salt/returners/mysql.py
+++ b/salt/returners/mysql.py +++ b/salt/returners/mysql.py
@@ -18,6 +18,7 @@ config. These are the defaults: @@ -18,6 +18,7 @@ config. These are the defaults:
@ -69,6 +69,6 @@ index 85892cb06c..a286731d5c 100644
try: try:
__context__['mysql_returner_conn'] = conn __context__['mysql_returner_conn'] = conn
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From d3b2f157643845d2659a226ba72ce24ce1d2a73d Mon Sep 17 00:00:00 2001 From 37a3628e3a3cd2d1f18e7834a151efab21b10433 Mon Sep 17 00:00:00 2001
From: Maximilian Meister <mmeister@suse.de> From: Maximilian Meister <mmeister@suse.de>
Date: Thu, 5 Apr 2018 13:23:23 +0200 Date: Thu, 5 Apr 2018 13:23:23 +0200
Subject: [PATCH] fall back to PyMySQL Subject: [PATCH] fall back to PyMySQL
@ -11,7 +11,7 @@ Signed-off-by: Maximilian Meister <mmeister@suse.de>
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py diff --git a/salt/modules/mysql.py b/salt/modules/mysql.py
index de8916f4f2..64c773f40a 100644 index 94f4b4acce..7e8e6026b3 100644
--- a/salt/modules/mysql.py --- a/salt/modules/mysql.py
+++ b/salt/modules/mysql.py +++ b/salt/modules/mysql.py
@@ -58,7 +58,7 @@ try: @@ -58,7 +58,7 @@ try:
@ -33,6 +33,6 @@ index de8916f4f2..64c773f40a 100644
MySQLdb = None MySQLdb = None
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 329f90fcde205237545cd623f55f0f6c228bf893 Mon Sep 17 00:00:00 2001 From 3812df3a2776e745160ef406dae85aa8acdf2333 Mon Sep 17 00:00:00 2001
From: Alberto Planas <aplanas@gmail.com> From: Alberto Planas <aplanas@gmail.com>
Date: Fri, 25 Oct 2019 15:43:16 +0200 Date: Fri, 25 Oct 2019 15:43:16 +0200
Subject: [PATCH] Fix a wrong rebase in test_core.py (#180) Subject: [PATCH] Fix a wrong rebase in test_core.py (#180)
@ -17,15 +17,15 @@ This patch ignore this kind of issue during the grains creation.
(cherry picked from commit bd0213bae00b737b24795bec3c030ebfe476e0d8) (cherry picked from commit bd0213bae00b737b24795bec3c030ebfe476e0d8)
--- ---
salt/grains/core.py | 4 +-- salt/grains/core.py | 4 ++--
tests/unit/grains/test_core.py | 45 ---------------------------------- tests/unit/grains/test_core.py | 45 ------------------------------------------
2 files changed, 2 insertions(+), 47 deletions(-) 2 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index fdabe484a8..bf54c54553 100644 index 6b1f2d2223..31ed8a77aa 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -989,7 +989,7 @@ def _virtual(osdata): @@ -990,7 +990,7 @@ def _virtual(osdata):
except UnicodeDecodeError: except UnicodeDecodeError:
# Some firmwares provide non-valid 'product_name' # Some firmwares provide non-valid 'product_name'
# files, ignore them # files, ignore them
@ -34,7 +34,7 @@ index fdabe484a8..bf54c54553 100644
except IOError: except IOError:
pass pass
elif osdata['kernel'] == 'FreeBSD': elif osdata['kernel'] == 'FreeBSD':
@@ -2490,7 +2490,7 @@ def _hw_data(osdata): @@ -2545,7 +2545,7 @@ def _hw_data(osdata):
except UnicodeDecodeError: except UnicodeDecodeError:
# Some firmwares provide non-valid 'product_name' # Some firmwares provide non-valid 'product_name'
# files, ignore them # files, ignore them
@ -44,10 +44,10 @@ index fdabe484a8..bf54c54553 100644
# PermissionError is new to Python 3, but corresponds to the EACESS and # PermissionError is new to Python 3, but corresponds to the EACESS and
# EPERM error numbers. Use those instead here for PY2 compatibility. # EPERM error numbers. Use those instead here for PY2 compatibility.
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index aa04a7a7ac..889fb90074 100644 index 7153a078f4..09e197a2e4 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -1117,51 +1117,6 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -1317,51 +1317,6 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
'uuid': '' 'uuid': ''
}) })
@ -100,6 +100,6 @@ index aa04a7a7ac..889fb90074 100644
@skipIf(six.PY2, 'UnicodeDecodeError is throw in Python 3') @skipIf(six.PY2, 'UnicodeDecodeError is throw in Python 3')
@patch('os.path.exists') @patch('os.path.exists')
-- --
2.23.0 2.16.4

View File

@ -1,4 +1,4 @@
From f667d6f0534498e2aaa6e46242727bafc13241fd Mon Sep 17 00:00:00 2001 From db65ebf356238c151af7798ed34684847ed4a5c0 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Wed, 31 Jul 2019 15:29:03 +0200 Date: Wed, 31 Jul 2019 15:29:03 +0200
Subject: [PATCH] Fix aptpkg systemd call (bsc#1143301) Subject: [PATCH] Fix aptpkg systemd call (bsc#1143301)
@ -35,6 +35,6 @@ index 580b840197..06f3a9f6aa 100644
def test_call_apt_with_kwargs(self): def test_call_apt_with_kwargs(self):
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From 2dcee9c2773f588cc5ca040b1d22c1e8036dcbf7 Mon Sep 17 00:00:00 2001 From 2fe38d075efce89dd94c1088ab8c97656e589c8f Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Tue, 7 May 2019 12:24:35 +0200 Date: Tue, 7 May 2019 12:24:35 +0200
Subject: [PATCH] Fix async-batch multiple done events Subject: [PATCH] Fix async-batch multiple done events
@ -133,6 +133,6 @@ index d519157d92..441f9c58b9 100644
+ self.batch.schedule_next() + 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.call_later.mock_calls), 0)
-- --
2.21.0 2.16.4

View File

@ -1,12 +1,12 @@
From 33c5e10c2912f584243d29c764c2c6cca86edf4a Mon Sep 17 00:00:00 2001 From 2c1311f544950fe417fb8609aa3a30da32656637 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 11 Apr 2019 15:57:59 +0200 Date: Thu, 11 Apr 2019 15:57:59 +0200
Subject: [PATCH] Fix async batch race conditions Subject: [PATCH] Fix async batch race conditions
Close batching when there is no next batch Close batching when there is no next batch
--- ---
salt/cli/batch_async.py | 80 +++++++++++++++--------------- salt/cli/batch_async.py | 80 +++++++++++++++++++-------------------
tests/unit/cli/test_batch_async.py | 35 ++++++------- tests/unit/cli/test_batch_async.py | 35 +++++++----------
2 files changed, 54 insertions(+), 61 deletions(-) 2 files changed, 54 insertions(+), 61 deletions(-)
diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py
@ -248,6 +248,6 @@ index f65b6a06c3..d519157d92 100644
@tornado.testing.gen_test @tornado.testing.gen_test
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 30a4053231cf67f486ca1f430dce563f7247d963 Mon Sep 17 00:00:00 2001 From bff330bce4b6e8a848400417c5858ece1dc7b5cf Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Thu, 14 Dec 2017 16:21:40 +0100 Date: Thu, 14 Dec 2017 16:21:40 +0100
Subject: [PATCH] Fix bsc#1065792 Subject: [PATCH] Fix bsc#1065792
@ -8,7 +8,7 @@ Subject: [PATCH] Fix bsc#1065792
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/salt/states/service.py b/salt/states/service.py diff --git a/salt/states/service.py b/salt/states/service.py
index c5bf3f2d54..a5ec426ec4 100644 index a0e553ead9..1fdcf126ff 100644
--- a/salt/states/service.py --- a/salt/states/service.py
+++ b/salt/states/service.py +++ b/salt/states/service.py
@@ -80,6 +80,7 @@ def __virtual__(): @@ -80,6 +80,7 @@ def __virtual__():
@ -20,6 +20,6 @@ index c5bf3f2d54..a5ec426ec4 100644
return __virtualname__ return __virtualname__
else: else:
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From 8378bb24a5a53973e8dba7658b8b3465d967329f Mon Sep 17 00:00:00 2001 From 927cef6dfa547bf2410740a8c8b41a97492510f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Fri, 4 Oct 2019 15:00:50 +0100 Date: Fri, 4 Oct 2019 15:00:50 +0100
@ -6,7 +6,7 @@ Subject: [PATCH] Fix failing unit tests for batch async
--- ---
salt/cli/batch_async.py | 2 +- salt/cli/batch_async.py | 2 +-
tests/unit/cli/test_batch_async.py | 57 +++++++++++++++++------------- tests/unit/cli/test_batch_async.py | 57 ++++++++++++++++++++++----------------
2 files changed, 34 insertions(+), 25 deletions(-) 2 files changed, 34 insertions(+), 25 deletions(-)
diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py
@ -180,6 +180,6 @@ index 441f9c58b9..12dfe543bc 100644
- self.assertEqual(len(self.batch.event.io_loop.call_later.mock_calls), 0) - 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) + self.assertEqual(len(self.batch.event.io_loop.spawn_callback.mock_calls), 0)
-- --
2.22.0 2.16.4

View File

@ -0,0 +1,31 @@
From f114484307a2b8a3cf72bef28febe44e73b498ed Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de>
Date: Thu, 28 Nov 2019 15:23:36 +0100
Subject: [PATCH] Fix for log checking in x509 test
We are logging in debug and not in trace mode here.
---
tests/unit/modules/test_x509.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/unit/modules/test_x509.py b/tests/unit/modules/test_x509.py
index 7030f96484..143abe82bf 100644
--- a/tests/unit/modules/test_x509.py
+++ b/tests/unit/modules/test_x509.py
@@ -71,9 +71,9 @@ class X509TestCase(TestCase, LoaderModuleMockMixin):
subj = FakeSubject()
x509._parse_subject(subj)
- assert x509.log.trace.call_args[0][0] == "Missing attribute '%s'. Error: %s"
- assert x509.log.trace.call_args[0][1] == list(subj.nid.keys())[0]
- assert isinstance(x509.log.trace.call_args[0][2], TypeError)
+ assert x509.log.debug.call_args[0][0] == "Missing attribute '%s'. Error: %s"
+ assert x509.log.debug.call_args[0][1] == list(subj.nid.keys())[0]
+ assert isinstance(x509.log.debug.call_args[0][2], TypeError)
@skipIf(not HAS_M2CRYPTO, 'Skipping, M2Crypto is unavailble')
def test_get_pem_entry(self):
--
2.16.4

View File

@ -1,4 +1,4 @@
From 7e4c53ab89927b6b700603a74131da318c93b957 Mon Sep 17 00:00:00 2001 From 56dde3e54715bd488e4110955ca066d9661512bf Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de> From: Jochen Breuer <jbreuer@suse.de>
Date: Fri, 25 Oct 2019 16:18:58 +0200 Date: Fri, 25 Oct 2019 16:18:58 +0200
Subject: [PATCH] Fix for older mock module Subject: [PATCH] Fix for older mock module

View File

@ -1,4 +1,4 @@
From 616750ad4b2b2b8d55d19b81500dbd4f0aba1f74 Mon Sep 17 00:00:00 2001 From 0c16dd5a3c7bef0fe980ac8517f099a8e034c6c9 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de> From: Jochen Breuer <jbreuer@suse.de>
Date: Thu, 6 Sep 2018 17:15:18 +0200 Date: Thu, 6 Sep 2018 17:15:18 +0200
Subject: [PATCH] Fix for SUSE Expanded Support detection Subject: [PATCH] Fix for SUSE Expanded Support detection
@ -14,10 +14,10 @@ This change also adds a check for redhat-release and then marks the
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index f0f1bd17c4..b2c1d475b0 100644 index 04c1ae91b5..82cd3fb657 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -1821,6 +1821,15 @@ def os_data(): @@ -1873,6 +1873,15 @@ def os_data():
log.trace('Parsing distrib info from /etc/centos-release') log.trace('Parsing distrib info from /etc/centos-release')
# CentOS Linux # CentOS Linux
grains['lsb_distrib_id'] = 'CentOS' grains['lsb_distrib_id'] = 'CentOS'
@ -34,6 +34,6 @@ index f0f1bd17c4..b2c1d475b0 100644
for line in ifile: for line in ifile:
# Need to pull out the version and codename # Need to pull out the version and codename
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 6747243babde058762428f9bdb0e3ef16402eadd Mon Sep 17 00:00:00 2001 From 31b9186f48ac37e2b814b8db61ec1d5a5868659f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Tue, 6 Nov 2018 16:38:54 +0000 Date: Tue, 6 Nov 2018 16:38:54 +0000
@ -11,14 +11,14 @@ Test git ext_pillar across multiple repos using __env__
Remove unicode references Remove unicode references
--- ---
tests/integration/pillar/test_git_pillar.py | 45 +++++++++++++++++++++ tests/integration/pillar/test_git_pillar.py | 45 +++++++++++++++++++++++++++++
1 file changed, 45 insertions(+) 1 file changed, 45 insertions(+)
diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py diff --git a/tests/integration/pillar/test_git_pillar.py b/tests/integration/pillar/test_git_pillar.py
index 5d9a374f6e..4a9553d1a1 100644 index 9ade88840b..ab3b1a89cf 100644
--- a/tests/integration/pillar/test_git_pillar.py --- a/tests/integration/pillar/test_git_pillar.py
+++ b/tests/integration/pillar/test_git_pillar.py +++ b/tests/integration/pillar/test_git_pillar.py
@@ -1361,6 +1361,51 @@ class TestPygit2SSH(GitPillarSSHTestBase): @@ -1388,6 +1388,51 @@ class TestPygit2SSH(GitPillarSSHTestBase):
'nested_dict': {'master': True}}} 'nested_dict': {'master': True}}}
) )
@ -71,6 +71,6 @@ index 5d9a374f6e..4a9553d1a1 100644
def test_root_parameter(self, grains): def test_root_parameter(self, grains):
''' '''
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From b6d47a2ca7f1bed902dfc6574e6fe91d3034aa29 Mon Sep 17 00:00:00 2001 From 682964fe1cb3fc859eb72da524beaeb2a85ff610 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 28 Sep 2018 15:22:33 +0200 Date: Fri, 28 Sep 2018 15:22:33 +0200
Subject: [PATCH] Fix IPv6 scope (bsc#1108557) Subject: [PATCH] Fix IPv6 scope (bsc#1108557)
@ -69,11 +69,11 @@ Lintfix: W0611
Reverse skipping tests: if no ipaddress Reverse skipping tests: if no ipaddress
--- ---
salt/_compat.py | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ salt/_compat.py | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+) 1 file changed, 74 insertions(+)
diff --git a/salt/_compat.py b/salt/_compat.py diff --git a/salt/_compat.py b/salt/_compat.py
index c10b82c0c2..8628833dcf 100644 index ed6f4a38ea..61842b4bf3 100644
--- a/salt/_compat.py --- a/salt/_compat.py
+++ b/salt/_compat.py +++ b/salt/_compat.py
@@ -229,7 +229,81 @@ class IPv6InterfaceScoped(ipaddress.IPv6Interface, IPv6AddressScoped): @@ -229,7 +229,81 @@ class IPv6InterfaceScoped(ipaddress.IPv6Interface, IPv6AddressScoped):
@ -159,6 +159,6 @@ index c10b82c0c2..8628833dcf 100644
+ ipaddress.ip_address = ip_address + ipaddress.ip_address = ip_address
+ ipaddress.ip_interface = ip_interface + ipaddress.ip_interface = ip_interface
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 3be2bb0043f15af468f1db33b1aa1cc6f2e5797d Mon Sep 17 00:00:00 2001 From f81e6022b51b10406e52401fc75d7ef1ae93c55d Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Wed, 9 Jan 2019 16:08:19 +0100 Date: Wed, 9 Jan 2019 16:08:19 +0100
Subject: [PATCH] Fix issue #2068 test Subject: [PATCH] Fix issue #2068 test
@ -13,7 +13,7 @@ Minor update: more correct is-dict check.
1 file changed, 6 insertions(+), 3 deletions(-) 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/salt/state.py b/salt/state.py diff --git a/salt/state.py b/salt/state.py
index 91985c8edc..01ec1faf8b 100644 index c3119b6a33..6af1b89037 100644
--- a/salt/state.py --- a/salt/state.py
+++ b/salt/state.py +++ b/salt/state.py
@@ -25,6 +25,7 @@ import traceback @@ -25,6 +25,7 @@ import traceback
@ -47,6 +47,6 @@ index 91985c8edc..01ec1faf8b 100644
def call_high(self, high, orchestration_jid=None): def call_high(self, high, orchestration_jid=None):
''' '''
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 8941de5a64b6330c6a814059e6e337f7ad3aa6cd Mon Sep 17 00:00:00 2001 From d6432f9ebaba32f75a476a6d4a2989d54d149731 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Mon, 16 Sep 2019 11:27:30 +0200 Date: Mon, 16 Sep 2019 11:27:30 +0200
Subject: [PATCH] Fix memory leak produced by batch async find_jobs Subject: [PATCH] Fix memory leak produced by batch async find_jobs
@ -16,7 +16,7 @@ Multiple fixes:
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com> Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
--- ---
salt/cli/batch_async.py | 60 +++++++++++++++++++++++++++-------------- salt/cli/batch_async.py | 60 ++++++++++++++++++++++++++++++++-----------------
salt/client/__init__.py | 1 + salt/client/__init__.py | 1 +
salt/master.py | 1 - salt/master.py | 1 -
3 files changed, 41 insertions(+), 21 deletions(-) 3 files changed, 41 insertions(+), 21 deletions(-)
@ -165,10 +165,10 @@ index aff354a021..0bb6d2b111 100644
# if kwargs are passed, pack them. # if kwargs are passed, pack them.
diff --git a/salt/master.py b/salt/master.py diff --git a/salt/master.py b/salt/master.py
index f08c126280..0e4bba0505 100644 index ee968410f7..224725a1ba 100644
--- a/salt/master.py --- a/salt/master.py
+++ b/salt/master.py +++ b/salt/master.py
@@ -2043,7 +2043,6 @@ class ClearFuncs(object): @@ -2044,7 +2044,6 @@ class ClearFuncs(object):
def publish_batch(self, clear_load, minions, missing): def publish_batch(self, clear_load, minions, missing):
batch_load = {} batch_load = {}
batch_load.update(clear_load) batch_load.update(clear_load)
@ -177,6 +177,6 @@ index f08c126280..0e4bba0505 100644
self.local.opts, self.local.opts,
functools.partial(self._prep_jid, clear_load, {}), functools.partial(self._prep_jid, clear_load, {}),
-- --
2.23.0 2.16.4

View File

@ -1,26 +0,0 @@
From 0b15fe1ecc3ed468714a5a8d84787ab23ac6144e Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 2 May 2019 10:50:17 +0200
Subject: [PATCH] Fix syndic start issue
---
salt/utils/event.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/utils/event.py b/salt/utils/event.py
index d2700bd2a0..160cba9bde 100644
--- a/salt/utils/event.py
+++ b/salt/utils/event.py
@@ -879,7 +879,7 @@ class SaltEvent(object):
self.subscriber.callbacks.add(event_handler)
if not self.subscriber.reading:
# This will handle reconnects
- self.subscriber.read_async()
+ return self.subscriber.read_async()
def __del__(self):
# skip exceptions in destroy-- since destroy() doesn't cover interpreter
--
2.20.1

View File

@ -1,4 +1,4 @@
From 7ffa39cd80393f2a3ed5cd75793b134b9d939cf9 Mon Sep 17 00:00:00 2001 From 91a864f7613927e47b9271bf0f947cf96a3bbfbf Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Thu, 11 Oct 2018 16:20:40 +0200 Date: Thu, 11 Oct 2018 16:20:40 +0200
Subject: [PATCH] Fix unit test for grains core Subject: [PATCH] Fix unit test for grains core
@ -8,10 +8,10 @@ Subject: [PATCH] Fix unit test for grains core
1 file changed, 5 insertions(+), 6 deletions(-) 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index 2ab32ef41b..4923ee00b0 100644 index 8c45ee194a..c85225e959 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -62,11 +62,10 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -68,11 +68,10 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
def test_parse_etc_os_release(self, path_isfile_mock): def test_parse_etc_os_release(self, path_isfile_mock):
path_isfile_mock.side_effect = lambda x: x == "/usr/lib/os-release" path_isfile_mock.side_effect = lambda x: x == "/usr/lib/os-release"
with salt.utils.files.fopen(os.path.join(OS_RELEASE_DIR, "ubuntu-17.10")) as os_release_file: with salt.utils.files.fopen(os.path.join(OS_RELEASE_DIR, "ubuntu-17.10")) as os_release_file:
@ -27,7 +27,7 @@ index 2ab32ef41b..4923ee00b0 100644
self.assertEqual(os_release, { self.assertEqual(os_release, {
"NAME": "Ubuntu", "NAME": "Ubuntu",
"VERSION": "17.10 (Artful Aardvark)", "VERSION": "17.10 (Artful Aardvark)",
@@ -128,7 +127,7 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -134,7 +133,7 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
def test_missing_os_release(self): def test_missing_os_release(self):
with patch('salt.utils.files.fopen', mock_open(read_data={})): with patch('salt.utils.files.fopen', mock_open(read_data={})):
@ -35,8 +35,8 @@ index 2ab32ef41b..4923ee00b0 100644
+ os_release = core._parse_os_release(['/etc/os-release', '/usr/lib/os-release']) + os_release = core._parse_os_release(['/etc/os-release', '/usr/lib/os-release'])
self.assertEqual(os_release, {}) self.assertEqual(os_release, {})
@skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') @skipIf(not salt.utils.platform.is_windows(), 'System is not Windows')
-- --
2.19.0 2.16.4

View File

@ -1,4 +1,4 @@
From 4ce0bc544174fdb00482db4653fb4b0ef411e78b Mon Sep 17 00:00:00 2001 From ab55daa8b642f7b7fde589f971bb078eea098059 Mon Sep 17 00:00:00 2001
From: Cedric Bosdonnat <cbosdonnat@suse.com> From: Cedric Bosdonnat <cbosdonnat@suse.com>
Date: Tue, 3 Sep 2019 15:18:04 +0200 Date: Tue, 3 Sep 2019 15:18:04 +0200
Subject: [PATCH] Fix virt.full_info (#176) Subject: [PATCH] Fix virt.full_info (#176)
@ -45,7 +45,7 @@ already used like by a running VM. Using the qemu-img -U flag gets it
running in all cases. running in all cases.
--- ---
salt/modules/virt.py | 10 +- salt/modules/virt.py | 10 +-
tests/unit/modules/test_virt.py | 242 +++++++++++++++++--------------- tests/unit/modules/test_virt.py | 242 +++++++++++++++++++++-------------------
2 files changed, 132 insertions(+), 120 deletions(-) 2 files changed, 132 insertions(+), 120 deletions(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py diff --git a/salt/modules/virt.py b/salt/modules/virt.py
@ -369,6 +369,6 @@ index e644e62452..4d20e998d8 100644
+ self.assertEqual('5900', graphics['port']) + self.assertEqual('5900', graphics['port'])
+ self.assertEqual('0.0.0.0', graphics['listen']) + self.assertEqual('0.0.0.0', graphics['listen'])
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 8c4066c668147b1180c56f39722d2ade78ffd41c Mon Sep 17 00:00:00 2001 From 10c3c47a4c6ae173e2831d4256b8d8af6b33cf5a Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 13 Jun 2019 17:48:55 +0200 Date: Thu, 13 Jun 2019 17:48:55 +0200
Subject: [PATCH] Fix zypper pkg.list_pkgs expectation and dpkg mocking Subject: [PATCH] Fix zypper pkg.list_pkgs expectation and dpkg mocking
@ -52,6 +52,6 @@ index 5c5091a570..a7063e47c6 100644
'release': '1.1', 'release': '1.1',
'arch': 'i586', 'arch': 'i586',
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From 3b5803d31a93d2f619246d48691f52f6c65d52ee Mon Sep 17 00:00:00 2001 From 3b85fa4cadc10881f2408e95700f7a6dae35ce21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 25 Jun 2018 13:06:40 +0100 Date: Mon, 25 Jun 2018 13:06:40 +0100
@ -53,6 +53,6 @@ index 2034262b23..0aca1e0af8 100644
cver = new_pkgs.get(pkgname) cver = new_pkgs.get(pkgname)
if not cver and pkgname in new_caps: if not cver and pkgname in new_caps:
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From b10ca8ee857e14915ac83a8614521495b42b5d2b Mon Sep 17 00:00:00 2001 From b9185139c688999c10ed90ca96120c6dad597666 Mon Sep 17 00:00:00 2001
From: Erik Johnson <palehose@gmail.com> From: Erik Johnson <palehose@gmail.com>
Date: Fri, 24 Aug 2018 10:35:55 -0500 Date: Fri, 24 Aug 2018 10:35:55 -0500
Subject: [PATCH] Fixes: CVE-2018-15750, CVE-2018-15751 Subject: [PATCH] Fixes: CVE-2018-15750, CVE-2018-15751
@ -16,7 +16,7 @@ Update tornado test to correct authentication message
2 files changed, 2 insertions(+), 9 deletions(-) 2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py diff --git a/salt/netapi/rest_cherrypy/app.py b/salt/netapi/rest_cherrypy/app.py
index 40ee976b25..f9ca908115 100644 index 82615afb29..d230d822cd 100644
--- a/salt/netapi/rest_cherrypy/app.py --- a/salt/netapi/rest_cherrypy/app.py
+++ b/salt/netapi/rest_cherrypy/app.py +++ b/salt/netapi/rest_cherrypy/app.py
@@ -1174,13 +1174,6 @@ class LowDataAdapter(object): @@ -1174,13 +1174,6 @@ class LowDataAdapter(object):
@ -34,10 +34,10 @@ index 40ee976b25..f9ca908115 100644
chunk['client'] = client chunk['client'] = client
diff --git a/tests/integration/netapi/rest_tornado/test_app.py b/tests/integration/netapi/rest_tornado/test_app.py diff --git a/tests/integration/netapi/rest_tornado/test_app.py b/tests/integration/netapi/rest_tornado/test_app.py
index a6829bdd4f..da96012b41 100644 index 2c348a679d..40cf1ce580 100644
--- a/tests/integration/netapi/rest_tornado/test_app.py --- a/tests/integration/netapi/rest_tornado/test_app.py
+++ b/tests/integration/netapi/rest_tornado/test_app.py +++ b/tests/integration/netapi/rest_tornado/test_app.py
@@ -240,8 +240,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase): @@ -276,8 +276,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase):
self.assertIn('jid', ret[0]) # the first 2 are regular returns self.assertIn('jid', ret[0]) # the first 2 are regular returns
self.assertIn('jid', ret[1]) self.assertIn('jid', ret[1])
self.assertIn('Failed to authenticate', ret[2]) # bad auth self.assertIn('Failed to authenticate', ret[2]) # bad auth
@ -49,6 +49,6 @@ index a6829bdd4f..da96012b41 100644
def test_simple_local_async_post_no_tgt(self): def test_simple_local_async_post_no_tgt(self):
low = [{'client': 'local_async', low = [{'client': 'local_async',
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 11c9eacc439697e9fa7b30918963e4736333ed36 Mon Sep 17 00:00:00 2001 From 9fc2217cd12d313f87d4db0e408e5b68b23c2330 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Wed, 14 Nov 2018 17:36:23 +0100 Date: Wed, 14 Nov 2018 17:36:23 +0100
Subject: [PATCH] Get os_arch also without RPM package installed Subject: [PATCH] Get os_arch also without RPM package installed
@ -17,8 +17,8 @@ Add UT for OS arch detection when no CPU arch or machine can be determined
Remove unsupported testcase Remove unsupported testcase
--- ---
salt/utils/pkg/rpm.py | 18 ++++-- salt/utils/pkg/rpm.py | 18 +++++---
tests/unit/utils/test_pkg.py | 105 ++++++++++++++++++++++------------- tests/unit/utils/test_pkg.py | 105 ++++++++++++++++++++++++++-----------------
2 files changed, 77 insertions(+), 46 deletions(-) 2 files changed, 77 insertions(+), 46 deletions(-)
diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py diff --git a/salt/utils/pkg/rpm.py b/salt/utils/pkg/rpm.py
@ -176,6 +176,6 @@ index c293852058..361e0bf92f 100644
+ ''' + '''
+ assert rpm.get_osarch() == 'unknown' + assert rpm.get_osarch() == 'unknown'
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 76d0ec5ec0764f6c5e71ddc2dc03bd12c25045a0 Mon Sep 17 00:00:00 2001 From a94e1316565a30e166a5a846404fd2c2bd85e2ca Mon Sep 17 00:00:00 2001
From: EricS <54029547+ESiebigteroth@users.noreply.github.com> From: EricS <54029547+ESiebigteroth@users.noreply.github.com>
Date: Tue, 3 Sep 2019 11:22:53 +0200 Date: Tue, 3 Sep 2019 11:22:53 +0200
Subject: [PATCH] Implement network.fqdns module function (bsc#1134860) Subject: [PATCH] Implement network.fqdns module function (bsc#1134860)
@ -12,20 +12,20 @@ Subject: [PATCH] Implement network.fqdns module function (bsc#1134860)
Co-authored-by: Eric Siebigteroth <eric.siebigteroth@suse.de> Co-authored-by: Eric Siebigteroth <eric.siebigteroth@suse.de>
--- ---
salt/grains/core.py | 66 +++++----------------------------- salt/grains/core.py | 66 +++++-------------------------------------
salt/modules/network.py | 60 +++++++++++++++++++++++++++++++ salt/modules/network.py | 60 ++++++++++++++++++++++++++++++++++++++
salt/utils/network.py | 12 +++++++ salt/utils/network.py | 12 ++++++++
tests/unit/grains/test_core.py | 64 ++++++++++++++++++++++++++------- tests/unit/grains/test_core.py | 64 +++++++++++++++++++++++++++++++---------
4 files changed, 131 insertions(+), 71 deletions(-) 4 files changed, 131 insertions(+), 71 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index e54212edfb..fa188a6ff7 100644 index 30eba0ce99..e1d08b76cf 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -25,8 +25,9 @@ import zlib @@ -26,8 +26,9 @@ from errno import EACCES, EPERM
from errno import EACCES, EPERM
import datetime import datetime
import warnings import warnings
import time
+import salt.modules.network +import salt.modules.network
-from multiprocessing.pool import ThreadPool -from multiprocessing.pool import ThreadPool
@ -33,7 +33,7 @@ index e54212edfb..fa188a6ff7 100644
# pylint: disable=import-error # pylint: disable=import-error
try: try:
@@ -83,6 +84,7 @@ __salt__ = { @@ -84,6 +85,7 @@ __salt__ = {
'cmd.run_all': salt.modules.cmdmod._run_all_quiet, 'cmd.run_all': salt.modules.cmdmod._run_all_quiet,
'smbios.records': salt.modules.smbios.records, 'smbios.records': salt.modules.smbios.records,
'smbios.get': salt.modules.smbios.get, 'smbios.get': salt.modules.smbios.get,
@ -41,7 +41,7 @@ index e54212edfb..fa188a6ff7 100644
} }
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@@ -106,7 +108,6 @@ HAS_UNAME = True @@ -107,7 +109,6 @@ HAS_UNAME = True
if not hasattr(os, 'uname'): if not hasattr(os, 'uname'):
HAS_UNAME = False HAS_UNAME = False
@ -49,7 +49,7 @@ index e54212edfb..fa188a6ff7 100644
# Possible value for h_errno defined in netdb.h # Possible value for h_errno defined in netdb.h
HOST_NOT_FOUND = 1 HOST_NOT_FOUND = 1
@@ -1506,17 +1507,6 @@ def _linux_bin_exists(binary): @@ -1538,17 +1539,6 @@ def _linux_bin_exists(binary):
return False return False
@ -67,7 +67,7 @@ index e54212edfb..fa188a6ff7 100644
def _parse_lsb_release(): def _parse_lsb_release():
ret = {} ret = {}
try: try:
@@ -2200,52 +2190,12 @@ def fqdns(): @@ -2255,52 +2245,12 @@ def fqdns():
''' '''
Return all known FQDNs for the system by enumerating all interfaces and Return all known FQDNs for the system by enumerating all interfaces and
then trying to reverse resolve them (excluding 'lo' interface). then trying to reverse resolve them (excluding 'lo' interface).
@ -88,9 +88,9 @@ index e54212edfb..fa188a6ff7 100644
- # No FQDN for this IP address, so we don't need to know this all the time. - # No FQDN for this IP address, so we don't need to know this all the time.
- log.debug("Unable to resolve address %s: %s", ip, err) - log.debug("Unable to resolve address %s: %s", ip, err)
- else: - else:
- log.error(err_message, err) - log.error(err_message, ip, err)
- except (socket.error, socket.gaierror, socket.timeout) as err: - except (socket.error, socket.gaierror, socket.timeout) as err:
- log.error(err_message, err) - log.error(err_message, ip, err)
- -
- start = time.time() - start = time.time()
- -
@ -126,7 +126,7 @@ index e54212edfb..fa188a6ff7 100644
def ip_fqdn(): def ip_fqdn():
diff --git a/salt/modules/network.py b/salt/modules/network.py diff --git a/salt/modules/network.py b/salt/modules/network.py
index 28bcff1622..5b6ac930ea 100644 index 8b4dfcead4..2f1b1c09e0 100644
--- a/salt/modules/network.py --- a/salt/modules/network.py
+++ b/salt/modules/network.py +++ b/salt/modules/network.py
@@ -11,6 +11,10 @@ import logging @@ -11,6 +11,10 @@ import logging
@ -140,7 +140,7 @@ index 28bcff1622..5b6ac930ea 100644
# Import salt libs # Import salt libs
import salt.utils.decorators.path import salt.utils.decorators.path
@@ -1881,3 +1885,59 @@ def iphexval(ip): @@ -1887,3 +1891,59 @@ def iphexval(ip):
a = ip.split('.') a = ip.split('.')
hexval = ['%02X' % int(x) for x in a] # pylint: disable=E1321 hexval = ['%02X' % int(x) for x in a] # pylint: disable=E1321
return ''.join(hexval) return ''.join(hexval)
@ -202,7 +202,7 @@ index 28bcff1622..5b6ac930ea 100644
+ return {"fqdns": sorted(list(fqdns))} + return {"fqdns": sorted(list(fqdns))}
\ No newline at end of file \ No newline at end of file
diff --git a/salt/utils/network.py b/salt/utils/network.py diff --git a/salt/utils/network.py b/salt/utils/network.py
index 3f0522b9a5..942adf1ca4 100644 index a3fd6e848e..3c8178eeb4 100644
--- a/salt/utils/network.py --- a/salt/utils/network.py
+++ b/salt/utils/network.py +++ b/salt/utils/network.py
@@ -55,6 +55,18 @@ except (ImportError, OSError, AttributeError, TypeError): @@ -55,6 +55,18 @@ except (ImportError, OSError, AttributeError, TypeError):
@ -225,10 +225,10 @@ index 3f0522b9a5..942adf1ca4 100644
''' '''
Sanitize host string. Sanitize host string.
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index 5fa0ea06f1..889fb90074 100644 index af9d27dd0e..09e197a2e4 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -33,6 +33,7 @@ import salt.utils.network @@ -34,6 +34,7 @@ import salt.utils.network
import salt.utils.platform import salt.utils.platform
import salt.utils.path import salt.utils.path
import salt.grains.core as core import salt.grains.core as core
@ -236,7 +236,7 @@ index 5fa0ea06f1..889fb90074 100644
# Import 3rd-party libs # Import 3rd-party libs
from salt.ext import six from salt.ext import six
@@ -845,6 +846,40 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -976,6 +977,40 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
with patch.object(salt.utils.dns, 'parse_resolv', MagicMock(return_value=resolv_mock)): with patch.object(salt.utils.dns, 'parse_resolv', MagicMock(return_value=resolv_mock)):
assert core.dns() == ret assert core.dns() == ret
@ -277,7 +277,7 @@ index 5fa0ea06f1..889fb90074 100644
@skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux')
@patch.object(salt.utils, 'is_windows', MagicMock(return_value=False)) @patch.object(salt.utils, 'is_windows', MagicMock(return_value=False))
@patch('salt.utils.network.ip_addrs', MagicMock(return_value=['1.2.3.4', '5.6.7.8'])) @patch('salt.utils.network.ip_addrs', MagicMock(return_value=['1.2.3.4', '5.6.7.8']))
@@ -861,11 +896,12 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -992,11 +1027,12 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']), ('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']),
('bluesniff.foo.bar', [], ['fe80::a8b2:93ff:dead:beef'])] ('bluesniff.foo.bar', [], ['fe80::a8b2:93ff:dead:beef'])]
ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']} ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']}
@ -295,7 +295,7 @@ index 5fa0ea06f1..889fb90074 100644
@skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux')
@patch.object(salt.utils.platform, 'is_windows', MagicMock(return_value=False)) @patch.object(salt.utils.platform, 'is_windows', MagicMock(return_value=False))
@@ -881,14 +917,16 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -1012,14 +1048,16 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
('rinzler.evil-corp.com', ["false-hostname", "badaliass"], ['5.6.7.8']), ('rinzler.evil-corp.com', ["false-hostname", "badaliass"], ['5.6.7.8']),
('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']), ('foo.bar.baz', [], ['fe80::a8b2:93ff:fe00:0']),
('bluesniff.foo.bar', ["alias.bluesniff.foo.bar"], ['fe80::a8b2:93ff:dead:beef'])] ('bluesniff.foo.bar', ["alias.bluesniff.foo.bar"], ['fe80::a8b2:93ff:dead:beef'])]
@ -321,6 +321,6 @@ index 5fa0ea06f1..889fb90074 100644
''' '''
test virtual grain with cmd virt-what test virtual grain with cmd virt-what
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From 002543df392f65d95dbc127dc058ac897f2035ed Mon Sep 17 00:00:00 2001 From c54cdb24f09abf990fc23aa35a763c1ec3bd122a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Thu, 26 Sep 2019 10:41:06 +0100 Date: Thu, 26 Sep 2019 10:41:06 +0100
@ -6,7 +6,7 @@ Subject: [PATCH] Improve batch_async to release consumed memory
(bsc#1140912) (bsc#1140912)
--- ---
salt/cli/batch_async.py | 73 +++++++++++++++++++++++++---------------- salt/cli/batch_async.py | 73 ++++++++++++++++++++++++++++++-------------------
1 file changed, 45 insertions(+), 28 deletions(-) 1 file changed, 45 insertions(+), 28 deletions(-)
diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py diff --git a/salt/cli/batch_async.py b/salt/cli/batch_async.py
@ -185,6 +185,6 @@ index 8a67331102..2bb50459c8 100644
+ self.ioloop = None + self.ioloop = None
+ gc.collect() + gc.collect()
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From 5dc6f2a59a8a774d13dcfd36b25ea735df18f10f Mon Sep 17 00:00:00 2001 From 83fa749ca09eb8eb5eb29aaa30f8565106ee3c65 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Tue, 29 Jan 2019 11:11:38 +0100 Date: Tue, 29 Jan 2019 11:11:38 +0100
Subject: [PATCH] Include aliases in the fqdns grains Subject: [PATCH] Include aliases in the fqdns grains
@ -15,17 +15,17 @@ Add UT for fqdns aliases
Leverage cached interfaces, if any. Leverage cached interfaces, if any.
--- ---
salt/grains/core.py | 12 +++++------- salt/grains/core.py | 14 ++++++--------
salt/utils/network.py | 12 ++++++++++++ salt/utils/network.py | 12 ++++++++++++
tests/unit/grains/test_core.py | 28 +++++++++++++++++++++++++--- tests/unit/grains/test_core.py | 28 +++++++++++++++++++++++++---
tests/unit/utils/test_network.py | 19 +++++++++++++++++++ tests/unit/utils/test_network.py | 19 +++++++++++++++++++
4 files changed, 61 insertions(+), 10 deletions(-) 4 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index b0c1acceeb..05a9d5035d 100644 index f59eeb5780..7d75d48bb5 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -2200,14 +2200,13 @@ def fqdns(): @@ -2255,14 +2255,13 @@ def fqdns():
grains = {} grains = {}
fqdns = set() fqdns = set()
@ -33,9 +33,10 @@ index b0c1acceeb..05a9d5035d 100644
- interface_data=_INTERFACES) - interface_data=_INTERFACES)
- addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False, - addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False,
- interface_data=_INTERFACES)) - interface_data=_INTERFACES))
- err_message = 'An exception occurred resolving address \'%s\': %s'
+ addresses = salt.utils.network.ip_addrs(include_loopback=False, interface_data=_get_interfaces()) + addresses = salt.utils.network.ip_addrs(include_loopback=False, interface_data=_get_interfaces())
+ addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False, interface_data=_get_interfaces())) + addresses.extend(salt.utils.network.ip_addrs6(include_loopback=False, interface_data=_get_interfaces()))
err_message = 'Exception during resolving address: %s' + err_message = 'Exception during resolving address: %s'
for ip in addresses: for ip in addresses:
try: try:
- fqdns.add(socket.getfqdn(socket.gethostbyaddr(ip)[0])) - fqdns.add(socket.getfqdn(socket.gethostbyaddr(ip)[0]))
@ -44,9 +45,9 @@ index b0c1acceeb..05a9d5035d 100644
except socket.herror as err: except socket.herror as err:
if err.errno == 0: if err.errno == 0:
# No FQDN for this IP address, so we don't need to know this all the time. # No FQDN for this IP address, so we don't need to know this all the time.
@@ -2217,8 +2216,7 @@ def fqdns(): @@ -2272,8 +2271,7 @@ def fqdns():
except (socket.error, socket.gaierror, socket.timeout) as err: except (socket.error, socket.gaierror, socket.timeout) as err:
log.error(err_message, err) log.error(err_message, ip, err)
- grains['fqdns'] = sorted(list(fqdns)) - grains['fqdns'] = sorted(list(fqdns))
- return grains - return grains
@ -55,10 +56,10 @@ index b0c1acceeb..05a9d5035d 100644
def ip_fqdn(): def ip_fqdn():
diff --git a/salt/utils/network.py b/salt/utils/network.py diff --git a/salt/utils/network.py b/salt/utils/network.py
index 83269cdcf6..c72d2aec41 100644 index d6fc6a98c6..a183c9776a 100644
--- a/salt/utils/network.py --- a/salt/utils/network.py
+++ b/salt/utils/network.py +++ b/salt/utils/network.py
@@ -2016,3 +2016,15 @@ def parse_host_port(host_port): @@ -2007,3 +2007,15 @@ def parse_host_port(host_port):
raise ValueError('bad hostname: "{}"'.format(host)) raise ValueError('bad hostname: "{}"'.format(host))
return host, port return host, port
@ -75,10 +76,10 @@ index 83269cdcf6..c72d2aec41 100644
+ compliant = re.compile(r"(?!-)[A-Z\d\-\_]{1,63}(?<!-)$", re.IGNORECASE) + compliant = re.compile(r"(?!-)[A-Z\d\-\_]{1,63}(?<!-)$", re.IGNORECASE)
+ return "." in hostname and len(hostname) < 0xff and all(compliant.match(x) for x in hostname.rstrip(".").split(".")) + return "." in hostname and len(hostname) < 0xff and all(compliant.match(x) for x in hostname.rstrip(".").split("."))
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index d5a1b1a36b..117e02c39f 100644 index c85225e959..e43be4939c 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -863,10 +863,32 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -994,10 +994,32 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']} ret = {'fqdns': ['bluesniff.foo.bar', 'foo.bar.baz', 'rinzler.evil-corp.com']}
with patch.object(socket, 'gethostbyaddr', side_effect=reverse_resolv_mock): with patch.object(socket, 'gethostbyaddr', side_effect=reverse_resolv_mock):
fqdns = core.fqdns() fqdns = core.fqdns()
@ -115,13 +116,13 @@ index d5a1b1a36b..117e02c39f 100644
''' '''
test virtual grain with cmd virt-what test virtual grain with cmd virt-what
diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py diff --git a/tests/unit/utils/test_network.py b/tests/unit/utils/test_network.py
index 3d20c880bd..ca627777a7 100644 index af5cbbab2b..f4c849d124 100644
--- a/tests/unit/utils/test_network.py --- a/tests/unit/utils/test_network.py
+++ b/tests/unit/utils/test_network.py +++ b/tests/unit/utils/test_network.py
@@ -637,3 +637,22 @@ class NetworkTestCase(TestCase): @@ -680,3 +680,22 @@ class NetworkTestCase(TestCase):
# An exception is raised if unicode is passed to socket.getfqdn with patch('subprocess.check_output', return_value=NETLINK_SS):
minion_id = network.generate_minion_id() remotes = network._netlink_tool_remote_on('4505', 'remote')
assert minion_id != '', minion_id self.assertEqual(remotes, set(['127.0.0.1', '::ffff:1.2.3.4']))
+ +
+ def test_is_fqdn(self): + def test_is_fqdn(self):
+ """ + """
@ -142,6 +143,6 @@ index 3d20c880bd..ca627777a7 100644
+ for fqdn in ["hostname", "/some/path", "$variable.here", "verylonghostname.{}".format("domain" * 45)]: + for fqdn in ["hostname", "/some/path", "$variable.here", "verylonghostname.{}".format("domain" * 45)]:
+ assert not network.is_fqdn(fqdn) + assert not network.is_fqdn(fqdn)
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 216342f03940080176111f5e0e31b43cd909e164 Mon Sep 17 00:00:00 2001 From 13855ebda730a0a369c9b98d397d62b9d9a67145 Mon Sep 17 00:00:00 2001
From: ed lane <ed.lane.0@gmail.com> From: ed lane <ed.lane.0@gmail.com>
Date: Thu, 30 Aug 2018 06:07:08 -0600 Date: Thu, 30 Aug 2018 06:07:08 -0600
Subject: [PATCH] Integration of MSI authentication with azurearm cloud Subject: [PATCH] Integration of MSI authentication with azurearm cloud
@ -9,7 +9,7 @@ Subject: [PATCH] Integration of MSI authentication with azurearm cloud
1 file changed, 6 insertions(+), 1 deletion(-) 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py
index e8050dca16..229412adcd 100644 index a422feca4f..9948dedc6c 100644
--- a/salt/cloud/clouds/azurearm.py --- a/salt/cloud/clouds/azurearm.py
+++ b/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py
@@ -58,6 +58,9 @@ The Azure ARM cloud module is used to control access to Microsoft Azure Resource @@ -58,6 +58,9 @@ The Azure ARM cloud module is used to control access to Microsoft Azure Resource
@ -41,6 +41,6 @@ index e8050dca16..229412adcd 100644
'client_id', 'client_id',
get_configured_provider(), __opts__, search_global=False get_configured_provider(), __opts__, search_global=False
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 8fe82178247ff3704915b578398ea55b0c6e4fa0 Mon Sep 17 00:00:00 2001 From 0cd0d8d50c500f3d8948470c2ecd5344f9c494a5 Mon Sep 17 00:00:00 2001
From: Joachim Gleissner <jgleissner@suse.com> From: Joachim Gleissner <jgleissner@suse.com>
Date: Tue, 18 Sep 2018 15:07:13 +0200 Date: Tue, 18 Sep 2018 15:07:13 +0200
Subject: [PATCH] loosen azure sdk dependencies in azurearm cloud driver Subject: [PATCH] loosen azure sdk dependencies in azurearm cloud driver
@ -12,7 +12,7 @@ remove unused import from azurearm driver
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py
index 229412adcd..ac59467fb3 100644 index 9948dedc6c..5f0d4b7e6f 100644
--- a/salt/cloud/clouds/azurearm.py --- a/salt/cloud/clouds/azurearm.py
+++ b/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py
@@ -104,6 +104,7 @@ import time @@ -104,6 +104,7 @@ import time
@ -36,6 +36,6 @@ index 229412adcd..ac59467fb3 100644
except ImportError: except ImportError:
pass pass
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 350b0aa4ead80ac50047c08121bc09bddc05341d Mon Sep 17 00:00:00 2001 From 9e543a835c870eaea424735fb8e52a82480dce90 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Fri, 16 Nov 2018 10:54:12 +0100 Date: Fri, 16 Nov 2018 10:54:12 +0100
Subject: [PATCH] Make aptpkg.list_repos compatible on enabled/disabled Subject: [PATCH] Make aptpkg.list_repos compatible on enabled/disabled
@ -9,10 +9,10 @@ Subject: [PATCH] Make aptpkg.list_repos compatible on enabled/disabled
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
index 175ef2ed06..90b99c44b9 100644 index ead7c6391e..6b3a921a82 100644
--- a/salt/modules/aptpkg.py --- a/salt/modules/aptpkg.py
+++ b/salt/modules/aptpkg.py +++ b/salt/modules/aptpkg.py
@@ -1719,6 +1719,7 @@ def list_repos(): @@ -1595,6 +1595,7 @@ def list_repos():
repo['file'] = source.file repo['file'] = source.file
repo['comps'] = getattr(source, 'comps', []) repo['comps'] = getattr(source, 'comps', [])
repo['disabled'] = source.disabled repo['disabled'] = source.disabled
@ -21,6 +21,6 @@ index 175ef2ed06..90b99c44b9 100644
repo['type'] = source.type repo['type'] = source.type
repo['uri'] = source.uri.rstrip('/') repo['uri'] = source.uri.rstrip('/')
-- --
2.19.1 2.16.4

View File

@ -1,4 +1,4 @@
From 155aa52dca9272db492990ad737256dada1c4364 Mon Sep 17 00:00:00 2001 From 117d2af99095cce3c0ab7222d7333334b73aa971 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Mon, 8 Oct 2018 17:52:07 +0200 Date: Mon, 8 Oct 2018 17:52:07 +0200
Subject: [PATCH] Make profiles a package. Subject: [PATCH] Make profiles a package.
@ -22,6 +22,6 @@ index 0000000000..b86aef30b8
+Profiles for salt-support. +Profiles for salt-support.
+''' +'''
-- --
2.19.0 2.16.4

View File

@ -1,30 +0,0 @@
From 215d8d9c8f872b510a1c3fbb19ab4e91bc96bb64 Mon Sep 17 00:00:00 2001
From: Alberto Planas <aplanas@gmail.com>
Date: Thu, 28 Feb 2019 15:45:28 +0100
Subject: [PATCH] mount: fix extra -t parameter
If 'fstype' parameter is not set in Linux environments, salt will
build a mount command with an empty -t value, making the command
fail.
---
salt/modules/mount.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/salt/modules/mount.py b/salt/modules/mount.py
index 4ba370e5b3..e807b1729e 100644
--- a/salt/modules/mount.py
+++ b/salt/modules/mount.py
@@ -1218,7 +1218,8 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util
if fstype:
args += ' -v {0}'.format(fstype)
else:
- args += ' -t {0}'.format(fstype)
+ if fstype:
+ args += ' -t {0}'.format(fstype)
cmd = 'mount {0} {1} {2} '.format(args, device, name)
out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False)
if out['retcode']:
--
2.20.1

View File

@ -1,4 +1,4 @@
From dab9967f8e4a67e5b7ddd4e6718414d2e9b25e42 Mon Sep 17 00:00:00 2001 From 10df6dcff22785962dc372064c899b942f3c1ff9 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Fri, 14 Jun 2019 15:13:12 +0200 Date: Fri, 14 Jun 2019 15:13:12 +0200
Subject: [PATCH] Move server_id deprecation warning to reduce log Subject: [PATCH] Move server_id deprecation warning to reduce log
@ -10,10 +10,10 @@ Subject: [PATCH] Move server_id deprecation warning to reduce log
2 files changed, 9 insertions(+), 4 deletions(-) 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index ce64620a24..e54212edfb 100644 index ab37a4dd44..30eba0ce99 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -2812,10 +2812,6 @@ def get_server_id(): @@ -2867,10 +2867,6 @@ def get_server_id():
if bool(use_crc): if bool(use_crc):
id_hash = getattr(zlib, use_crc, zlib.adler32)(__opts__.get('id', '').encode()) & 0xffffffff id_hash = getattr(zlib, use_crc, zlib.adler32)(__opts__.get('id', '').encode()) & 0xffffffff
else: else:
@ -25,10 +25,10 @@ index ce64620a24..e54212edfb 100644
server_id = {'server_id': id_hash} server_id = {'server_id': id_hash}
diff --git a/salt/minion.py b/salt/minion.py diff --git a/salt/minion.py b/salt/minion.py
index 058b7ef6b8..97f74bf47e 100644 index c5f637eaa6..2c0a18604e 100644
--- a/salt/minion.py --- a/salt/minion.py
+++ b/salt/minion.py +++ b/salt/minion.py
@@ -103,6 +103,7 @@ from salt.utils.odict import OrderedDict @@ -102,6 +102,7 @@ from salt.utils.odict import OrderedDict
from salt.utils.process import (default_signals, from salt.utils.process import (default_signals,
SignalHandlingMultiprocessingProcess, SignalHandlingMultiprocessingProcess,
ProcessManager) ProcessManager)
@ -36,7 +36,7 @@ index 058b7ef6b8..97f74bf47e 100644
from salt.exceptions import ( from salt.exceptions import (
CommandExecutionError, CommandExecutionError,
CommandNotFoundError, CommandNotFoundError,
@@ -992,6 +993,14 @@ class MinionManager(MinionBase): @@ -993,6 +994,14 @@ class MinionManager(MinionBase):
if (self.opts['master_type'] in ('failover', 'distributed')) or not isinstance(self.opts['master'], list): if (self.opts['master_type'] in ('failover', 'distributed')) or not isinstance(self.opts['master'], list):
masters = [masters] masters = [masters]
@ -48,10 +48,10 @@ index 058b7ef6b8..97f74bf47e 100644
+ 'prefer (default "Adler32"). The server_id will be computed with' + 'prefer (default "Adler32"). The server_id will be computed with'
+ 'Adler32 by default.') + 'Adler32 by default.')
+ +
beacons_leader = True
for master in masters: for master in masters:
s_opts = copy.deepcopy(self.opts) s_opts = copy.deepcopy(self.opts)
s_opts['master'] = master
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From 5a1e0b7b8eab900e03fa800cc7a0a2b59bf2ff55 Mon Sep 17 00:00:00 2001 From a83a3a01e3bb16ec7bf4463dea1b4770c4b2955c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 3 Jun 2019 11:38:36 +0100 Date: Mon, 3 Jun 2019 11:38:36 +0100
@ -10,10 +10,10 @@ Subject: [PATCH] Preserve already defined DESTRUCTIVE_TESTS and
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/support/parser/__init__.py b/tests/support/parser/__init__.py diff --git a/tests/support/parser/__init__.py b/tests/support/parser/__init__.py
index ed262d46c0..f269457670 100644 index a188f8945f..2802b20c62 100644
--- a/tests/support/parser/__init__.py --- a/tests/support/parser/__init__.py
+++ b/tests/support/parser/__init__.py +++ b/tests/support/parser/__init__.py
@@ -574,12 +574,12 @@ class SaltTestingParser(optparse.OptionParser): @@ -598,12 +598,12 @@ class SaltTestingParser(optparse.OptionParser):
self.validate_options() self.validate_options()
@ -29,6 +29,6 @@ index ed262d46c0..f269457670 100644
# expensive tests should be executed or not. # expensive tests should be executed or not.
os.environ['EXPENSIVE_TESTS'] = str(self.options.run_expensive) os.environ['EXPENSIVE_TESTS'] = str(self.options.run_expensive)
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 318b4e0cd2efb02f26392bfe2d354a3ff5d21cbc Mon Sep 17 00:00:00 2001 From ae46bb899f3c7d70af62081b2ae0473f07a2a7b9 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Mon, 15 Oct 2018 17:26:16 +0200 Date: Mon, 15 Oct 2018 17:26:16 +0200
Subject: [PATCH] Preserving signature in "module.run" state (U#50049) Subject: [PATCH] Preserving signature in "module.run" state (U#50049)
@ -18,10 +18,10 @@ Replace standalone function with lambda-proxy for signatures only
2 files changed, 32 insertions(+), 2 deletions(-) 2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/salt/states/module.py b/salt/states/module.py diff --git a/salt/states/module.py b/salt/states/module.py
index 2190ffa3d2..90b1d0a5f5 100644 index 9968529ffd..a6096ba35b 100644
--- a/salt/states/module.py --- a/salt/states/module.py
+++ b/salt/states/module.py +++ b/salt/states/module.py
@@ -323,7 +323,7 @@ def _call_function(name, returner=None, **kwargs): @@ -324,7 +324,7 @@ def _call_function(name, returner=None, **kwargs):
# func_args is initialized to a list of positional arguments that the function to be run accepts # func_args is initialized to a list of positional arguments that the function to be run accepts
func_args = argspec.args[:len(argspec.args or []) - len(argspec.defaults or [])] func_args = argspec.args[:len(argspec.args or []) - len(argspec.defaults or [])]
@ -30,7 +30,7 @@ index 2190ffa3d2..90b1d0a5f5 100644
for funcset in reversed(kwargs.get('func_args') or []): for funcset in reversed(kwargs.get('func_args') or []):
if not isinstance(funcset, dict): if not isinstance(funcset, dict):
# We are just receiving a list of args to the function to be run, so just append # We are just receiving a list of args to the function to be run, so just append
@@ -334,13 +334,16 @@ def _call_function(name, returner=None, **kwargs): @@ -335,13 +335,16 @@ def _call_function(name, returner=None, **kwargs):
# We are going to pass in a keyword argument. The trick here is to make certain # We are going to pass in a keyword argument. The trick here is to make certain
# that if we find that in the *args* list that we pass it there and not as a kwarg # that if we find that in the *args* list that we pass it there and not as a kwarg
if kwarg_key in func_args: if kwarg_key in func_args:
@ -49,7 +49,7 @@ index 2190ffa3d2..90b1d0a5f5 100644
_passed_prm = len(arg_type) _passed_prm = len(arg_type)
missing = [] missing = []
diff --git a/tests/unit/states/test_module.py b/tests/unit/states/test_module.py diff --git a/tests/unit/states/test_module.py b/tests/unit/states/test_module.py
index bf4ddcc5b4..25082d4bb4 100644 index b505e85b90..2aff53eeaf 100644
--- a/tests/unit/states/test_module.py --- a/tests/unit/states/test_module.py
+++ b/tests/unit/states/test_module.py +++ b/tests/unit/states/test_module.py
@@ -324,3 +324,30 @@ class ModuleStateTest(TestCase, LoaderModuleMockMixin): @@ -324,3 +324,30 @@ class ModuleStateTest(TestCase, LoaderModuleMockMixin):
@ -84,6 +84,6 @@ index bf4ddcc5b4..25082d4bb4 100644
+ assert module._call_function('testfunc', func_args=[1, 2, 3]) == (1, 2, 3, (), {}) + assert module._call_function('testfunc', func_args=[1, 2, 3]) == (1, 2, 3, (), {})
+ assert module._call_function('testfunc', func_args=[3, 1, 2]) == (3, 1, 2, (), {}) + assert module._call_function('testfunc', func_args=[3, 1, 2]) == (3, 1, 2, (), {})
-- --
2.19.0 2.16.4

View File

@ -1,27 +0,0 @@
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

View File

@ -1,4 +1,4 @@
From 84e9371399b50618765038bcec2e313a006eadf9 Mon Sep 17 00:00:00 2001 From 32691d82e32dbc70adec03bee214b971c82a73cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 8 Jul 2019 14:46:10 +0100 Date: Mon, 8 Jul 2019 14:46:10 +0100
@ -27,6 +27,6 @@ index 70b47f8bc2..2a24d6f147 100644
+ proc.assert_any_call(['echo', '{"ANSIBLE_MODULE_ARGS": {"_raw_params": "arg_1", "kwarg1": "foobar"}}'], stdout=-1, timeout=1200) + proc.assert_any_call(['echo', '{"ANSIBLE_MODULE_ARGS": {"_raw_params": "arg_1", "kwarg1": "foobar"}}'], stdout=-1, timeout=1200)
assert ret == {"completed": True, "timeout": 1200} assert ret == {"completed": True, "timeout": 1200}
-- --
2.21.0 2.16.4

View File

@ -1,4 +1,4 @@
From 44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 Mon Sep 17 00:00:00 2001 From 03bf4718a82fe73e54c907bfcf9a315eee07feee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 30 Sep 2019 12:06:08 +0100 Date: Mon, 30 Sep 2019 12:06:08 +0100
@ -37,6 +37,6 @@ index 06f3a9f6aa..85360da181 100644
def test_call_apt_with_kwargs(self): def test_call_apt_with_kwargs(self):
-- --
2.22.0 2.16.4

View File

@ -0,0 +1,57 @@
From 13eaa8b2bb57eb1774b43e2437c5e1fd0de9cb93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com>
Date: Wed, 27 Nov 2019 15:41:57 +0000
Subject: [PATCH] Prevent test_mod_del_repo_multiline_values to fail
---
tests/integration/modules/test_pkg.py | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/tests/integration/modules/test_pkg.py b/tests/integration/modules/test_pkg.py
index 7204428eca..9a2cbc7bfc 100644
--- a/tests/integration/modules/test_pkg.py
+++ b/tests/integration/modules/test_pkg.py
@@ -145,6 +145,7 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin):
try:
if os_grain in ['CentOS', 'RedHat', 'SUSE']:
my_baseurl = 'http://my.fake.repo/foo/bar/\n http://my.fake.repo.alt/foo/bar/'
+ expected_get_repo_baseurl_zypp = 'http://my.fake.repo/foo/bar/%0A%20http://my.fake.repo.alt/foo/bar/'
expected_get_repo_baseurl = 'http://my.fake.repo/foo/bar/\nhttp://my.fake.repo.alt/foo/bar/'
major_release = int(
self.run_function(
@@ -169,17 +170,24 @@ class PkgModuleTest(ModuleCase, SaltReturnAssertsMixin):
enabled=enabled,
failovermethod=failovermethod,
)
- # return data from pkg.mod_repo contains the file modified at
- # the top level, so use next(iter(ret)) to get that key
self.assertNotEqual(ret, {})
- repo_info = ret[next(iter(ret))]
+ repo_info = {repo: ret}
self.assertIn(repo, repo_info)
- self.assertEqual(repo_info[repo]['baseurl'], my_baseurl)
+ if os_grain == 'SUSE':
+ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp)
+ else:
+ self.assertEqual(repo_info[repo]['baseurl'], my_baseurl)
ret = self.run_function('pkg.get_repo', [repo])
- self.assertEqual(ret['baseurl'], expected_get_repo_baseurl)
+ if os_grain == 'SUSE':
+ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp)
+ else:
+ self.assertEqual(ret['baseurl'], expected_get_repo_baseurl)
self.run_function('pkg.mod_repo', [repo])
ret = self.run_function('pkg.get_repo', [repo])
- self.assertEqual(ret['baseurl'], expected_get_repo_baseurl)
+ if os_grain == 'SUSE':
+ self.assertEqual(repo_info[repo]['baseurl'], expected_get_repo_baseurl_zypp)
+ else:
+ self.assertEqual(ret['baseurl'], expected_get_repo_baseurl)
finally:
if repo is not None:
self.run_function('pkg.del_repo', [repo])
--
2.23.0

View File

@ -1,4 +1,4 @@
From 121e37f185057f1135ccf89738e3a59c581d9efb Mon Sep 17 00:00:00 2001 From d16606a95d316848e15006ef45c11dadfaa0e410 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Thu, 20 Jun 2019 12:52:45 +0100 Date: Thu, 20 Jun 2019 12:52:45 +0100
@ -13,67 +13,65 @@ Subject: [PATCH] Provide the missing features required for Yomi (Yet one
salt/modules/aixpkg.py | 2 +- salt/modules/aixpkg.py | 2 +-
salt/modules/apkpkg.py | 12 +- salt/modules/apkpkg.py | 12 +-
salt/modules/aptpkg.py | 14 +- salt/modules/aptpkg.py | 14 +-
salt/modules/btrfs.py | 496 ++++++- salt/modules/btrfs.py | 496 +++++++++-
salt/modules/chroot.py | 165 +++ salt/modules/chroot.py | 165 ++++
salt/modules/cmdmod.py | 44 +- salt/modules/cmdmod.py | 44 +-
salt/modules/disk.py | 26 +- salt/modules/disk.py | 26 +-
salt/modules/dpkg_lowpkg.py | 6 +- salt/modules/dpkg_lowpkg.py | 6 +-
salt/modules/ebuildpkg.py | 8 +- salt/modules/ebuildpkg.py | 8 +-
salt/modules/freebsdpkg.py | 6 +- salt/modules/freebsdpkg.py | 6 +-
salt/modules/freezer.py | 294 ++++ salt/modules/freezer.py | 294 ++++++
salt/modules/groupadd.py | 177 ++- salt/modules/groupadd.py | 177 +++-
salt/modules/kubeadm.py | 1265 ++++++++++++++++++ salt/modules/kubeadm.py | 1265 ++++++++++++++++++++++++++
salt/modules/linux_lvm.py | 36 +- salt/modules/linux_lvm.py | 36 +-
salt/modules/mac_brew_pkg.py | 8 +- salt/modules/mac_brew_pkg.py | 8 +-
salt/modules/mac_portspkg.py | 6 +- salt/modules/mac_portspkg.py | 6 +-
salt/modules/mdadm_raid.py | 14 +- salt/modules/mdadm_raid.py | 14 +-
salt/modules/mount.py | 56 +- salt/modules/mount.py | 43 +-
salt/modules/openbsdpkg.py | 2 +- salt/modules/openbsdpkg.py | 2 +-
salt/modules/pacmanpkg.py | 10 +- salt/modules/pacmanpkg.py | 10 +-
salt/modules/parted_partition.py | 91 +- salt/modules/parted_partition.py | 91 +-
salt/modules/pkgin.py | 8 +- salt/modules/pkgin.py | 8 +-
salt/modules/pkgng.py | 4 +- salt/modules/pkgng.py | 4 +-
salt/modules/rpm_lowpkg.py | 101 +- salt/modules/rpm_lowpkg.py | 101 +-
salt/modules/shadow.py | 300 ++++- salt/modules/shadow.py | 300 ++++--
salt/modules/solarisipspkg.py | 4 +- salt/modules/solarisipspkg.py | 4 +-
salt/modules/solarispkg.py | 2 +- salt/modules/solarispkg.py | 2 +-
salt/modules/systemd_service.py | 264 +++- salt/modules/systemd_service.py | 264 ++++--
salt/modules/useradd.py | 390 ++++-- salt/modules/useradd.py | 390 ++++++--
salt/modules/xbpspkg.py | 12 +- salt/modules/xbpspkg.py | 12 +-
salt/modules/yumpkg.py | 34 +- salt/modules/yumpkg.py | 34 +-
salt/modules/zypperpkg.py | 503 +++++-- salt/modules/zypperpkg.py | 503 +++++++---
salt/states/blockdev.py | 3 +- salt/states/blockdev.py | 3 +-
salt/states/btrfs.py | 385 ++++++ salt/states/btrfs.py | 385 ++++++++
salt/states/cmd.py | 18 +- salt/states/cmd.py | 18 +-
salt/states/file.py | 6 +- salt/states/file.py | 6 +-
salt/states/loop.py | 4 + salt/states/loop.py | 4 +
salt/states/lvm.py | 16 +- salt/states/lvm.py | 16 +-
salt/states/mdadm_raid.py | 2 +- salt/states/mdadm_raid.py | 2 +-
salt/states/mount.py | 305 +++++ salt/states/mount.py | 305 +++++++
salt/states/pkg.py | 28 +- salt/states/pkg.py | 28 +-
salt/states/pkgrepo.py | 14 +- salt/states/pkgrepo.py | 14 +-
salt/utils/oset.py | 7 +- salt/utils/oset.py | 7 +-
salt/utils/path.py | 7 +- salt/utils/path.py | 7 +-
salt/utils/systemd.py | 5 +-
tests/conftest.py | 10 +- tests/conftest.py | 10 +-
tests/unit/grains/test_core.py | 39 + tests/unit/grains/test_core.py | 39 +
tests/unit/modules/test_btrfs.py | 370 ++++- tests/unit/modules/test_btrfs.py | 370 +++++++-
tests/unit/modules/test_chroot.py | 184 +++ tests/unit/modules/test_chroot.py | 184 ++++
tests/unit/modules/test_freezer.py | 274 ++++ tests/unit/modules/test_freezer.py | 274 ++++++
tests/unit/modules/test_groupadd.py | 16 +- tests/unit/modules/test_groupadd.py | 16 +-
tests/unit/modules/test_kubeadm.py | 1144 ++++++++++++++++ tests/unit/modules/test_kubeadm.py | 1144 +++++++++++++++++++++++
tests/unit/modules/test_mount.py | 154 ++- tests/unit/modules/test_mount.py | 118 ++-
tests/unit/modules/test_parted_partition.py | 17 + tests/unit/modules/test_parted_partition.py | 17 +
tests/unit/modules/test_rpm_lowpkg.py | 92 +- tests/unit/modules/test_rpm_lowpkg.py | 92 +-
tests/unit/modules/test_systemd_service.py | 57 +- tests/unit/modules/test_systemd_service.py | 57 +-
tests/unit/modules/test_useradd.py | 5 +- tests/unit/modules/test_useradd.py | 5 +-
tests/unit/modules/test_zypperpkg.py | 100 +- tests/unit/modules/test_zypperpkg.py | 100 +-
tests/unit/states/test_btrfs.py | 782 +++++++++++ tests/unit/states/test_btrfs.py | 782 ++++++++++++++++
tests/unit/states/test_mount.py | 605 +++++++++ tests/unit/states/test_mount.py | 605 ++++++++++++
tests/unit/states/test_pkg.py | 7 +- tests/unit/states/test_pkg.py | 7 +-
tests/unit/test_loader.py | 96 +- tests/unit/test_loader.py | 96 +-
tests/unit/utils/test_systemd.py | 21 + 65 files changed, 8503 insertions(+), 640 deletions(-)
67 files changed, 8570 insertions(+), 648 deletions(-)
create mode 100644 doc/ref/modules/all/salt.modules.kubeadm.rst create mode 100644 doc/ref/modules/all/salt.modules.kubeadm.rst
create mode 100644 salt/modules/chroot.py create mode 100644 salt/modules/chroot.py
create mode 100644 salt/modules/freezer.py create mode 100644 salt/modules/freezer.py
@ -85,15 +83,15 @@ Subject: [PATCH] Provide the missing features required for Yomi (Yet one
create mode 100644 tests/unit/states/test_btrfs.py create mode 100644 tests/unit/states/test_btrfs.py
diff --git a/doc/ref/modules/all/index.rst b/doc/ref/modules/all/index.rst diff --git a/doc/ref/modules/all/index.rst b/doc/ref/modules/all/index.rst
index 9762347faf..eaf7e25450 100644 index f1a85d2c71..8d165a033b 100644
--- a/doc/ref/modules/all/index.rst --- a/doc/ref/modules/all/index.rst
+++ b/doc/ref/modules/all/index.rst +++ b/doc/ref/modules/all/index.rst
@@ -208,6 +208,7 @@ execution modules @@ -212,6 +212,7 @@ execution modules
keystone keystone
keystoneng keystoneng
kmod kmod
+ kubeadm + kubeadm
kubernetes kubernetesmod
launchctl_service launchctl_service
layman layman
diff --git a/doc/ref/modules/all/salt.modules.kubeadm.rst b/doc/ref/modules/all/salt.modules.kubeadm.rst diff --git a/doc/ref/modules/all/salt.modules.kubeadm.rst b/doc/ref/modules/all/salt.modules.kubeadm.rst
@ -108,10 +106,10 @@ index 0000000000..137c779da2
+.. automodule:: salt.modules.kubeadm +.. automodule:: salt.modules.kubeadm
+ :members: + :members:
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index fec7b204bc..ce64620a24 100644 index 38b82b7f7c..ab37a4dd44 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -108,6 +108,10 @@ if not hasattr(os, 'uname'): @@ -109,6 +109,10 @@ if not hasattr(os, 'uname'):
_INTERFACES = {} _INTERFACES = {}
@ -122,7 +120,7 @@ index fec7b204bc..ce64620a24 100644
def _windows_cpudata(): def _windows_cpudata():
''' '''
@@ -2208,7 +2212,7 @@ def fqdns(): @@ -2263,7 +2267,7 @@ def fqdns():
name, aliaslist, addresslist = socket.gethostbyaddr(ip) name, aliaslist, addresslist = socket.gethostbyaddr(ip)
return [socket.getfqdn(name)] + [als for als in aliaslist if salt.utils.network.is_fqdn(als)] return [socket.getfqdn(name)] + [als for als in aliaslist if salt.utils.network.is_fqdn(als)]
except socket.herror as err: except socket.herror as err:
@ -131,7 +129,7 @@ index fec7b204bc..ce64620a24 100644
# No FQDN for this IP address, so we don't need to know this all the time. # No FQDN for this IP address, so we don't need to know this all the time.
log.debug("Unable to resolve address %s: %s", ip, err) log.debug("Unable to resolve address %s: %s", ip, err)
else: else:
@@ -2529,6 +2533,10 @@ def _hw_data(osdata): @@ -2584,6 +2588,10 @@ def _hw_data(osdata):
grains[key] = salt.utils.stringutils.to_unicode(ifile.read().strip(), errors='replace') grains[key] = salt.utils.stringutils.to_unicode(ifile.read().strip(), errors='replace')
if key == 'uuid': if key == 'uuid':
grains['uuid'] = grains['uuid'].lower() grains['uuid'] = grains['uuid'].lower()
@ -142,7 +140,7 @@ index fec7b204bc..ce64620a24 100644
except (IOError, OSError) as err: except (IOError, OSError) as err:
# PermissionError is new to Python 3, but corresponds to the EACESS and # PermissionError is new to Python 3, but corresponds to the EACESS and
# EPERM error numbers. Use those instead here for PY2 compatibility. # EPERM error numbers. Use those instead here for PY2 compatibility.
@@ -2760,26 +2768,6 @@ def _hw_data(osdata): @@ -2815,26 +2823,6 @@ def _hw_data(osdata):
else: else:
log.error('The \'prtconf\' binary was not found in $PATH.') log.error('The \'prtconf\' binary was not found in $PATH.')
@ -170,7 +168,7 @@ index fec7b204bc..ce64620a24 100644
diff --git a/salt/loader.py b/salt/loader.py diff --git a/salt/loader.py b/salt/loader.py
index 6760d9e720..1d8a4b90fd 100644 index d494c452ed..52cb4cfcb5 100644
--- a/salt/loader.py --- a/salt/loader.py
+++ b/salt/loader.py +++ b/salt/loader.py
@@ -253,6 +253,7 @@ def minion_mods( @@ -253,6 +253,7 @@ def minion_mods(
@ -181,7 +179,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
ret.pack['__salt__'] = ret ret.pack['__salt__'] = ret
@@ -334,6 +335,7 @@ def engines(opts, functions, runners, utils, proxy=None): @@ -346,6 +347,7 @@ def engines(opts, functions, runners, utils, proxy=None):
opts, opts,
tag='engines', tag='engines',
pack=pack, pack=pack,
@ -189,7 +187,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
@@ -346,6 +348,7 @@ def proxy(opts, functions=None, returners=None, whitelist=None, utils=None): @@ -358,6 +360,7 @@ def proxy(opts, functions=None, returners=None, whitelist=None, utils=None):
opts, opts,
tag='proxy', tag='proxy',
pack={'__salt__': functions, '__ret__': returners, '__utils__': utils}, pack={'__salt__': functions, '__ret__': returners, '__utils__': utils},
@ -197,7 +195,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
ret.pack['__proxy__'] = ret ret.pack['__proxy__'] = ret
@@ -383,12 +386,14 @@ def pillars(opts, functions, context=None): @@ -395,12 +398,14 @@ def pillars(opts, functions, context=None):
''' '''
Returns the pillars modules Returns the pillars modules
''' '''
@ -213,7 +211,7 @@ index 6760d9e720..1d8a4b90fd 100644
ret.pack['__ext_pillar__'] = ret ret.pack['__ext_pillar__'] = ret
return FilterDictWrapper(ret, '.ext_pillar') return FilterDictWrapper(ret, '.ext_pillar')
@@ -488,11 +493,13 @@ def fileserver(opts, backends): @@ -500,11 +505,13 @@ def fileserver(opts, backends):
''' '''
Returns the file server modules Returns the file server modules
''' '''
@ -228,7 +226,7 @@ index 6760d9e720..1d8a4b90fd 100644
def roster(opts, runner=None, utils=None, whitelist=None): def roster(opts, runner=None, utils=None, whitelist=None):
@@ -508,6 +515,7 @@ def roster(opts, runner=None, utils=None, whitelist=None): @@ -520,6 +527,7 @@ def roster(opts, runner=None, utils=None, whitelist=None):
'__runner__': runner, '__runner__': runner,
'__utils__': utils, '__utils__': utils,
}, },
@ -236,7 +234,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
@@ -546,6 +554,7 @@ def states(opts, functions, utils, serializers, whitelist=None, proxy=None): @@ -558,6 +566,7 @@ def states(opts, functions, utils, serializers, whitelist=None, proxy=None):
tag='states', tag='states',
pack={'__salt__': functions, '__proxy__': proxy or {}}, pack={'__salt__': functions, '__proxy__': proxy or {}},
whitelist=whitelist, whitelist=whitelist,
@ -244,7 +242,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
ret.pack['__states__'] = ret ret.pack['__states__'] = ret
ret.pack['__utils__'] = utils ret.pack['__utils__'] = utils
@@ -652,7 +661,8 @@ def grain_funcs(opts, proxy=None): @@ -664,7 +673,8 @@ def grain_funcs(opts, proxy=None):
__opts__ = salt.config.minion_config('/etc/salt/minion') __opts__ = salt.config.minion_config('/etc/salt/minion')
grainfuncs = salt.loader.grain_funcs(__opts__) grainfuncs = salt.loader.grain_funcs(__opts__)
''' '''
@ -254,7 +252,7 @@ index 6760d9e720..1d8a4b90fd 100644
_module_dirs( _module_dirs(
opts, opts,
'grains', 'grains',
@@ -661,7 +671,10 @@ def grain_funcs(opts, proxy=None): @@ -673,7 +683,10 @@ def grain_funcs(opts, proxy=None):
), ),
opts, opts,
tag='grains', tag='grains',
@ -265,7 +263,7 @@ index 6760d9e720..1d8a4b90fd 100644
def _load_cached_grains(opts, cfn): def _load_cached_grains(opts, cfn):
@@ -895,6 +908,7 @@ def runner(opts, utils=None, context=None, whitelist=None): @@ -907,6 +920,7 @@ def runner(opts, utils=None, context=None, whitelist=None):
tag='runners', tag='runners',
pack={'__utils__': utils, '__context__': context}, pack={'__utils__': utils, '__context__': context},
whitelist=whitelist, whitelist=whitelist,
@ -273,7 +271,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
# TODO: change from __salt__ to something else, we overload __salt__ too much # TODO: change from __salt__ to something else, we overload __salt__ too much
ret.pack['__salt__'] = ret ret.pack['__salt__'] = ret
@@ -930,6 +944,7 @@ def sdb(opts, functions=None, whitelist=None, utils=None): @@ -942,6 +956,7 @@ def sdb(opts, functions=None, whitelist=None, utils=None):
'__salt__': minion_mods(opts, utils), '__salt__': minion_mods(opts, utils),
}, },
whitelist=whitelist, whitelist=whitelist,
@ -281,7 +279,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
@@ -971,6 +986,7 @@ def clouds(opts): @@ -983,6 +998,7 @@ def clouds(opts):
''' '''
Return the cloud functions Return the cloud functions
''' '''
@ -289,7 +287,7 @@ index 6760d9e720..1d8a4b90fd 100644
# Let's bring __active_provider_name__, defaulting to None, to all cloud # Let's bring __active_provider_name__, defaulting to None, to all cloud
# drivers. This will get temporarily updated/overridden with a context # drivers. This will get temporarily updated/overridden with a context
# manager when needed. # manager when needed.
@@ -982,8 +998,9 @@ def clouds(opts): @@ -994,8 +1010,9 @@ def clouds(opts):
int_type='clouds'), int_type='clouds'),
opts, opts,
tag='clouds', tag='clouds',
@ -300,7 +298,7 @@ index 6760d9e720..1d8a4b90fd 100644
) )
for funcname in LIBCLOUD_FUNCS_NOT_SUPPORTED: for funcname in LIBCLOUD_FUNCS_NOT_SUPPORTED:
log.trace( log.trace(
@@ -1097,6 +1114,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1109,6 +1126,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
:param bool virtual_enable: Whether or not to respect the __virtual__ function when loading modules. :param bool virtual_enable: Whether or not to respect the __virtual__ function when loading modules.
:param str virtual_funcs: The name of additional functions in the module to call to verify its functionality. :param str virtual_funcs: The name of additional functions in the module to call to verify its functionality.
If not true, the module will not load. If not true, the module will not load.
@ -308,7 +306,7 @@ index 6760d9e720..1d8a4b90fd 100644
:returns: A LazyLoader object which functions as a dictionary. Keys are 'module.function' and values :returns: A LazyLoader object which functions as a dictionary. Keys are 'module.function' and values
are function references themselves which are loaded on-demand. are function references themselves which are loaded on-demand.
# TODO: # TODO:
@@ -1118,6 +1136,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1130,6 +1148,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
static_modules=None, static_modules=None,
proxy=None, proxy=None,
virtual_funcs=None, virtual_funcs=None,
@ -316,7 +314,7 @@ index 6760d9e720..1d8a4b90fd 100644
): # pylint: disable=W0231 ): # pylint: disable=W0231
''' '''
In pack, if any of the values are None they will be replaced with an In pack, if any of the values are None they will be replaced with an
@@ -1159,6 +1178,9 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1171,6 +1190,9 @@ class LazyLoader(salt.utils.lazy.LazyDict):
virtual_funcs = [] virtual_funcs = []
self.virtual_funcs = virtual_funcs self.virtual_funcs = virtual_funcs
@ -326,7 +324,7 @@ index 6760d9e720..1d8a4b90fd 100644
self.disabled = set( self.disabled = set(
self.opts.get( self.opts.get(
'disable_{0}{1}'.format( 'disable_{0}{1}'.format(
@@ -1465,12 +1487,30 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1477,12 +1499,30 @@ class LazyLoader(salt.utils.lazy.LazyDict):
reload_module(submodule) reload_module(submodule)
self._reload_submodules(submodule) self._reload_submodules(submodule)
@ -357,7 +355,7 @@ index 6760d9e720..1d8a4b90fd 100644
sys.path.append(fpath_dirname) sys.path.append(fpath_dirname)
if suffix == '.pyx': if suffix == '.pyx':
mod = pyximport.load_module(name, fpath, tempfile.gettempdir()) mod = pyximport.load_module(name, fpath, tempfile.gettempdir())
@@ -1593,6 +1633,7 @@ class LazyLoader(salt.utils.lazy.LazyDict): @@ -1605,6 +1645,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
return False return False
finally: finally:
sys.path.remove(fpath_dirname) sys.path.remove(fpath_dirname)
@ -1190,10 +1188,10 @@ index 0000000000..6e4705b67e
+ finally: + finally:
+ __utils__['files.rm_rf'](thin_dest_path) + __utils__['files.rm_rf'](thin_dest_path)
diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py diff --git a/salt/modules/cmdmod.py b/salt/modules/cmdmod.py
index 81c4d3f811..d0819f2f79 100644 index 723eddc67b..1801147f57 100644
--- a/salt/modules/cmdmod.py --- a/salt/modules/cmdmod.py
+++ b/salt/modules/cmdmod.py +++ b/salt/modules/cmdmod.py
@@ -2889,6 +2889,7 @@ def run_chroot(root, @@ -2904,6 +2904,7 @@ def run_chroot(root,
group=None, group=None,
shell=DEFAULT_SHELL, shell=DEFAULT_SHELL,
python_shell=True, python_shell=True,
@ -1201,7 +1199,7 @@ index 81c4d3f811..d0819f2f79 100644
env=None, env=None,
clean_env=False, clean_env=False,
template=None, template=None,
@@ -2914,19 +2915,17 @@ def run_chroot(root, @@ -2929,19 +2930,17 @@ def run_chroot(root,
:param str root: Path to the root of the jail to use. :param str root: Path to the root of the jail to use.
@ -1229,7 +1227,7 @@ index 81c4d3f811..d0819f2f79 100644
:param str cmd: The command to run. ex: ``ls -lart /home`` :param str cmd: The command to run. ex: ``ls -lart /home``
@@ -2950,6 +2949,9 @@ def run_chroot(root, @@ -2965,6 +2964,9 @@ def run_chroot(root,
arguments. Set to True to use shell features, such as pipes or arguments. Set to True to use shell features, such as pipes or
redirection. redirection.
@ -1239,7 +1237,7 @@ index 81c4d3f811..d0819f2f79 100644
:param dict env: Environment variables to be set prior to execution. :param dict env: Environment variables to be set prior to execution.
.. note:: .. note::
@@ -2968,11 +2970,11 @@ def run_chroot(root, @@ -2983,11 +2985,11 @@ def run_chroot(root,
engine will be used to render the downloaded file. Currently jinja, engine will be used to render the downloaded file. Currently jinja,
mako, and wempy are supported. mako, and wempy are supported.
@ -1255,7 +1253,7 @@ index 81c4d3f811..d0819f2f79 100644
:param str output_encoding: Control the encoding used to decode the :param str output_encoding: Control the encoding used to decode the
command's output. command's output.
@@ -3046,6 +3048,15 @@ def run_chroot(root, @@ -3061,6 +3063,15 @@ def run_chroot(root,
'sysfs', 'sysfs',
fstype='sysfs') fstype='sysfs')
@ -1271,7 +1269,7 @@ index 81c4d3f811..d0819f2f79 100644
# Execute chroot routine # Execute chroot routine
sh_ = '/bin/sh' sh_ = '/bin/sh'
if os.path.isfile(os.path.join(root, 'bin/bash')): if os.path.isfile(os.path.join(root, 'bin/bash')):
@@ -3096,6 +3107,11 @@ def run_chroot(root, @@ -3111,6 +3122,11 @@ def run_chroot(root,
log.error('Processes running in chroot could not be killed, ' log.error('Processes running in chroot could not be killed, '
'filesystem will remain mounted') 'filesystem will remain mounted')
@ -3567,7 +3565,7 @@ index 829f4cdd24..1581a558b6 100644
for line in res.splitlines(): for line in res.splitlines():
diff --git a/salt/modules/mount.py b/salt/modules/mount.py diff --git a/salt/modules/mount.py b/salt/modules/mount.py
index e807b1729e..f2737b9a5c 100644 index 97263252c7..f2737b9a5c 100644
--- a/salt/modules/mount.py --- a/salt/modules/mount.py
+++ b/salt/modules/mount.py +++ b/salt/modules/mount.py
@@ -711,11 +711,15 @@ def set_fstab( @@ -711,11 +711,15 @@ def set_fstab(
@ -3642,31 +3640,16 @@ index e807b1729e..f2737b9a5c 100644
if comps[0] != name: if comps[0] != name:
change = True change = True
comps[0] = name comps[0] = name
@@ -1212,14 +1223,17 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util @@ -1218,6 +1229,8 @@ def mount(name, device, mkmnt=False, fstype='', opts='defaults', user=None, util
lopts = ','.join(opts) # fstype in /etc/filesystems
args = '-o {0}'.format(lopts) if 'AIX' in __grains__['os']:
- # use of fstype on AIX differs from typical Linux use of -t functionality
- # AIX uses -v vfsname, -t fstype mounts all with fstype in /etc/filesystems
- if 'AIX' in __grains__['os']:
- if fstype:
+ if fstype:
+ # use of fstype on AIX differs from typical Linux use of -t
+ # functionality AIX uses -v vfsname, -t fstype mounts all with
+ # fstype in /etc/filesystems
+ if 'AIX' in __grains__['os']:
args += ' -v {0}'.format(fstype) args += ' -v {0}'.format(fstype)
- else:
- if fstype:
+ elif 'solaris' in __grains__['os'].lower(): + elif 'solaris' in __grains__['os'].lower():
+ args += ' -F {0}'.format(fstype) + args += ' -F {0}'.format(fstype)
+ else: else:
args += ' -t {0}'.format(fstype) args += ' -t {0}'.format(fstype)
+
cmd = 'mount {0} {1} {2} '.format(args, device, name) @@ -1248,7 +1261,7 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None):
out = __salt__['cmd.run_all'](cmd, runas=user, python_shell=False)
if out['retcode']:
@@ -1247,7 +1261,7 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None):
if 'AIX' in __grains__['os']: if 'AIX' in __grains__['os']:
if opts == 'defaults': if opts == 'defaults':
@ -3675,7 +3658,7 @@ index e807b1729e..f2737b9a5c 100644
if isinstance(opts, six.string_types): if isinstance(opts, six.string_types):
opts = opts.split(',') opts = opts.split(',')
@@ -1262,14 +1276,16 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None): @@ -1263,14 +1276,16 @@ def remount(name, device, mkmnt=False, fstype='', opts='defaults', user=None):
lopts = ','.join(opts) lopts = ','.join(opts)
args = '-o {0}'.format(lopts) args = '-o {0}'.format(lopts)
@ -3699,7 +3682,7 @@ index e807b1729e..f2737b9a5c 100644
if __grains__['os'] not in ['OpenBSD', 'MacOS', 'Darwin'] or force_mount: if __grains__['os'] not in ['OpenBSD', 'MacOS', 'Darwin'] or force_mount:
cmd = 'mount {0} {1} {2} '.format(args, device, name) cmd = 'mount {0} {1} {2} '.format(args, device, name)
@@ -1667,6 +1683,7 @@ def set_filesystems( @@ -1668,6 +1683,7 @@ def set_filesystems(
config='/etc/filesystems', config='/etc/filesystems',
test=False, test=False,
match_on='auto', match_on='auto',
@ -3707,7 +3690,7 @@ index e807b1729e..f2737b9a5c 100644
**kwargs): **kwargs):
''' '''
.. versionadded:: 2018.3.3 .. versionadded:: 2018.3.3
@@ -1674,6 +1691,9 @@ def set_filesystems( @@ -1675,6 +1691,9 @@ def set_filesystems(
Verify that this mount is represented in the filesystems, change the mount Verify that this mount is represented in the filesystems, change the mount
to match the data passed, or add the mount if it is not present on AIX to match the data passed, or add the mount if it is not present on AIX
@ -3717,7 +3700,7 @@ index e807b1729e..f2737b9a5c 100644
Provide information if the path is mounted Provide information if the path is mounted
:param name: The name of the mount point where the device is mounted. :param name: The name of the mount point where the device is mounted.
@@ -1773,7 +1793,7 @@ def set_filesystems( @@ -1774,7 +1793,7 @@ def set_filesystems(
for fsys_view in six.viewitems(fsys_filedict): for fsys_view in six.viewitems(fsys_filedict):
if criteria.match(fsys_view): if criteria.match(fsys_view):
ret = 'present' ret = 'present'
@ -8230,10 +8213,10 @@ index 4d20b51381..86934f9ffc 100644
return ret return ret
diff --git a/salt/states/file.py b/salt/states/file.py diff --git a/salt/states/file.py b/salt/states/file.py
index 15bb93e5ec..8823a7c8cf 100644 index 4e451c58f8..c98081fa7f 100644
--- a/salt/states/file.py --- a/salt/states/file.py
+++ b/salt/states/file.py +++ b/salt/states/file.py
@@ -276,7 +276,11 @@ import shutil @@ -291,7 +291,11 @@ import shutil
import sys import sys
import time import time
import traceback import traceback
@ -8868,29 +8851,6 @@ index b1d601e464..132190b271 100644
return None return None
for exe in exes: for exe in exes:
path = which(exe) path = which(exe)
diff --git a/salt/utils/systemd.py b/salt/utils/systemd.py
index 7790b3567d..060bc1e3fb 100644
--- a/salt/utils/systemd.py
+++ b/salt/utils/systemd.py
@@ -6,6 +6,7 @@ Contains systemd related help files
from __future__ import absolute_import, print_function, unicode_literals
import logging
import os
+import re
import subprocess
# Import Salt libs
@@ -65,8 +66,8 @@ def version(context=None):
stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
outstr = salt.utils.stringutils.to_str(stdout)
try:
- ret = int(outstr.splitlines()[0].split()[-1])
- except (IndexError, ValueError):
+ ret = int(re.search(r'\w+ ([0-9]+)', outstr.splitlines()[0]).group(1))
+ except (AttributeError, IndexError, ValueError):
log.error(
'Unable to determine systemd version from systemctl '
'--version, output follows:\n%s', outstr
diff --git a/tests/conftest.py b/tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py
index 906cca6dd5..1dbe2176b6 100644 index 906cca6dd5..1dbe2176b6 100644
--- a/tests/conftest.py --- a/tests/conftest.py
@ -8934,13 +8894,13 @@ index 906cca6dd5..1dbe2176b6 100644
only_local_network = requires_network_marker.kwargs.get('only_local_network', False) only_local_network = requires_network_marker.kwargs.get('only_local_network', False)
has_local_network = False has_local_network = False
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
index 117e02c39f..5fa0ea06f1 100644 index e43be4939c..af9d27dd0e 100644
--- a/tests/unit/grains/test_core.py --- a/tests/unit/grains/test_core.py
+++ b/tests/unit/grains/test_core.py +++ b/tests/unit/grains/test_core.py
@@ -1062,3 +1062,42 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin): @@ -1262,3 +1262,42 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
ret = core._osx_memdata() is_proxy.assert_called_once_with()
assert ret['swap_total'] == 0 is_windows.assert_not_called()
assert ret['mem_total'] == 4096 self.assertEqual(ret['locale_info']['timezone'], 'unknown')
+ +
+ @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux') + @skipIf(not salt.utils.platform.is_linux(), 'System is not Linux')
+ @patch('os.path.exists') + @patch('os.path.exists')
@ -11026,7 +10986,7 @@ index 0000000000..a58f54f118
+ with pytest.raises(CommandExecutionError): + with pytest.raises(CommandExecutionError):
+ assert kubeadm.reset() + assert kubeadm.reset()
diff --git a/tests/unit/modules/test_mount.py b/tests/unit/modules/test_mount.py diff --git a/tests/unit/modules/test_mount.py b/tests/unit/modules/test_mount.py
index a9df52f1d8..fe9b067665 100644 index 1a0d64f2f5..fe9b067665 100644
--- a/tests/unit/modules/test_mount.py --- a/tests/unit/modules/test_mount.py
+++ b/tests/unit/modules/test_mount.py +++ b/tests/unit/modules/test_mount.py
@@ -216,6 +216,21 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): @@ -216,6 +216,21 @@ class MountTestCase(TestCase, LoaderModuleMockMixin):
@ -11095,65 +11055,16 @@ index a9df52f1d8..fe9b067665 100644
mock_read = MagicMock(side_effect=OSError) mock_read = MagicMock(side_effect=OSError)
with patch.object(os.path, 'isfile', mock): with patch.object(os.path, 'isfile', mock):
@@ -305,6 +348,13 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): @@ -362,7 +405,7 @@ class MountTestCase(TestCase, LoaderModuleMockMixin):
'stderr': True})
with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
self.assertTrue(mount.mount('name', 'device'))
+ mock.assert_called_with('mount device name ',
+ python_shell=False, runas=None)
+
+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
+ self.assertTrue(mount.mount('name', 'device', fstype='fstype'))
+ mock.assert_called_with('mount -t fstype device name ',
+ python_shell=False, runas=None)
mock = MagicMock(return_value={'retcode': False,
'stderr': False})
@@ -320,13 +370,42 @@ class MountTestCase(TestCase, LoaderModuleMockMixin):
'stderr': True})
with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
self.assertTrue(mount.mount('name', 'device'))
+ mock.assert_called_with('mount device name ',
+ python_shell=False, runas=None)
+
+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
+ self.assertTrue(mount.mount('name', 'device', fstype='fstype'))
+ mock.assert_called_with('mount -v fstype device name ',
+ python_shell=False, runas=None)
mock = MagicMock(return_value={'retcode': False,
'stderr': False})
with patch.dict(mount.__salt__, {'cmd.run_all': mock}): with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
self.assertTrue(mount.mount('name', 'device')) self.assertTrue(mount.mount('name', 'device'))
- def test_remount(self): - def test_remount(self):
+ with patch.dict(mount.__grains__, {'os': 'Linux'}):
+ mock = MagicMock(return_value=True)
+ with patch.object(os.path, 'exists', mock):
+ mock = MagicMock(return_value=None)
+ with patch.dict(mount.__salt__, {'file.mkdir': None}):
+ mock = MagicMock(return_value={'retcode': True,
+ 'stderr': True})
+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
+ self.assertTrue(mount.mount('name', 'device'))
+ mock.assert_called_with('mount -o defaults device name ',
+ python_shell=False, runas=None)
+
+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
+ self.assertTrue(mount.mount('name', 'device', fstype='fstype'))
+ mock.assert_called_with('mount -o defaults -t fstype device name ',
+ python_shell=False, runas=None)
+
+ mock = MagicMock(return_value={'retcode': False,
+ 'stderr': False})
+ with patch.dict(mount.__salt__, {'cmd.run_all': mock}):
+ self.assertTrue(mount.mount('name', 'device'))
+
+ def test_remount_non_mounted(self): + def test_remount_non_mounted(self):
''' '''
Attempt to remount a device, if the device is not already mounted, mount Attempt to remount a device, if the device is not already mounted, mount
is called is called
@@ -345,6 +424,77 @@ class MountTestCase(TestCase, LoaderModuleMockMixin): @@ -381,6 +424,77 @@ class MountTestCase(TestCase, LoaderModuleMockMixin):
with patch.object(mount, 'mount', mock): with patch.object(mount, 'mount', mock):
self.assertTrue(mount.remount('name', 'device')) self.assertTrue(mount.remount('name', 'device'))
@ -13174,7 +13085,7 @@ index 42fe6c6867..d30e064167 100644
with patch.dict(pkg.__salt__, with patch.dict(pkg.__salt__,
{'pkg.list_upgrades': list_upgrades, {'pkg.list_upgrades': list_upgrades,
diff --git a/tests/unit/test_loader.py b/tests/unit/test_loader.py diff --git a/tests/unit/test_loader.py b/tests/unit/test_loader.py
index 0f22334559..ba8739a6b2 100644 index dd0ce8e2e2..38dcb18109 100644
--- a/tests/unit/test_loader.py --- a/tests/unit/test_loader.py
+++ b/tests/unit/test_loader.py +++ b/tests/unit/test_loader.py
@@ -119,6 +119,97 @@ class LazyLoaderTest(TestCase): @@ -119,6 +119,97 @@ class LazyLoaderTest(TestCase):
@ -13287,39 +13198,7 @@ index 0f22334559..ba8739a6b2 100644
def test_auth(self): def test_auth(self):
''' '''
diff --git a/tests/unit/utils/test_systemd.py b/tests/unit/utils/test_systemd.py
index 248ff44579..bddfee5e54 100644
--- a/tests/unit/utils/test_systemd.py
+++ b/tests/unit/utils/test_systemd.py
@@ -100,6 +100,27 @@ class SystemdTestCase(TestCase):
self.assertTrue(_systemd.version(context))
self.assertEqual(context, {'salt.utils.systemd.version': _version})
+ def test_version_generated_from_git_describe(self):
+ '''
+ Test with version string matching versions generated by git describe
+ in systemd. This feature is used in systemd>=241.
+ '''
+ with patch('subprocess.Popen') as popen_mock:
+ _version = 241
+ output = 'systemd {0} ({0}.0-0-dist)\n-SYSVINIT'.format(_version)
+ popen_mock.return_value = Mock(
+ communicate=lambda *args, **kwargs: (output, None),
+ pid=lambda: 12345,
+ retcode=0
+ )
+
+ # Test without context dict passed
+ self.assertEqual(_systemd.version(), _version)
+ # Test that context key is set when context dict is passed
+ context = {}
+ self.assertTrue(_systemd.version(context))
+ self.assertEqual(context, {'salt.utils.systemd.version': _version})
+
def test_version_return_from_context(self):
'''
Test that the context data is returned when present. To ensure we're
-- --
2.21.0 2.16.4

View File

@ -0,0 +1,27 @@
From 53f6eb05bb33117483246cdd199c73954c936e19 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 7 Nov 2019 15:11:49 +0100
Subject: [PATCH] Read repo info without using interpolation
(bsc#1135656)
---
salt/modules/zypperpkg.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/salt/modules/zypperpkg.py b/salt/modules/zypperpkg.py
index a87041aa70..8c1e05c21c 100644
--- a/salt/modules/zypperpkg.py
+++ b/salt/modules/zypperpkg.py
@@ -1043,7 +1043,7 @@ def _get_repo_info(alias, repos_cfg=None, root=None):
Get one repo meta-data.
'''
try:
- meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias))
+ meta = dict((repos_cfg or _get_configured_repos(root=root)).items(alias, raw=True))
meta['alias'] = alias
for key, val in six.iteritems(meta):
if val in ['0', '1']:
--
2.16.4

View File

@ -1,4 +1,4 @@
From 51ccc41dd16564dea5b465d122218ca8047f9f3e Mon Sep 17 00:00:00 2001 From 560910fbf8a500c501032846d6250a1a633137c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 19 Nov 2018 11:46:26 +0000 Date: Mon, 19 Nov 2018 11:46:26 +0000
@ -37,13 +37,13 @@ Remove unnecessary lambda
Return None instead empty string for arch and release in pkg.list_pkgs Return None instead empty string for arch and release in pkg.list_pkgs
--- ---
salt/modules/aptpkg.py | 38 ++++++++ salt/modules/aptpkg.py | 38 +++++++++++
salt/modules/pkg_resource.py | 20 +++- salt/modules/pkg_resource.py | 20 ++++--
salt/modules/yumpkg.py | 32 ++++++- salt/modules/yumpkg.py | 32 ++++++++-
salt/modules/zypperpkg.py | 29 +++++- salt/modules/zypperpkg.py | 29 +++++++-
tests/unit/modules/test_pkg_resource.py | 116 ++++++++++++++++++++++++ tests/unit/modules/test_pkg_resource.py | 116 ++++++++++++++++++++++++++++++++
tests/unit/modules/test_yumpkg.py | 85 ++++++++++++++++- tests/unit/modules/test_yumpkg.py | 85 ++++++++++++++++++++++-
tests/unit/modules/test_zypperpkg.py | 79 +++++++++++++++- tests/unit/modules/test_zypperpkg.py | 79 +++++++++++++++++++++-
7 files changed, 383 insertions(+), 16 deletions(-) 7 files changed, 383 insertions(+), 16 deletions(-)
diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
@ -739,6 +739,6 @@ index 3259e1810d..f586c23fd0 100644
''' '''
Test advisory patches listing. Test advisory patches listing.
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 53d182abfbf7ab1156496481801e5e64e7f112e6 Mon Sep 17 00:00:00 2001 From 23d21edaf5565d99bb6316087863ecbf6a699034 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Wed, 30 Oct 2019 10:19:12 +0100 Date: Wed, 30 Oct 2019 10:19:12 +0100
Subject: [PATCH] Remove unnecessary yield causing BadYieldError Subject: [PATCH] Remove unnecessary yield causing BadYieldError
@ -29,6 +29,6 @@ index 6d0dca1da5..754c257b36 100644
def __del__(self): def __del__(self):
self.local = None self.local = None
-- --
2.23.0 2.16.4

View File

@ -1,4 +1,4 @@
From 6dfe6e1370f330c0d300bf0effd7e6cf8a28c734 Mon Sep 17 00:00:00 2001 From 8d150403ceedd9bf7939bfa9ec1d6790e8ed4609 Mon Sep 17 00:00:00 2001
From: Cedric Bosdonnat <cbosdonnat@suse.com> From: Cedric Bosdonnat <cbosdonnat@suse.com>
Date: Wed, 30 Oct 2019 12:18:51 +0100 Date: Wed, 30 Oct 2019 12:18:51 +0100
Subject: [PATCH] Remove virt.pool_delete fast parameter (#178) Subject: [PATCH] Remove virt.pool_delete fast parameter (#178)
@ -71,6 +71,6 @@ index 4d20e998d8..b95f51807f 100644
+ # and thus throwing exceptions. + # and thus throwing exceptions.
+ mock_pool.delete.assert_called_once_with(self.mock_libvirt.VIR_STORAGE_POOL_DELETE_NORMAL) + mock_pool.delete.assert_called_once_with(self.mock_libvirt.VIR_STORAGE_POOL_DELETE_NORMAL)
-- --
2.23.0 2.16.4

View File

@ -1,4 +1,4 @@
From 56fd68474f399a36b0a74ca9a01890649d997792 Mon Sep 17 00:00:00 2001 From 1da400568977ffc45d4071189658855ee73b4013 Mon Sep 17 00:00:00 2001
From: Jochen Breuer <jbreuer@suse.de> From: Jochen Breuer <jbreuer@suse.de>
Date: Fri, 30 Aug 2019 14:20:06 +0200 Date: Fri, 30 Aug 2019 14:20:06 +0200
Subject: [PATCH] Restore default behaviour of pkg list return Subject: [PATCH] Restore default behaviour of pkg list return
@ -130,6 +130,6 @@ index f71d6aac9e..da1953b2a5 100644
def list_locks(root=None): def list_locks(root=None):
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 2cbc403b422a699cd948ed6218fce28fa901f5fa Mon Sep 17 00:00:00 2001 From 2140fc26fb347388ac60f91c4badf76a73a8a728 Mon Sep 17 00:00:00 2001
From: Mihai Dinca <mdinca@suse.de> From: Mihai Dinca <mdinca@suse.de>
Date: Thu, 13 Dec 2018 12:17:35 +0100 Date: Thu, 13 Dec 2018 12:17:35 +0100
Subject: [PATCH] Return the expected powerpc os arch (bsc#1117995) Subject: [PATCH] Return the expected powerpc os arch (bsc#1117995)
@ -26,6 +26,6 @@ index bb8c3fb589..828b0cecda 100644
def check_32(arch, osarch=None): def check_32(arch, osarch=None):
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From e9b5c0ae02552eb9a76488da32217a0e339d86a2 Mon Sep 17 00:00:00 2001 From 6bec79137c30375d62a2e3238081a9f4a5a8ae1b Mon Sep 17 00:00:00 2001
From: Christian Lanig <clanig@suse.com> From: Christian Lanig <clanig@suse.com>
Date: Mon, 27 Nov 2017 13:10:26 +0100 Date: Mon, 27 Nov 2017 13:10:26 +0100
Subject: [PATCH] Run salt-api as user salt (bsc#1064520) Subject: [PATCH] Run salt-api as user salt (bsc#1064520)
@ -20,6 +20,6 @@ index 7ca582dfb4..bf513e4dbd 100644
ExecStart=/usr/bin/salt-api ExecStart=/usr/bin/salt-api
TimeoutStopSec=3 TimeoutStopSec=3
-- --
2.13.7 2.16.4

View File

@ -1,4 +1,4 @@
From 3d4be53c265dffdbfaf1d7d4764c361a640fd5ff Mon Sep 17 00:00:00 2001 From ab1bc69e1454fc78ac9ba8725e61e034d882b5aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Wed, 20 Jan 2016 11:01:06 +0100 Date: Wed, 20 Jan 2016 11:01:06 +0100
Subject: [PATCH] Run salt master as dedicated salt user Subject: [PATCH] Run salt master as dedicated salt user
@ -10,7 +10,7 @@ Subject: [PATCH] Run salt master as dedicated salt user
2 files changed, 4 insertions(+), 1 deletion(-) 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/conf/master b/conf/master diff --git a/conf/master b/conf/master
index 149fe8812f..d492aef6df 100644 index 546db5cb28..573e4213ba 100644
--- a/conf/master --- a/conf/master
+++ b/conf/master +++ b/conf/master
@@ -25,7 +25,8 @@ @@ -25,7 +25,8 @@
@ -42,6 +42,6 @@ index 3cd002308e..0d99d1b801 100644
missingok missingok
rotate 7 rotate 7
-- --
2.13.7 2.16.4

View File

@ -1,3 +1,119 @@
-------------------------------------------------------------------
Thu Nov 28 15:27:27 UTC 2019 - Mihai Dincă <mihai.dinca@suse.com>
- Prevent test_mod_del_repo_multiline_values to fail
- Read repo info without using interpolation (bsc#1135656)
- Requires vs BuildRequires
- Limiting M2Crypto to >= SLE15
- Replacing pycrypto with M2Crypto
- Fix for log checking in x509 test
- Update to 2019.2.2 release
- Added:
* fix-for-log-checking-in-x509-test.patch
* prevent-test_mod_del_repo_multiline_values-to-fail.patch
* read-repo-info-without-using-interpolation-bsc-11356.patch
- Modified:
* async-batch-implementation.patch
* add-hold-unhold-functions.patch
* adds-the-possibility-to-also-use-downloadonly-in-kwa.patch
* decide-if-the-source-should-be-actually-skipped.patch
* allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch
* add-batch_presence_ping_timeout-and-batch_presence_p.patch
* run-salt-master-as-dedicated-salt-user.patch
* run-salt-api-as-user-salt-bsc-1064520.patch
* fix-unit-test-for-grains-core.patch
* add-environment-variable-to-know-if-yum-is-invoked-f.patch
* fix-async-batch-multiple-done-events.patch
* activate-all-beacons-sources-config-pillar-grains.patch
* fix-for-older-mock-module.patch
* do-not-break-repo-files-with-multiple-line-values-on.patch
* fall-back-to-pymysql.patch
* add-missing-fun-for-returns-from-wfunc-executions.patch
* loosen-azure-sdk-dependencies-in-azurearm-cloud-driv.patch
* add-virt.volume_infos-and-virt.volume_delete.patch
* fix-issue-2068-test.patch
* switch-firewalld-state-to-use-change_interface.patch
* make-aptpkg.list_repos-compatible-on-enabled-disable.patch
* fix-ipv6-scope-bsc-1108557.patch
* 2019.2.0-pr-54196-backport-173.patch
* do-not-make-ansiblegate-to-crash-on-python3-minions.patch
* x509-fixes-111.patch
* prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch
* fix-zypper.list_pkgs-to-be-aligned-with-pkg-state.patch
* add-cpe_name-for-osversion-grain-parsing-u-49946.patch
* fix-failing-unit-tests-for-batch-async.patch
* temporary-fix-extend-the-whitelist-of-allowed-comman.patch
* improve-batch_async-to-release-consumed-memory-bsc-1.patch
* batch.py-avoid-exception-when-minion-does-not-respon.patch
* preserve-already-defined-destructive_tests-and-expen.patch
* virt.volume_infos-fix-for-single-vm.patch
* move-server_id-deprecation-warning-to-reduce-log-spa.patch
* include-aliases-in-the-fqdns-grains.patch
* don-t-call-zypper-with-more-than-one-no-refresh.patch
* add-custom-suse-capabilities-as-grains.patch
* get-os_arch-also-without-rpm-package-installed.patch
* add-saltssh-multi-version-support-across-python-inte.patch
* accumulated-changes-required-for-yomi-165.patch
* use-adler32-algorithm-to-compute-string-checksums.patch
* remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch
* use-current-ioloop-for-the-localclient-instance-of-b.patch
* remove-virt.pool_delete-fast-parameter-178.patch
* add-multi-file-support-and-globbing-to-the-filetree-.patch
* use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
* prevent-systemd-run-description-issue-when-running-a.patch
* integration-of-msi-authentication-with-azurearm-clou.patch
* virt.volume_infos-needs-to-ignore-inactive-pools-174.patch
* virt-1.volume_infos-fix-for-single-vm.patch
* add-supportconfig-module-for-remote-calls-and-saltss.patch
* avoid-excessive-syslogging-by-watchdog-cronjob-58.patch
* strip-trailing-from-repo.uri-when-comparing-repos-in.patch
* preserving-signature-in-module.run-state-u-50049.patch
* fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch
* fix-aptpkg-systemd-call-bsc-1143301.patch
* calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch
* remove-unnecessary-yield-causing-badyielderror-bsc-1.patch
* debian-info_installed-compatibility-50453.patch
* add-standalone-configuration-file-for-enabling-packa.patch
* accumulated-changes-from-yomi-167.patch
* add-virt.all_capabilities.patch
* fix-memory-leak-produced-by-batch-async-find_jobs-me.patch
* do-not-report-patches-as-installed-when-not-all-the-.patch
* support-config-non-root-permission-issues-fixes-u-50.patch
* add-all_versions-parameter-to-include-all-installed-.patch
* fixes-cve-2018-15750-cve-2018-15751.patch
* fix-bsc-1065792.patch
* enable-passing-a-unix_socket-for-mysql-returners-bsc.patch
* avoid-traceback-when-http.query-request-cannot-be-pe.patch
* restore-default-behaviour-of-pkg-list-return.patch
* take-checksums-arg-into-account-for-postgres.datadir.patch
* early-feature-support-config.patch
* provide-the-missing-features-required-for-yomi-yet-o.patch
* implement-network.fqdns-module-function-bsc-1134860-.patch
* fix-virt.full_info-176.patch
* checking-for-jid-before-returning-data.patch
* virt.volume_infos-silence-libvirt-error-message-175.patch
* do-not-crash-when-there-are-ipv6-established-connect.patch
* fix-for-suse-expanded-support-detection.patch
* fix-a-wrong-rebase-in-test_core.py-180.patch
* add-ppc64le-as-a-valid-rpm-package-architecture.patch
* make-profiles-a-package.patch
* bugfix-any-unicode-string-of-length-16-will-raise-ty.patch
* fix-git_pillar-merging-across-multiple-__env__-repos.patch
* return-the-expected-powerpc-os-arch-bsc-1117995.patch
* fix-async-batch-race-conditions.patch
* do-not-load-pip-state-if-there-is-no-3rd-party-depen.patch
- Removed:
* fix-syndic-start-issue.patch
* prevent-already-reading-continuous-exception-message.patch
* virt.pool_running-fix-pool-start.patch
* azurefs-gracefully-handle-attributeerror.patch
* virt-handle-whitespaces-in-vm-names.patch
* mount-fix-extra-t-parameter.patch
* try-except-undefineflags-as-this-operation-is-not-su.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 30 11:23:05 UTC 2019 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com> Wed Oct 30 11:23:05 UTC 2019 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>

157
salt.spec
View File

@ -58,7 +58,7 @@
%bcond_with builddocs %bcond_with builddocs
Name: salt Name: salt
Version: 2019.2.0 Version: 2019.2.2
Release: 0 Release: 0
Summary: A parallel remote execution system Summary: A parallel remote execution system
License: Apache-2.0 License: Apache-2.0
@ -139,137 +139,128 @@ Patch34: add-hold-unhold-functions.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50401 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50401
# NOTE: This is a techpreview as well as in Fluorine! Release only in Neon. # NOTE: This is a techpreview as well as in Fluorine! Release only in Neon.
Patch35: add-supportconfig-module-for-remote-calls-and-saltss.patch Patch35: add-supportconfig-module-for-remote-calls-and-saltss.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50567
Patch36: azurefs-gracefully-handle-attributeerror.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/116 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/116
Patch37: return-the-expected-powerpc-os-arch-bsc-1117995.patch Patch36: return-the-expected-powerpc-os-arch-bsc-1117995.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51108 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51108
Patch38: remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch Patch37: remove-arch-from-name-when-pkg.list_pkgs-is-called-w.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51119 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51119
Patch39: fix-issue-2068-test.patch Patch38: fix-issue-2068-test.patch
# PATCH_FIX_OPENSUSE: Temporary fix allowing "id_" and "force" params while upstrem figures it out # PATCH_FIX_OPENSUSE: Temporary fix allowing "id_" and "force" params while upstrem figures it out
Patch40: temporary-fix-extend-the-whitelist-of-allowed-comman.patch Patch39: temporary-fix-extend-the-whitelist-of-allowed-comman.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51382 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51382
Patch41: don-t-call-zypper-with-more-than-one-no-refresh.patch Patch40: don-t-call-zypper-with-more-than-one-no-refresh.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50109 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50109
# PATCH_FIX_OPENSUSE https://github.com/openSUSE/salt/pull/121 # PATCH_FIX_OPENSUSE https://github.com/openSUSE/salt/pull/121
Patch42: add-virt.all_capabilities.patch Patch41: add-virt.all_capabilities.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51691 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51691
Patch43: add-virt.volume_infos-and-virt.volume_delete.patch Patch42: add-virt.volume_infos-and-virt.volume_delete.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51384 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51384
Patch44: include-aliases-in-the-fqdns-grains.patch Patch43: include-aliases-in-the-fqdns-grains.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50546 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/50546
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51863 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51863
Patch45: async-batch-implementation.patch Patch44: async-batch-implementation.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/51905
Patch46: mount-fix-extra-t-parameter.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527
Patch47: calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch Patch45: calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch
#PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/139 #PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/139
Patch48: fix-async-batch-race-conditions.patch Patch46: fix-async-batch-race-conditions.patch
#PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/141 #PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/141
Patch49: add-batch_presence_ping_timeout-and-batch_presence_p.patch Patch47: add-batch_presence_ping_timeout-and-batch_presence_p.patch
#PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52657 #PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52657
Patch50: do-not-report-patches-as-installed-when-not-all-the-.patch Patch48: do-not-report-patches-as-installed-when-not-all-the-.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527
Patch51: use-threadpool-from-multiprocessing.pool-to-avoid-le.patch Patch49: use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52519 (partial porting)
Patch52: fix-syndic-start-issue.patch
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52888 # PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52888
Patch53: do-not-crash-when-there-are-ipv6-established-connect.patch Patch50: do-not-crash-when-there-are-ipv6-established-connect.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/144 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/144
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52855 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52855
Patch54: fix-async-batch-multiple-done-events.patch Patch51: fix-async-batch-multiple-done-events.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52743 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52743
Patch55: switch-firewalld-state-to-use-change_interface.patch Patch52: switch-firewalld-state-to-use-change_interface.patch
# PATCH-FIX_OPENSUSE # PATCH-FIX_OPENSUSE
Patch56: add-standalone-configuration-file-for-enabling-packa.patch Patch53: add-standalone-configuration-file-for-enabling-packa.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53237 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53237
Patch57: add-ppc64le-as-a-valid-rpm-package-architecture.patch Patch54: add-ppc64le-as-a-valid-rpm-package-architecture.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53293 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53293
Patch58: do-not-break-repo-files-with-multiple-line-values-on.patch Patch55: do-not-break-repo-files-with-multiple-line-values-on.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53343 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53343
Patch59: preserve-already-defined-destructive_tests-and-expen.patch Patch56: preserve-already-defined-destructive_tests-and-expen.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53159 # PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53159
Patch60: batch.py-avoid-exception-when-minion-does-not-respon.patch Patch57: batch.py-avoid-exception-when-minion-does-not-respon.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53471 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53471
Patch61: fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch Patch58: fix-zypper-pkg.list_pkgs-expectation-and-dpkg-mockin.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/142
Patch62: try-except-undefineflags-as-this-operation-is-not-su.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52160
Patch63: virt-handle-whitespaces-in-vm-names.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52341
Patch64: virt.pool_running-fix-pool-start.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52414 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52414
Patch65: virt.volume_infos-fix-for-single-vm.patch Patch59: virt.volume_infos-fix-for-single-vm.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/161 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/161
Patch66: provide-the-missing-features-required-for-yomi-yet-o.patch Patch60: provide-the-missing-features-required-for-yomi-yet-o.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661
Patch67: do-not-make-ansiblegate-to-crash-on-python3-minions.patch Patch61: do-not-make-ansiblegate-to-crash-on-python3-minions.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53693 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53693
Patch68: allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch Patch62: allow-passing-kwargs-to-pkg.list_downloaded-bsc-1140.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53661
Patch69: prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch Patch63: prevent-ansiblegate-unit-tests-to-fail-on-ubuntu.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53755 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53755
Patch70: virt-1.volume_infos-fix-for-single-vm.patch Patch64: virt-1.volume_infos-fix-for-single-vm.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52459 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52459
Patch71: checking-for-jid-before-returning-data.patch Patch65: checking-for-jid-before-returning-data.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54048 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54048
Patch72: avoid-traceback-when-http.query-request-cannot-be-pe.patch Patch66: avoid-traceback-when-http.query-request-cannot-be-pe.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53992 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53992
# https://github.com/saltstack/salt/pull/53996 # https://github.com/saltstack/salt/pull/53996
# https://github.com/saltstack/salt/pull/54022 # https://github.com/saltstack/salt/pull/54022
# https://github.com/saltstack/salt/pull/54024 # https://github.com/saltstack/salt/pull/54024
Patch73: accumulated-changes-required-for-yomi-165.patch Patch67: accumulated-changes-required-for-yomi-165.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/177
Patch74: restore-default-behaviour-of-pkg-list-return.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6af07030a502c427781991fc9a2b994fa04ef32e
Patch75: fix-memory-leak-produced-by-batch-async-find_jobs-me.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/159 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/159
Patch76: move-server_id-deprecation-warning-to-reduce-log-spa.patch Patch68: move-server_id-deprecation-warning-to-reduce-log-spa.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/166 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/166
Patch77: fix-aptpkg-systemd-call-bsc-1143301.patch Patch69: fix-aptpkg-systemd-call-bsc-1143301.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/170 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/170
Patch78: strip-trailing-from-repo.uri-when-comparing-repos-in.patch Patch70: strip-trailing-from-repo.uri-when-comparing-repos-in.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/177
Patch71: restore-default-behaviour-of-pkg-list-return.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/172 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/172
Patch79: implement-network.fqdns-module-function-bsc-1134860-.patch Patch72: implement-network.fqdns-module-function-bsc-1134860-.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/173 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/173
Patch80: 2019.2.0-pr-54196-backport-173.patch Patch73: 2019.2.0-pr-54196-backport-173.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/174 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/174
Patch81: virt.volume_infos-needs-to-ignore-inactive-pools-174.patch Patch74: virt.volume_infos-needs-to-ignore-inactive-pools-174.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/175 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/175
Patch82: virt.volume_infos-silence-libvirt-error-message-175.patch Patch75: virt.volume_infos-silence-libvirt-error-message-175.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/176 # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/176
Patch83: fix-virt.full_info-176.patch Patch76: fix-virt.full_info-176.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/6af07030a502c427781991fc9a2b994fa04ef32e
Patch77: fix-memory-leak-produced-by-batch-async-find_jobs-me.patch
# PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/002543df392f65d95dbc127dc058ac897f2035ed # PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/002543df392f65d95dbc127dc058ac897f2035ed
Patch84: improve-batch_async-to-release-consumed-memory-bsc-1.patch Patch78: improve-batch_async-to-release-consumed-memory-bsc-1.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54770 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54770
Patch85: take-checksums-arg-into-account-for-postgres.datadir.patch Patch79: take-checksums-arg-into-account-for-postgres.datadir.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54077
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/44a91c2ce6df78d93ce0ef659dedb0e41b1c2e04
Patch86: prevent-systemd-run-description-issue-when-running-a.patch Patch80: prevent-systemd-run-description-issue-when-running-a.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/55d8a777d6a9b19c959e14a4060e5579e92cd106 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/55d8a777d6a9b19c959e14a4060e5579e92cd106
Patch87: use-current-ioloop-for-the-localclient-instance-of-b.patch Patch81: use-current-ioloop-for-the-localclient-instance-of-b.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/8378bb24a5a53973e8dba7658b8b3465d967329f # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/commit/8378bb24a5a53973e8dba7658b8b3465d967329f
Patch88: fix-failing-unit-tests-for-batch-async.patch Patch82: fix-failing-unit-tests-for-batch-async.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54935 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54935
Patch89: add-missing-fun-for-returns-from-wfunc-executions.patch Patch83: add-missing-fun-for-returns-from-wfunc-executions.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/179 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/179
Patch90: adds-the-possibility-to-also-use-downloadonly-in-kwa.patch Patch84: adds-the-possibility-to-also-use-downloadonly-in-kwa.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53326 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53326
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54954 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54954
Patch91: accumulated-changes-from-yomi-167.patch Patch85: accumulated-changes-from-yomi-167.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/180 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/180
Patch92: fix-a-wrong-rebase-in-test_core.py-180.patch Patch86: fix-a-wrong-rebase-in-test_core.py-180.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/181 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/181
Patch93: fix-for-older-mock-module.patch Patch87: 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 # PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/182
Patch95: remove-unnecessary-yield-causing-badyielderror-bsc-1.patch Patch88: remove-unnecessary-yield-causing-badyielderror-bsc-1.patch
# PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54475 # PATCH_FIX_UPSTREAM: https://github.com/saltstack/salt/pull/54475
Patch96: remove-virt.pool_delete-fast-parameter-178.patch Patch89: remove-virt.pool_delete-fast-parameter-178.patch
# PATCH_FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/186
Patch90: read-repo-info-without-using-interpolation-bsc-11356.patch
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/53293
Patch91: prevent-test_mod_del_repo_multiline_values-to-fail.patch
Patch92: fix-for-log-checking-in-x509-test.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: logrotate BuildRequires: logrotate
@ -377,7 +368,11 @@ BuildConflicts: python3-tornado >= 5
%endif %endif
# requirements/zeromq.txt # requirements/zeromq.txt
BuildRequires: python-pycrypto >= 2.6.1 %if 0%{?suse_version} >= 1500
BuildRequires: python2-M2Crypto
%else
BuildRequires: python-pycrypto >= 2.6.1
%endif
BuildRequires: python-pyzmq >= 2.2.0 BuildRequires: python-pyzmq >= 2.2.0
%if %{with test} %if %{with test}
# requirements/dev_python27.txt # requirements/dev_python27.txt
@ -430,7 +425,11 @@ Suggests: python-timelib
Suggests: python-gnupg Suggests: python-gnupg
# requirements/zeromq.txt # requirements/zeromq.txt
%endif %endif
%if 0%{?suse_version} >= 1500
Requires: python2-M2Crypto
%else
Requires: python-pycrypto >= 2.6.1 Requires: python-pycrypto >= 2.6.1
%endif
Requires: python-pyzmq >= 2.2.0 Requires: python-pyzmq >= 2.2.0
# #
%if 0%{?suse_version} %if 0%{?suse_version}
@ -465,8 +464,12 @@ BuildRequires: python3-Jinja2
BuildRequires: python3-MarkupSafe BuildRequires: python3-MarkupSafe
BuildRequires: python3-msgpack-python > 0.3 BuildRequires: python3-msgpack-python > 0.3
BuildRequires: python3-pyzmq >= 2.2.0 BuildRequires: python3-pyzmq >= 2.2.0
%if 0%{?suse_version} >= 1500
BuildRequires: python3-M2Crypto
%else
BuildRequires: python3-pycrypto >= 2.6.1 BuildRequires: python3-pycrypto >= 2.6.1
%endif %endif
%endif
BuildRequires: python3-PyYAML BuildRequires: python3-PyYAML
BuildRequires: python3-psutil BuildRequires: python3-psutil
BuildRequires: python3-requests >= 1.0.0 BuildRequires: python3-requests >= 1.0.0
@ -517,7 +520,11 @@ Requires: yum-plugin-security
Requires: python3-Jinja2 Requires: python3-Jinja2
Requires: python3-MarkupSafe Requires: python3-MarkupSafe
Requires: python3-msgpack-python > 0.3 Requires: python3-msgpack-python > 0.3
%if 0%{?suse_version} >= 1500
Requires: python3-M2Crypto
%else
Requires: python3-pycrypto >= 2.6.1 Requires: python3-pycrypto >= 2.6.1
%endif
Requires: python3-pyzmq >= 2.2.0 Requires: python3-pyzmq >= 2.2.0
%endif %endif
Requires: python3-PyYAML Requires: python3-PyYAML
@ -767,7 +774,7 @@ This package adds the standalone configuration for the Salt master in order to m
%prep %prep
# %setup -q -n salt-%{version} # %setup -q -n salt-%{version}
%setup -q -n salt-2019.2.0-suse %setup -q -n salt-2019.2.2-suse
cp %{S:1} . cp %{S:1} .
cp %{S:5} ./.travis.yml cp %{S:5} ./.travis.yml
%patch1 -p1 %patch1 -p1
@ -862,10 +869,6 @@ cp %{S:5} ./.travis.yml
%patch90 -p1 %patch90 -p1
%patch91 -p1 %patch91 -p1
%patch92 -p1 %patch92 -p1
%patch93 -p1
%patch94 -p1
%patch95 -p1
%patch96 -p1
%build %build
%if 0%{?build_py2} %if 0%{?build_py2}

View File

@ -1,4 +1,4 @@
From 1b6f3f2e8b88ddfaebd5bfd1ae8258d417a9f098 Mon Sep 17 00:00:00 2001 From 1cdaeb8613132c020364b7078448834be7bbb705 Mon Sep 17 00:00:00 2001
From: Matei Albu <malbu@suse.de> From: Matei Albu <malbu@suse.de>
Date: Fri, 15 Feb 2019 14:34:13 +0100 Date: Fri, 15 Feb 2019 14:34:13 +0100
Subject: [PATCH] Strip trailing "/" from repo.uri when comparing repos Subject: [PATCH] Strip trailing "/" from repo.uri when comparing repos
@ -23,6 +23,6 @@ index b7c1a342ef..d49a48310e 100644
if repo_matches or kw_matches: if repo_matches or kw_matches:
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 1113909fe9ab0509ebe439051238d6a4f95d3c54 Mon Sep 17 00:00:00 2001 From f5d743b6a2a0dd2066e33d0a0ea13bfccc9ae9b0 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Wed, 17 Oct 2018 14:10:47 +0200 Date: Wed, 17 Oct 2018 14:10:47 +0200
Subject: [PATCH] Support-config non-root permission issues fixes Subject: [PATCH] Support-config non-root permission issues fixes
@ -12,7 +12,7 @@ Catch overwriting exiting archive error by other users
Suppress excessive tracebacks on error log level Suppress excessive tracebacks on error log level
--- ---
salt/cli/support/collector.py | 39 ++++++++++++++++++++++++++++++++--- salt/cli/support/collector.py | 39 ++++++++++++++++++++++++++++++++++++---
salt/utils/parsers.py | 2 +- salt/utils/parsers.py | 2 +-
2 files changed, 37 insertions(+), 4 deletions(-) 2 files changed, 37 insertions(+), 4 deletions(-)
@ -88,10 +88,10 @@ index 478d07e13b..a4343297b6 100644
else: else:
self.out.warning('File {} already exists.'.format(self.config['support_archive'])) self.out.warning('File {} already exists.'.format(self.config['support_archive']))
diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py diff --git a/salt/utils/parsers.py b/salt/utils/parsers.py
index 56a8961c3a..058346a9f4 100644 index aa13310d5a..901bbbea55 100644
--- a/salt/utils/parsers.py --- a/salt/utils/parsers.py
+++ b/salt/utils/parsers.py +++ b/salt/utils/parsers.py
@@ -1922,7 +1922,7 @@ class SaltSupportOptionParser(six.with_metaclass(OptionParserMeta, OptionParser, @@ -1961,7 +1961,7 @@ class SaltSupportOptionParser(six.with_metaclass(OptionParserMeta, OptionParser,
''' '''
_opts, _args = optparse.OptionParser.parse_args(self) _opts, _args = optparse.OptionParser.parse_args(self)
configs = self.find_existing_configs(_opts.support_unit) configs = self.find_existing_configs(_opts.support_unit)
@ -101,6 +101,6 @@ index 56a8961c3a..058346a9f4 100644
return config.master_config(self.get_config_file_path(cfg)) return config.master_config(self.get_config_file_path(cfg))
-- --
2.19.0 2.16.4

View File

@ -1,4 +1,4 @@
From ee499612e1302b908a64dde696065b0093fe3115 Mon Sep 17 00:00:00 2001 From d21552ca35f9f90acc12e907251ed5ded3c2a5f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Mon, 20 May 2019 11:59:39 +0100 Date: Mon, 20 May 2019 11:59:39 +0100
@ -68,6 +68,6 @@ index 4623798658..fc5b233f98 100644
ret['comment'] = 'Error: {0}'.format(err) ret['comment'] = 'Error: {0}'.format(err)
return ret return ret
-- --
2.17.1 2.16.4

View File

@ -1,4 +1,4 @@
From 7ed3e99a4979a13c7142ed5ba73c09a282e03147 Mon Sep 17 00:00:00 2001 From 34659b17ef083021c582ec0e7d225f94e409b500 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Thu, 26 Sep 2019 15:57:58 +0100 Date: Thu, 26 Sep 2019 15:57:58 +0100
@ -36,6 +36,6 @@ index 03fb7fddfd..6f10fcf2e0 100644
) )
self.assertTrue(ret) self.assertTrue(ret)
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From c9c50ab75b4a8a73f57e8c2eeaa24401409e8c3c Mon Sep 17 00:00:00 2001 From 6a3a1b36ba7157a6318084bd67acda3ad9f9556e Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Thu, 24 Jan 2019 18:12:35 +0100 Date: Thu, 24 Jan 2019 18:12:35 +0100
Subject: [PATCH] temporary fix: extend the whitelist of allowed commands Subject: [PATCH] temporary fix: extend the whitelist of allowed commands
@ -8,10 +8,10 @@ Subject: [PATCH] temporary fix: extend the whitelist of allowed commands
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py diff --git a/salt/auth/__init__.py b/salt/auth/__init__.py
index ca7168d00e..aa4c5c3670 100644 index cf5e2deb9c..d43c57338c 100644
--- a/salt/auth/__init__.py --- a/salt/auth/__init__.py
+++ b/salt/auth/__init__.py +++ b/salt/auth/__init__.py
@@ -46,6 +46,8 @@ AUTH_INTERNAL_KEYWORDS = frozenset([ @@ -47,6 +47,8 @@ AUTH_INTERNAL_KEYWORDS = frozenset([
'gather_job_timeout', 'gather_job_timeout',
'kwarg', 'kwarg',
'match', 'match',
@ -21,6 +21,6 @@ index ca7168d00e..aa4c5c3670 100644
'print_event', 'print_event',
'raw', 'raw',
-- --
2.20.1 2.16.4

View File

@ -1,31 +0,0 @@
From e0bded83fa691c3b972fa4c22b14c5ac0a7a3f13 Mon Sep 17 00:00:00 2001
From: Jeroen Schutrup <jeroenschutrup@hotmail.nl>
Date: Sun, 12 Aug 2018 19:43:22 +0200
Subject: [PATCH] Try/except undefineFlags() as this operation is not
supported on bhyve
(cherry picked from commit 29a44aceb1a73347ac07dd241b4a64a4a38cef6e)
---
salt/modules/virt.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py
index a3f625909d..423016cd90 100644
--- a/salt/modules/virt.py
+++ b/salt/modules/virt.py
@@ -3189,7 +3189,10 @@ def purge(vm_, dirs=False, removables=None, **kwargs):
shutil.rmtree(dir_)
if getattr(libvirt, 'VIR_DOMAIN_UNDEFINE_NVRAM', False):
# This one is only in 1.2.8+
- dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
+ try:
+ dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM)
+ except Exception:
+ dom.undefine()
else:
dom.undefine()
conn.close()
--
2.21.0

View File

@ -1,4 +1,4 @@
From 9d09fcb60b8babd415af76812c93d38b6cbce661 Mon Sep 17 00:00:00 2001 From 815042712007e3bc9e5326b3a13b2880534630b9 Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de> From: Bo Maryniuk <bo@suse.de>
Date: Sat, 28 Jul 2018 22:59:04 +0200 Date: Sat, 28 Jul 2018 22:59:04 +0200
Subject: [PATCH] Use Adler32 algorithm to compute string checksums Subject: [PATCH] Use Adler32 algorithm to compute string checksums
@ -15,15 +15,15 @@ Choose CRC method, default to faster but less reliable "adler32", if crc is in u
Add warning for Sodium. Add warning for Sodium.
--- ---
salt/config/__init__.py | 7 +++++- salt/config/__init__.py | 7 ++++++-
salt/grains/core.py | 53 +++++++++++++++++++++++++++-------------- salt/grains/core.py | 53 ++++++++++++++++++++++++++++++++-----------------
2 files changed, 41 insertions(+), 19 deletions(-) 2 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/salt/config/__init__.py b/salt/config/__init__.py diff --git a/salt/config/__init__.py b/salt/config/__init__.py
index 6b74b90ce0..5d0c18b5d1 100644 index b3dfc8e43d..ee90eb3120 100644
--- a/salt/config/__init__.py --- a/salt/config/__init__.py
+++ b/salt/config/__init__.py +++ b/salt/config/__init__.py
@@ -1212,6 +1212,10 @@ VALID_OPTS = { @@ -1217,6 +1217,10 @@ VALID_OPTS = {
# Thorium top file location # Thorium top file location
'thorium_top': six.string_types, 'thorium_top': six.string_types,
@ -34,7 +34,7 @@ index 6b74b90ce0..5d0c18b5d1 100644
} }
# default configurations # default configurations
@@ -1520,7 +1524,8 @@ DEFAULT_MINION_OPTS = { @@ -1525,7 +1529,8 @@ DEFAULT_MINION_OPTS = {
}, },
'discovery': False, 'discovery': False,
'schedule': {}, 'schedule': {},
@ -45,7 +45,7 @@ index 6b74b90ce0..5d0c18b5d1 100644
DEFAULT_MASTER_OPTS = { DEFAULT_MASTER_OPTS = {
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index 85a929a485..378d3cb786 100644 index 82cd3fb657..cd7ee39d2f 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -20,6 +20,7 @@ import platform @@ -20,6 +20,7 @@ import platform
@ -56,7 +56,7 @@ index 85a929a485..378d3cb786 100644
from errno import EACCES, EPERM from errno import EACCES, EPERM
import datetime import datetime
import warnings import warnings
@@ -61,6 +62,7 @@ import salt.utils.path @@ -62,6 +63,7 @@ import salt.utils.path
import salt.utils.pkg.rpm import salt.utils.pkg.rpm
import salt.utils.platform import salt.utils.platform
import salt.utils.stringutils import salt.utils.stringutils
@ -64,7 +64,7 @@ index 85a929a485..378d3cb786 100644
from salt.ext import six from salt.ext import six
from salt.ext.six.moves import range from salt.ext.six.moves import range
@@ -2730,40 +2732,55 @@ def _hw_data(osdata): @@ -2785,40 +2787,55 @@ def _hw_data(osdata):
return grains return grains
@ -139,6 +139,6 @@ index 85a929a485..378d3cb786 100644
def get_master(): def get_master():
-- --
2.20.1 2.16.4

View File

@ -1,4 +1,4 @@
From 55d8a777d6a9b19c959e14a4060e5579e92cd106 Mon Sep 17 00:00:00 2001 From 1947ddfd6883de285c82ba4bb6423454216e37c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Thu, 3 Oct 2019 15:19:02 +0100 Date: Thu, 3 Oct 2019 15:19:02 +0100
@ -31,6 +31,6 @@ index 2bb50459c8..f9e736f804 100644
self.ioloop = None self.ioloop = None
gc.collect() gc.collect()
-- --
2.22.0 2.16.4

View File

@ -1,4 +1,4 @@
From cd8e175738f7742fbb7c9e9d329039371bc0e579 Mon Sep 17 00:00:00 2001 From a4735644b2e6527e36796722516540f153ccabb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
<psuarezhernandez@suse.com> <psuarezhernandez@suse.com>
Date: Tue, 30 Apr 2019 10:51:42 +0100 Date: Tue, 30 Apr 2019 10:51:42 +0100
@ -10,19 +10,19 @@ Subject: [PATCH] Use ThreadPool from multiprocessing.pool to avoid
1 file changed, 9 insertions(+), 5 deletions(-) 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/salt/grains/core.py b/salt/grains/core.py diff --git a/salt/grains/core.py b/salt/grains/core.py
index 796458939d..fec7b204bc 100644 index ac66a437fd..38b82b7f7c 100644
--- a/salt/grains/core.py --- a/salt/grains/core.py
+++ b/salt/grains/core.py +++ b/salt/grains/core.py
@@ -26,7 +26,7 @@ from errno import EACCES, EPERM @@ -27,7 +27,7 @@ import datetime
import datetime
import warnings import warnings
import time
-from multiprocessing.dummy import Pool as ThreadPool -from multiprocessing.dummy import Pool as ThreadPool
+from multiprocessing.pool import ThreadPool +from multiprocessing.pool import ThreadPool
# pylint: disable=import-error # pylint: disable=import-error
try: try:
@@ -2225,10 +2225,14 @@ def fqdns(): @@ -2280,10 +2280,14 @@ def fqdns():
# Create a ThreadPool to process the underlying calls to 'socket.gethostbyaddr' in parallel. # Create a ThreadPool to process the underlying calls to 'socket.gethostbyaddr' in parallel.
# This avoid blocking the execution when the "fqdn" is not defined for certains IP addresses, which was causing # This avoid blocking the execution when the "fqdn" is not defined for certains IP addresses, which was causing
# that "socket.timeout" was reached multiple times secuencially, blocking execution for several seconds. # that "socket.timeout" was reached multiple times secuencially, blocking execution for several seconds.
@ -42,6 +42,6 @@ index 796458939d..fec7b204bc 100644
for item in results: for item in results:
if item: if item:
-- --
2.17.1 2.16.4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:263b7f6fd915eb8876795714cc4d2b6bb8ccb97423858b479eefb1c5429424d5
size 15065369

3
v2019.2.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aced5a5a79def23af3d4bd7a77bd9cb3e14a1e5b2dd57a72a67c5242930fa2a4
size 14656820

View File

@ -1,12 +1,12 @@
From 9fcf9a768d0f11e04e145612cc5b2c05cfbf5378 Mon Sep 17 00:00:00 2001 From 4e32b8efa3ef393f2d19d5f06a16668a514044c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com> From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Thu, 4 Apr 2019 16:18:58 +0200 Date: Thu, 4 Apr 2019 16:18:58 +0200
Subject: [PATCH] virt.volume_infos fix for single VM Subject: [PATCH] virt.volume_infos fix for single VM
virt.volume_infos: don't raise an error if there is no VM virt.volume_infos: don't raise an error if there is no VM
--- ---
salt/modules/virt.py | 8 ++++-- salt/modules/virt.py | 8 +++++--
tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++ tests/unit/modules/test_virt.py | 46 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-) 2 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py diff --git a/salt/modules/virt.py b/salt/modules/virt.py
@ -86,6 +86,6 @@ index cc62b67918..b343b9bc31 100644
''' '''
Test virt.volume_delete Test virt.volume_delete
-- --
2.21.0 2.16.4

View File

@ -1,243 +0,0 @@
From fbad82a38b4460260726cb3b9456cad7986eb4cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Wed, 13 Mar 2019 09:43:51 +0100
Subject: [PATCH] virt: handle whitespaces in VM names
The disk creation code is now ready to handle whitespaces in virtual
machine name.
---
salt/modules/virt.py | 8 +++---
tests/unit/modules/test_virt.py | 46 ++++++++++++++++-----------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/salt/modules/virt.py b/salt/modules/virt.py
index 423016cd90..d160f0905f 100644
--- a/salt/modules/virt.py
+++ b/salt/modules/virt.py
@@ -760,14 +760,14 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'):
qcow2 = False
if salt.utils.path.which('qemu-img'):
- res = __salt__['cmd.run']('qemu-img info {}'.format(sfn))
+ res = __salt__['cmd.run']('qemu-img info "{}"'.format(sfn))
imageinfo = salt.utils.yaml.safe_load(res)
qcow2 = imageinfo['file format'] == 'qcow2'
try:
if create_overlay and qcow2:
log.info('Cloning qcow2 image %s using copy on write', sfn)
__salt__['cmd.run'](
- 'qemu-img create -f qcow2 -o backing_file={0} {1}'
+ 'qemu-img create -f qcow2 -o backing_file="{0}" "{1}"'
.format(sfn, img_dest).split())
else:
log.debug('Copying %s to %s', sfn, img_dest)
@@ -778,7 +778,7 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'):
if disk_size and qcow2:
log.debug('Resize qcow2 image to %sM', disk_size)
__salt__['cmd.run'](
- 'qemu-img resize {0} {1}M'
+ 'qemu-img resize "{0}" {1}M'
.format(img_dest, disk_size)
)
@@ -800,7 +800,7 @@ def _qemu_image_create(disk, create_overlay=False, saltenv='base'):
if disk_size:
log.debug('Create empty image with size %sM', disk_size)
__salt__['cmd.run'](
- 'qemu-img create -f {0} {1} {2}M'
+ 'qemu-img create -f {0} "{1}" {2}M'
.format(disk.get('format', 'qcow2'), img_dest, disk_size)
)
else:
diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
index bbe8d813d7..cc62b67918 100644
--- a/tests/unit/modules/test_virt.py
+++ b/tests/unit/modules/test_virt.py
@@ -1106,7 +1106,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
with patch.dict(virt.__salt__, {'cmd.run': mock_run}): # pylint: disable=no-member
# Ensure the init() function allows creating VM without NIC and disk
- virt.init('testvm',
+ virt.init('test vm',
2,
1234,
nic=None,
@@ -1120,7 +1120,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
# Test case creating disks
defineMock.reset_mock()
mock_run.reset_mock()
- virt.init('testvm',
+ virt.init('test vm',
2,
1234,
nic=None,
@@ -1134,10 +1134,10 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
definition = ET.fromstring(defineMock.call_args_list[0][0][0])
disk_sources = [disk.find('source').get('file') if disk.find('source') is not None else None
for disk in definition.findall('./devices/disk')]
- expected_disk_path = os.path.join(root_dir, 'testvm_system.qcow2')
+ expected_disk_path = os.path.join(root_dir, 'test vm_system.qcow2')
self.assertEqual(disk_sources, [expected_disk_path, None])
self.assertEqual(mock_run.call_args[0][0],
- 'qemu-img create -f qcow2 {0} 10240M'.format(expected_disk_path))
+ 'qemu-img create -f qcow2 "{0}" 10240M'.format(expected_disk_path))
self.assertEqual(mock_chmod.call_args[0][0], expected_disk_path)
def test_update(self):
@@ -1147,7 +1147,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
root_dir = os.path.join(salt.syspaths.ROOT_DIR, 'srv', 'salt-images')
xml = '''
<domain type='kvm' id='7'>
- <name>myvm</name>
+ <name>my vm</name>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='auto'>1</vcpu>
@@ -1157,7 +1157,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
<devices>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
- <source file='{0}{1}myvm_system.qcow2'/>
+ <source file='{0}{1}my vm_system.qcow2'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
@@ -1165,7 +1165,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
- <source file='{0}{1}myvm_data.qcow2'/>
+ <source file='{0}{1}my vm_data.qcow2'/>
<backingStore/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
@@ -1198,7 +1198,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
</devices>
</domain>
'''.format(root_dir, os.sep)
- domain_mock = self.set_mock_vm('myvm', xml)
+ domain_mock = self.set_mock_vm('my vm', xml)
domain_mock.OSType = MagicMock(return_value='hvm')
define_mock = MagicMock(return_value=True)
self.mock_conn.defineXML = define_mock
@@ -1211,7 +1211,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'cpu': True,
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', cpu=2))
+ }, virt.update('my vm', cpu=2))
setxml = ET.fromstring(define_mock.call_args[0][0])
self.assertEqual(setxml.find('vcpu').text, '2')
self.assertEqual(setvcpus_mock.call_args[0][0], 2)
@@ -1225,7 +1225,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'mem': True,
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', mem=2048))
+ }, virt.update('my vm', mem=2048))
setxml = ET.fromstring(define_mock.call_args[0][0])
self.assertEqual(setxml.find('memory').text, '2048')
self.assertEqual(setxml.find('memory').get('unit'), 'MiB')
@@ -1240,21 +1240,21 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
mock_run = MagicMock()
with patch.dict(os.__dict__, {'chmod': mock_chmod, 'makedirs': MagicMock()}): # pylint: disable=no-member
with patch.dict(virt.__salt__, {'cmd.run': mock_run}): # pylint: disable=no-member
- ret = virt.update('myvm', disk_profile='default', disks=[
+ ret = virt.update('my vm', disk_profile='default', disks=[
{'name': 'cddrive', 'device': 'cdrom', 'source_file': None, 'model': 'ide'},
{'name': 'added', 'size': 2048}])
added_disk_path = os.path.join(
- virt.__salt__['config.get']('virt:images'), 'myvm_added.qcow2') # pylint: disable=no-member
+ virt.__salt__['config.get']('virt:images'), 'my vm_added.qcow2') # pylint: disable=no-member
self.assertEqual(mock_run.call_args[0][0],
- 'qemu-img create -f qcow2 {0} 2048M'.format(added_disk_path))
+ 'qemu-img create -f qcow2 "{0}" 2048M'.format(added_disk_path))
self.assertEqual(mock_chmod.call_args[0][0], added_disk_path)
self.assertListEqual(
- [None, os.path.join(root_dir, 'myvm_added.qcow2')],
+ [None, os.path.join(root_dir, 'my vm_added.qcow2')],
[ET.fromstring(disk).find('source').get('file') if str(disk).find('<source') > -1 else None
for disk in ret['disk']['attached']])
self.assertListEqual(
- [os.path.join(root_dir, 'myvm_data.qcow2')],
+ [os.path.join(root_dir, 'my vm_data.qcow2')],
[ET.fromstring(disk).find('source').get('file') for disk in ret['disk']['detached']])
self.assertEqual(devattach_mock.call_count, 2)
devdetach_mock.assert_called_once()
@@ -1271,7 +1271,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
devattach_mock.reset_mock()
devdetach_mock.reset_mock()
with patch.dict(salt.modules.config.__opts__, mock_config): # pylint: disable=no-member
- ret = virt.update('myvm', nic_profile='myprofile',
+ ret = virt.update('my vm', nic_profile='myprofile',
interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
'mac': '52:54:00:39:02:b1'},
{'name': 'eth1', 'type': 'network', 'source': 'newnet'}])
@@ -1285,7 +1285,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
# Remove nics case
devattach_mock.reset_mock()
devdetach_mock.reset_mock()
- ret = virt.update('myvm', nic_profile=None, interfaces=[])
+ ret = virt.update('my vm', nic_profile=None, interfaces=[])
self.assertEqual([], ret['interface']['attached'])
self.assertEqual(2, len(ret['interface']['detached']))
devattach_mock.assert_not_called()
@@ -1294,7 +1294,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
# Remove disks case (yeah, it surely is silly)
devattach_mock.reset_mock()
devdetach_mock.reset_mock()
- ret = virt.update('myvm', disk_profile=None, disks=[])
+ ret = virt.update('my vm', disk_profile=None, disks=[])
self.assertEqual([], ret['disk']['attached'])
self.assertEqual(2, len(ret['disk']['detached']))
devattach_mock.assert_not_called()
@@ -1305,7 +1305,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'definition': True,
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', graphics={'type': 'vnc'}))
+ }, virt.update('my vm', graphics={'type': 'vnc'}))
setxml = ET.fromstring(define_mock.call_args[0][0])
self.assertEqual('vnc', setxml.find('devices/graphics').get('type'))
@@ -1314,7 +1314,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'definition': False,
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', cpu=1, mem=1024,
+ }, virt.update('my vm', cpu=1, mem=1024,
disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
nic_profile='myprofile',
interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
@@ -1328,7 +1328,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error")
setmem_mock.reset_mock()
with self.assertRaises(self.mock_libvirt.libvirtError):
- virt.update('myvm', mem=2048)
+ virt.update('my vm', mem=2048)
# Failed single update failure case
self.mock_conn.defineXML = MagicMock(return_value=True)
@@ -1338,7 +1338,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'errors': ['Failed to live change memory'],
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', mem=2048))
+ }, virt.update('my vm', mem=2048))
# Failed multiple updates failure case
self.assertEqual({
@@ -1347,7 +1347,7 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
'cpu': True,
'disk': {'attached': [], 'detached': []},
'interface': {'attached': [], 'detached': []}
- }, virt.update('myvm', cpu=4, mem=2048))
+ }, virt.update('my vm', cpu=4, mem=2048))
def test_mixed_dict_and_list_as_profile_objects(self):
'''
--
2.21.0

Some files were not shown because too many files have changed in this diff Show More