osc copypac from project:systemsmanagement:saltstack:testing package:salt revision:262
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=136
This commit is contained in:
parent
5bab2422ba
commit
5f0701bf52
@ -1 +1 @@
|
||||
bf25c6e7dd034e44a3d16de37485c1914d6a93f5
|
||||
a2ebac5641c371563ae0521639d3ff2f3aed22c1
|
45
do-not-report-patches-as-installed-when-not-all-the-.patch
Normal file
45
do-not-report-patches-as-installed-when-not-all-the-.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 769c9e85499bc9912b050fff7d3105690f1d7c7b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
||||
<psuarezhernandez@suse.com>
|
||||
Date: Wed, 13 Mar 2019 16:14:07 +0000
|
||||
Subject: [PATCH] Do not report patches as installed when not all the
|
||||
related packages are installed (bsc#1128061)
|
||||
|
||||
Co-authored-by: Mihai Dinca <mdinca@suse.de>
|
||||
---
|
||||
salt/modules/yumpkg.py | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/salt/modules/yumpkg.py b/salt/modules/yumpkg.py
|
||||
index 4f26a41670..5ec3835574 100644
|
||||
--- a/salt/modules/yumpkg.py
|
||||
+++ b/salt/modules/yumpkg.py
|
||||
@@ -3212,12 +3212,18 @@ def _get_patches(installed_only=False):
|
||||
for line in salt.utils.itertools.split(ret, os.linesep):
|
||||
inst, advisory_id, sev, pkg = re.match(r'([i|\s]) ([^\s]+) +([^\s]+) +([^\s]+)',
|
||||
line).groups()
|
||||
- if inst != 'i' and installed_only:
|
||||
- continue
|
||||
- patches[advisory_id] = {
|
||||
- 'installed': True if inst == 'i' else False,
|
||||
- 'summary': pkg
|
||||
- }
|
||||
+ if not advisory_id in patches:
|
||||
+ patches[advisory_id] = {
|
||||
+ 'installed': True if inst == 'i' else False,
|
||||
+ 'summary': [pkg]
|
||||
+ }
|
||||
+ else:
|
||||
+ patches[advisory_id]['summary'].append(pkg)
|
||||
+ if inst != 'i':
|
||||
+ patches[advisory_id]['installed'] = False
|
||||
+
|
||||
+ if installed_only:
|
||||
+ patches = {k: v for k, v in patches.items() if v['installed']}
|
||||
return patches
|
||||
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
12
salt.changes
12
salt.changes
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 30 11:51:59 UTC 2019 - psuarezhernandez@suse.com
|
||||
|
||||
- Use ThreadPool from multiprocessing.pool to avoid leakings
|
||||
when calculating FQDNs
|
||||
- Do not report patches as installed on RHEL systems when not all
|
||||
the related packages are installed (bsc#1128061)
|
||||
|
||||
- Added:
|
||||
* use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
|
||||
* do-not-report-patches-as-installed-when-not-all-the-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 26 10:00:01 UTC 2019 - mdinca@suse.de
|
||||
|
||||
|
@ -163,6 +163,10 @@ Patch47: calculate-fqdns-in-parallel-to-avoid-blockings-bsc-1.patch
|
||||
Patch48: fix-async-batch-race-conditions.patch
|
||||
#PATCH-FIX_OPENSUSE: https://github.com/openSUSE/salt/pull/141
|
||||
Patch49: add-batch_presence_ping_timeout-and-batch_presence_p.patch
|
||||
#PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/52657
|
||||
Patch50: do-not-report-patches-as-installed-when-not-all-the-.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/52527
|
||||
Patch51: use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
|
||||
|
||||
# BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -670,6 +674,8 @@ cp %{S:5} ./.travis.yml
|
||||
%patch47 -p1
|
||||
%patch48 -p1
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
|
||||
%build
|
||||
%if 0%{?build_py2}
|
||||
|
47
use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
Normal file
47
use-threadpool-from-multiprocessing.pool-to-avoid-le.patch
Normal file
@ -0,0 +1,47 @@
|
||||
From cd8e175738f7742fbb7c9e9d329039371bc0e579 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?=
|
||||
<psuarezhernandez@suse.com>
|
||||
Date: Tue, 30 Apr 2019 10:51:42 +0100
|
||||
Subject: [PATCH] Use ThreadPool from multiprocessing.pool to avoid
|
||||
leakings
|
||||
|
||||
---
|
||||
salt/grains/core.py | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
||||
index 796458939d..fec7b204bc 100644
|
||||
--- a/salt/grains/core.py
|
||||
+++ b/salt/grains/core.py
|
||||
@@ -26,7 +26,7 @@ from errno import EACCES, EPERM
|
||||
import datetime
|
||||
import warnings
|
||||
|
||||
-from multiprocessing.dummy import Pool as ThreadPool
|
||||
+from multiprocessing.pool import ThreadPool
|
||||
|
||||
# pylint: disable=import-error
|
||||
try:
|
||||
@@ -2225,10 +2225,14 @@ def fqdns():
|
||||
# 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
|
||||
# that "socket.timeout" was reached multiple times secuencially, blocking execution for several seconds.
|
||||
- pool = ThreadPool(8)
|
||||
- results = pool.map(_lookup_fqdn, addresses)
|
||||
- pool.close()
|
||||
- pool.join()
|
||||
+
|
||||
+ try:
|
||||
+ pool = ThreadPool(8)
|
||||
+ results = pool.map(_lookup_fqdn, addresses)
|
||||
+ pool.close()
|
||||
+ pool.join()
|
||||
+ except Exception as exc:
|
||||
+ log.error("Exception while creating a ThreadPool for resolving FQDNs: %s", exc)
|
||||
|
||||
for item in results:
|
||||
if item:
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user