aeed45986b
- Update to 2018.3.0 - Modified: * explore-module.run-response-to-catch-the-result-in-d.patch * add-saltssh-multi-version-support-across-python-inte.patch * run-salt-api-as-user-salt-bsc-1064520.patch * fix-openscap-push.patch * fix-decrease-loglevel-when-unable-to-resolve-addr.patch * fix-cp.push-empty-file.patch * make-it-possible-to-use-login-pull-and-push-from-mod.patch * avoid-excessive-syslogging-by-watchdog-cronjob-58.patch * feat-add-grain-for-all-fqdns.patch * fix-bsc-1065792.patch * run-salt-master-as-dedicated-salt-user.patch * move-log_file-option-to-changeable-defaults.patch * activate-all-beacons-sources-config-pillar-grains.patch * remove-obsolete-unicode-handling-in-pkg.info_install.patch - Add python-2.6 support to salt-ssh - Modified: * add-saltssh-multi-version-support-across-python-inte.patch - Update salt-ssh multiversion patch - Modified: * add-saltssh-multi-version-support-across-python-inte.patch - Removed: * require-same-major-version-while-minor-is-allowed-to.patch OBS-URL: https://build.opensuse.org/request/show/594031 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=117
73 lines
2.5 KiB
Diff
73 lines
2.5 KiB
Diff
From 14128fc65bf007bbb5b27b3eedec30b7f729bfbd Mon Sep 17 00:00:00 2001
|
|
From: Michele Bologna <michele.bologna@suse.com>
|
|
Date: Tue, 20 Mar 2018 19:27:36 +0100
|
|
Subject: [PATCH] Fix: decrease loglevel when unable to resolve addr
|
|
|
|
Upstream PR: https://github.com/saltstack/salt/pull/46575
|
|
|
|
It occurs that when the machine has multiple interfaces without an associated FQDN, Salt logs are polluted by this error.
|
|
Some examples:
|
|
|
|
```
|
|
caasp-admin:~ # uptime
|
|
09:08am up 0:13, 2 users, load average: 1.30, 1.37, 0.98
|
|
caasp-admin:~ # docker logs $(docker ps | grep salt-master | awk '{print $1}') 2>&1 | grep "Exception during resolving address" | wc -l
|
|
528
|
|
```
|
|
|
|
```
|
|
caasp-admin:~ # docker exec -it $(docker ps | grep salt-master | awk '{print $1}') salt '*' cmd.run uptime
|
|
b24f41eb4cc94624862ca0c9e8afcd15:
|
|
09:08am up 0:11, 0 users, load average: 1.26, 0.83, 0.40
|
|
admin:
|
|
09:08am up 0:13, 2 users, load average: 1.33, 1.37, 0.99
|
|
ba8c76af029043a39ba917f7ab2af796:
|
|
09:08am up 0:12, 0 users, load average: 0.84, 0.63, 0.32
|
|
7b7aa52158524556a0c46ae57569ce93:
|
|
09:08am up 0:11, 1 user, load average: 1.05, 0.77, 0.38
|
|
5ab0e18cbd084e9088a928a17edb86cb:
|
|
09:08am up 0:10, 0 users, load average: 0.12, 0.25, 0.20
|
|
1756c9cd9a9a402b91d8636400d1e512:
|
|
09:08am up 0:09, 0 users, load average: 0.12, 0.23, 0.14
|
|
ca:
|
|
09:08am up 0:13, 0 users, load average: 1.33, 1.37, 0.99
|
|
caasp-admin:~ # docker exec -it $(docker ps | grep salt-master | awk '{print $1}') salt '*' cmd.run "bash -c 'cat /var/log/salt/minion | grep \"Exception during resolving address\" | wc -l'"
|
|
admin:
|
|
63
|
|
ba8c76af029043a39ba917f7ab2af796:
|
|
47
|
|
5ab0e18cbd084e9088a928a17edb86cb:
|
|
55
|
|
7b7aa52158524556a0c46ae57569ce93:
|
|
59
|
|
b24f41eb4cc94624862ca0c9e8afcd15:
|
|
47
|
|
1756c9cd9a9a402b91d8636400d1e512:
|
|
59
|
|
ca:
|
|
25
|
|
```
|
|
|
|
This patch changes the log level of the exception to INFO, since the resolve-unable problem is not blocking.
|
|
---
|
|
salt/grains/core.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
|
index 96b7ce2cf2..17a7d9819a 100644
|
|
--- a/salt/grains/core.py
|
|
+++ b/salt/grains/core.py
|
|
@@ -1909,7 +1909,7 @@ def fqdns():
|
|
fqdns.add(socket.gethostbyaddr(ip)[0])
|
|
except (socket.error, socket.herror,
|
|
socket.gaierror, socket.timeout) as e:
|
|
- log.error("Exception during resolving address: " + str(e))
|
|
+ log.info("Exception during resolving address: " + str(e))
|
|
|
|
grains['fqdns'] = list(fqdns)
|
|
return grains
|
|
--
|
|
2.16.2
|
|
|
|
|