salt: [DOCS] solution in FAQ on restarting minion after upgrade no longer works
Description The policy layer method in https://docs.saltproject.io/en/latest/faq.html#upgrade-without-automatic-restart which used to work correctly, no longer works: applying this state now results in the following trace:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/minion.py", line 1905, in _thread_return
for executor in executors
File "/usr/lib/python3/dist-packages/salt/minion.py", line 1861, in _execute_job_function
executors[-1] = "sudo" # replace the last one with sudo
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
File "/usr/lib/python3/dist-packages/salt/executors/direct_call.py", line 12, in execute
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
File "/usr/lib/python3/dist-packages/salt/modules/state.py", line 792, in apply_
if mods:
File "/usr/lib/python3/dist-packages/salt/modules/state.py", line 1391, in sls
snapper_pre = _snapper_pre(opts, kwargs.get("__pub_jid", "called localy"))
File "/usr/lib/python3/dist-packages/salt/state.py", line 3269, in call_high
# Verify that the high data is structurally sound
File "/usr/lib/python3/dist-packages/salt/state.py", line 2495, in call_chunks
if action == "kill":
File "/usr/lib/python3/dist-packages/salt/state.py", line 2980, in call_chunk
self.event(
File "/usr/lib/python3/dist-packages/salt/state.py", line 2999, in call_chunk
elif status == "met":
File "/usr/lib/python3/dist-packages/salt/utils/decorators/state.py", line 45, in _func
result = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/state.py", line 2229, in call
if low.get("__prereq__"):
File "/usr/lib/python3/dist-packages/salt/state.py", line 1256, in check_refresh
return
File "/usr/lib/python3/dist-packages/salt/state.py", line 1213, in module_refresh
Refresh all the modules
File "/usr/lib/python3/dist-packages/salt/state.py", line 1191, in load_modules
providers = {}
File "/usr/lib/python3/dist-packages/salt/loader.py", line 738, in render
salt.exceptions.LoaderError: The renderer jinja|yaml is unavailable, this error is often because the needed software is unavailable
Type of documentation FAQ – though this perhaps should be part of core documentation.
Location or format of documentation https://docs.saltproject.io/en/latest/faq.html#what-is-the-best-way-to-restart-a-salt-minion-daemon-using-salt-after-upgrade
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 15 (11 by maintainers)
@alrf Yes, the issue is still present in v3006. Luckily the workaround still works. Without using a state, it is even easier:
I have used this method several times in different environments and it is very reliable.
Silly me. I saw that note, but in all my swapping around between production salts and lab salts, I missed the upgrade in my lab env before testing the upgrade to a lab minion, which is where I’ve been testing this issue.
I managed to pull the deb for 3004 out of my apt cache and retry the upgrade after upgrading the master and it does look like the upgrade went off without a hitch when taking into consideration that the master should be updated first.
Thanks for the sanity check 😄
Same here. Could it have something to do with the fact that the directory structure changed from 3003 to 3004? For example: