New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Parallel orchestration needs improvement #59959
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
@gabrielgt Thanks for the report. Still digging into this one but looks like (at the moment) the order of the orchestration states matter. Running the script provided and having them in the order you had I am able to reproduce this issue. Changing the order to looks like this (excluding serviceD) it appears to work as expected:
I suspect what is happens is that serviceA is running, then serviceB1 (which requires serviceA), then the state system is trying to run serviceB2 (which requires serviceB1 that has already run) and runs serviceC at the same time which only requires serviceA, which has already run. There is likely a bug somewhere in the logic that is ordering when the states should run. |
I have the same issue, parallel execution of orch SLSes with Small sample of tasks that should execute in parallel, but don't:
|
@garethgreenaway Any updates on this? |
|
Description
Execution of orchestration steps with
parallel: True
and dependencies among them usingrequire
does not work as expected.Setup
I am trying to execute states B1 and B2 in one minion and C in another one using
parallel: true
, that is:Dependencies among steps are indicated by
require
. The dependencies among steps could be more complicated and the results are still more unpredictable. But this example is simple enough to observe the problem.Salt files can be generated with the following script: https://gist.github.com/gabrielgt/e6c5337e2bd69dfefc61cee2c06cc12c
Steps to Reproduce the behavior
./make_parallel_test_structure_2.sh
salt-run state.orch delme.service_orch -l debug 2>&1 | egrep 'Running state|Completed state'
Expected behavior
The expected behavior is B1 and C starting approximately at the same time. But what happens is that C starts about the same time as B2.
The duration of A, B1, B2 and D is 30 seconds, and the duration of C is 60 seconds, so it should last 120 seconds in total, but instead it lasts 150 seconds.
Result:
Versions Report
Additional context
This issue is a continuation of issue #55121, partially solved by issue #58976.
The text was updated successfully, but these errors were encountered: