[BUG] salt.parallel_runners is broken (missing LoaderContext)
Open
@dwoz is already working on this.
Since Feb 9, 2024.
bug
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
# test_orch.sls
parallel-state:
salt.parallel_runners:
- runners:
my_runner_1:
- name: test.stdout_print
salt-run state.orch test_orch
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "/home/vagrant/repo/salt/state.py", line 2429, in call
ret = self.states[cdata["full"]](
File "/home/vagrant/repo/salt/loader/lazy.py", line 160, in __call__
ret = self.loader.run(run_func, *args, **kwargs)
File "/home/vagrant/repo/salt/loader/lazy.py", line 1233, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/home/vagrant/repo/salt/loader/lazy.py", line 1248, in _run_as
return _func_or_method(*args, **kwargs)
File "/home/vagrant/repo/salt/loader/lazy.py", line 1281, in wrapper
return f(*args, **kwargs)
File "/home/vagrant/repo/salt/states/saltmod.py", line 913, in parallel_runners
outputs = _parallel_map(call_runner, list(runners.values()))
File "/home/vagrant/repo/salt/states/saltmod.py", line 97, in _parallel_map
raise exc_value.with_traceback(exc_traceback)
File "/home/vagrant/repo/salt/states/saltmod.py", line 83, in run_thread
outputs[index] = func(inputs[index])
File "/home/vagrant/repo/salt/states/saltmod.py", line 904, in call_runner
return __salt__["saltutil.runner"](
File "/home/vagrant/repo/salt/loader/context.py", line 85, in __getitem__
return self.value()[item]
TypeError: 'NoneType' object is not subscriptable
Setup
- VM
- virtualenv
- salt 3007.0rc1+375.g540b8ab548 (Chlorine)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.