2021-01-08 13:41:50 +01:00
|
|
|
From caffb14059c2d4ab186cb24918f4e53332f697af Mon Sep 17 00:00:00 2001
|
2019-09-06 14:06:25 +02:00
|
|
|
From: Mihai Dinca <mdinca@suse.de>
|
|
|
|
Date: Fri, 14 Jun 2019 15:13:12 +0200
|
|
|
|
Subject: [PATCH] Move server_id deprecation warning to reduce log
|
|
|
|
spamming (bsc#1135567) (bsc#1135732)
|
|
|
|
|
|
|
|
---
|
2021-01-08 13:41:50 +01:00
|
|
|
salt/grains/core.py | 7 -------
|
|
|
|
salt/minion.py | 10 ++++++++++
|
|
|
|
2 files changed, 10 insertions(+), 7 deletions(-)
|
2019-09-06 14:06:25 +02:00
|
|
|
|
|
|
|
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index d7d03c5e70..5f18ba4a58 100644
|
2019-09-06 14:06:25 +02:00
|
|
|
--- a/salt/grains/core.py
|
|
|
|
+++ b/salt/grains/core.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -3066,13 +3066,6 @@ def get_server_id():
|
|
|
|
& 0xFFFFFFFF
|
|
|
|
)
|
2019-09-06 14:06:25 +02:00
|
|
|
else:
|
2021-01-08 13:41:50 +01:00
|
|
|
- salt.utils.versions.warn_until(
|
|
|
|
- "Sodium",
|
|
|
|
- "This server_id is computed nor by Adler32 neither by CRC32. "
|
|
|
|
- 'Please use "server_id_use_crc" option and define algorithm you'
|
|
|
|
- 'prefer (default "Adler32"). The server_id will be computed with'
|
|
|
|
- "Adler32 by default.",
|
|
|
|
- )
|
2019-09-06 14:06:25 +02:00
|
|
|
id_hash = _get_hash_by_shell()
|
2021-01-08 13:41:50 +01:00
|
|
|
server_id = {"server_id": id_hash}
|
2019-09-06 14:06:25 +02:00
|
|
|
|
|
|
|
diff --git a/salt/minion.py b/salt/minion.py
|
2021-01-08 13:41:50 +01:00
|
|
|
index 4da665a130..4d271c6d08 100644
|
2019-09-06 14:06:25 +02:00
|
|
|
--- a/salt/minion.py
|
|
|
|
+++ b/salt/minion.py
|
2021-01-08 13:41:50 +01:00
|
|
|
@@ -82,6 +82,7 @@ from salt.utils.event import tagify
|
|
|
|
from salt.utils.network import parse_host_port
|
|
|
|
from salt.utils.odict import OrderedDict
|
|
|
|
from salt.utils.process import ProcessManager, SignalHandlingProcess, default_signals
|
2019-09-06 14:06:25 +02:00
|
|
|
+from salt.utils.versions import warn_until
|
2021-01-08 13:41:50 +01:00
|
|
|
from salt.utils.zeromq import ZMQ_VERSION_INFO, ZMQDefaultLoop, install_zmq, zmq
|
|
|
|
|
|
|
|
HAS_PSUTIL = False
|
|
|
|
@@ -1096,6 +1097,15 @@ class MinionManager(MinionBase):
|
|
|
|
):
|
2019-09-06 14:06:25 +02:00
|
|
|
masters = [masters]
|
|
|
|
|
2021-01-08 13:41:50 +01:00
|
|
|
+ if not self.opts.get("server_id_use_crc"):
|
2019-09-06 14:06:25 +02:00
|
|
|
+ warn_until(
|
2021-01-08 13:41:50 +01:00
|
|
|
+ "Sodium",
|
|
|
|
+ "This server_id is computed nor by Adler32 neither by CRC32. "
|
|
|
|
+ 'Please use "server_id_use_crc" option and define algorithm you'
|
|
|
|
+ 'prefer (default "Adler32"). The server_id will be computed with'
|
|
|
|
+ "Adler32 by default.",
|
|
|
|
+ )
|
2019-09-06 14:06:25 +02:00
|
|
|
+
|
2019-11-28 16:41:55 +01:00
|
|
|
beacons_leader = True
|
2019-09-06 14:06:25 +02:00
|
|
|
for master in masters:
|
|
|
|
s_opts = copy.deepcopy(self.opts)
|
|
|
|
--
|
2021-01-08 13:41:50 +01:00
|
|
|
2.29.2
|
2019-09-06 14:06:25 +02:00
|
|
|
|
|
|
|
|