Comments (6)
I can confirm this happening on all our minions (Debian and Windows) after having upgraded to 3007.1.
The log contains the same message as reported above, enabling tracemalloc reveals the corresponding code line:
root@minion ~
# export PYTHONTRACEMALLOC=1
root@minion ~
# salt-minion -l debug
[ ... some more debug messages ...]
[INFO ] Minion is ready to receive requests!
/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py:2434: RuntimeWarning: coroutine 'Minion._handle_decoded_payload' was never awaited
self._handle_decoded_payload(data)
Object allocated at (most recent call last):
File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py", lineno 2434
self._handle_decoded_payload(data)
The corresponding code block
Line 2434 in 0ff4384
startup_states
option and fails to do so because of the missing await
.Adding await requires making the calling functions async. By manually fixing
/opt/saltstack/salt/lib/python3.10/site-packages/salt/minion.py
with the changes below highstating works as expected.
Changes:
diff --git a/minion_old.py b/minion.py
index 68733a5..a4ebbe3 100644
--- a/minion_old.py
+++ b/minion.py
@@ -1144,7 +1144,7 @@ class MinionManager(MinionBase):
minion.setup_scheduler(before_connect=True)
if minion.opts.get("master_type", "str") != "disable":
await minion.connect_master(failed=failed)
- minion.tune_in(start=False)
+ await minion.tune_in(start=False)
self.minions.append(minion)
break
except SaltClientError as exc:
@@ -2406,7 +2406,7 @@ class Minion(MinionBase):
log.trace("ret_val = %s", ret_val) # pylint: disable=no-member
return ret_val
- def _state_run(self):
+ async def _state_run(self):
"""
Execute a state run based on information set in the minion config file
"""
@@ -2431,7 +2431,7 @@ class Minion(MinionBase):
else:
data["fun"] = "state.highstate"
data["arg"] = []
- self._handle_decoded_payload(data)
+ await self._handle_decoded_payload(data)
def _refresh_grains_watcher(self, refresh_interval_in_minutes):
"""
@@ -3110,7 +3110,7 @@ class Minion(MinionBase):
return True
# Main Minion Tune In
- def tune_in(self, start=True):
+ async def tune_in(self, start=True):
"""
Lock onto the publisher. This is the main event loop for the minion
:rtype : None
@@ -3137,7 +3137,7 @@ class Minion(MinionBase):
salt.utils.win_functions.enable_ctrl_logoff_handler()
# On first startup execute a state run if configured to do so
- self._state_run()
+ await self._state_run()
self.setup_beacons()
self.setup_scheduler()
from salt.
Hi there,
we also have the same issue with the version 3007.1 on all of our minions. startup_states: highstate is not working anymore.
from salt.
If anyone is looking for a workaround:
We enabled salt's reactor with the example from the docs adapted slightly.
root@master ~
# cat /etc/salt/master.d/reactor.conf
reactor:
- 'salt/minion/*/start': # Match tag "salt/minion/*/start"
- /srv/reactor/start.sls # Things to do when a minion starts
root@master ~
# cat /srv/reactor/start.sls
highstate_run:
local.state.apply:
- tgt: {{ data['id'] }}
from salt.
Thanks @transistortim,
this also worked for us.
Nice workaround.
If anyone is looking for a workaround: We enabled salt's reactor with the example from the docs adapted slightly.
root@master ~ # cat /etc/salt/master.d/reactor.conf reactor: - 'salt/minion/*/start': # Match tag "salt/minion/*/start" - /srv/reactor/start.sls # Things to do when a minion starts root@master ~ # cat /srv/reactor/start.sls highstate_run: local.state.apply: - tgt: {{ data['id'] }}
from salt.
Can confirm that this also happens when using startup_states: 'sls'
. I'm using 3007.1
from salt.
Confirmed here too. Which, in our case, means that new machines will not be configured properly and that messes up our deployments.
from salt.
Related Issues (20)
- [BUG] Master cluster event port is not documented or configurable.
- [DOCS] Witing grains guide does not mention the grains argument
- [BUG] [3007.1] Nonce verification error
- [BUG] In sls with multiple pkg.installed states the first one is always skipped HOT 1
- Upgrade relenv to 0.16.1 HOT 1
- [BUG] 3007.1 Windows Minion file.directory causes No mapping between account names and security IDs was done when off domain HOT 3
- [BUG] usage of external_auth and rest_cherrypy is mutually exclusive in 3007.1
- [DOCS] Add info in ansible modules about requirements for new ansible-core
- [BUG] ansible modules broken if using ansible-core default installation
- [BUG] The "status.diskusage" function sometimes crashes in some distros
- Salt displays an unhelpful error message when a sls file has no state
- [BUG] Performance of get_hash() method. HOT 1
- [BUG] jinja sls variables like sls, slspath, tpldir are not loaded for saltcheck.run_state_tests
- [Vulnerability] Vulnerability issue /opt/saltstack/salt/lib/libcrypto.so.3 HOT 2
- [TECH DEBT] Upgrade dependencies
- [BUG] can't use grains in pillar anymore HOT 3
- [TECH DEBT] Migrate tests/integration/loader/test_ext_grains.py to pytest
- [DOCS] scheduled-jobs page has a missing link to logging
- [3006.x][TECH-DEBT] Fix Package integration tests for MacOS and Ubuntu Arm64 HOT 1
- 'pip.installed' is not available HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salt.