-
Notifications
You must be signed in to change notification settings - Fork 32
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
DTT1 - Workflow module - Bug with threads #5220
Comments
UPDATEI've tested the workflow's thread parameter with two workflows. I've used Visual Studio code to launch the workflow_engine. 🆗 TEST 1 - One manager, 2 agents; threads=3workflow.yml file
Console outputcd /home/marcelo/wazuh/wazuh-qa/deployability/ ; (dtt-test) marcelo@marcelo-B460-AORUS-PRO-AC:~/wazuh/wazuh-qa$ cd /home/marcelo/wazuh/wazuh-qa/deployability/ ; /usr/bin/env /home/marcelo/.pyenv/versions/dtt-test/bin/python /home/marcelo/.vscode/extensions/ms-python.debugpy-2024.4.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 40967 -- /home/marcelo/wazuh/wazuh-qa/deployability/modules/workflow_engine/__main__.py --threads 3 /home/marcelo/wazuh/test.yml
[2024-04-16 12:47:53] [INFO] [423209] [MainThread] [workflow_engine]: Executing DAG tasks.
[2024-04-16 12:47:53] [INFO] [423209] [MainThread] [workflow_engine]: Executing tasks in parallel.
[2024-04-16 12:48:02] [INFO] [423209] [ThreadPoolExecutor-0_2] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Starting task.
[2024-04-16 12:48:02] [INFO] [423209] [ThreadPoolExecutor-0_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 12:48:02] [INFO] [423209] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 12:48:42] [INFO] [423209] [ThreadPoolExecutor-0_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Finished task in 40.65 seconds.
[2024-04-16 12:49:26] [INFO] [423209] [ThreadPoolExecutor-0_2] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Finished task in 83.82 seconds.
[2024-04-16 12:49:28] [INFO] [423209] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Finished task in 86.75 seconds.
[2024-04-16 12:49:33] [INFO] [423209] [ThreadPoolExecutor-0_1] [workflow_engine]: [provision-manager-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 12:54:26] [INFO] [423209] [ThreadPoolExecutor-0_1] [workflow_engine]: [provision-manager-linux-ubuntu-22.04-amd64] Finished task in 292.49 seconds.
[2024-04-16 12:54:26] [INFO] [423209] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-linux-ubuntu-20.04-amd64-tests] Starting task.
[2024-04-16 12:54:26] [INFO] [423209] [ThreadPoolExecutor-0_2] [workflow_engine]: [run-agent-linux-ubuntu-18.04-amd64-tests] Starting task.
[2024-04-16 13:01:30] [INFO] [423209] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-linux-ubuntu-20.04-amd64-tests] Finished task in 424.62 seconds.
[2024-04-16 13:01:31] [INFO] [423209] [ThreadPoolExecutor-0_2] [workflow_engine]: [run-agent-linux-ubuntu-18.04-amd64-tests] Finished task in 425.11 seconds.
[2024-04-16 13:01:31] [INFO] [423209] [MainThread] [workflow_engine]: Executing Reverse DAG tasks.
[2024-04-16 13:01:31] [INFO] [423209] [MainThread] [workflow_engine]: Executing tasks in parallel.
[2024-04-16 13:01:39] [INFO] [423209] [ThreadPoolExecutor-1_0] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Starting task.
[2024-04-16 13:01:39] [INFO] [423209] [ThreadPoolExecutor-1_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 13:01:39] [INFO] [423209] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 13:02:14] [INFO] [423209] [ThreadPoolExecutor-1_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Finished task in 34.92 seconds.
[2024-04-16 13:02:45] [INFO] [423209] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-manager-linux-ubuntu-22.04-amd64] Finished task in 66.24 seconds.
[2024-04-16 13:03:00] [INFO] [423209] [ThreadPoolExecutor-1_0] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Finished task in 81.19 seconds. worflow.log file
🆗 TEST 2 - One manager, 12 agents; threads=13To run this workflow, I've used the branch workflow.yml file
Console output cd /home/marcelo/wazuh/wazuh-qa/deployability/ ; (dtt-test) marcelo@marcelo-B460-AORUS-PRO-AC:~/wazuh/wazuh-qa/deployability$ cd /home/marcelo/wazuh/wazuh-qa/deployability/ ; /usr/bin/env /home/marcelo/.pyenv/versions/dtt-test/bin/python /home/marcelo/.vscode/extensions/ms-python.debugpy-2024.4.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 42753 -- /home/marcelo/wazuh/wazuh-qa/deployability/modules/workflow_engine/__main__.py --threads 13 /home/marcelo/wazuh/test-2.yml
[2024-04-16 16:54:48] [INFO] [456815] [MainThread] [workflow_engine]: Executing DAG tasks.
[2024-04-16 16:54:48] [INFO] [456815] [MainThread] [workflow_engine]: Executing tasks in parallel.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [allocate-agent-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [allocate-agent-linux-debian-10-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_5] [workflow_engine]: [allocate-agent-linux-debian-11-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [allocate-agent-linux-debian-12-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [allocate-agent-linux-oracle-9-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [allocate-agent-linux-centos-7-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [allocate-agent-linux-centos-8-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [allocate-agent-linux-redhat-7-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [allocate-agent-linux-redhat-8-amd64] Starting task.
[2024-04-16 16:54:48] [INFO] [456815] [ThreadPoolExecutor-0_12] [workflow_engine]: [allocate-agent-linux-redhat-9-amd64] Starting task.
[2024-04-16 16:55:12] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [allocate-agent-linux-redhat-8-amd64] Finished task in 23.51 seconds.
[2024-04-16 16:55:12] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [allocate-agent-linux-amazon-2-amd64] Starting task.
[2024-04-16 16:55:12] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [allocate-manager-linux-ubuntu-20.04-amd64] Finished task in 23.85 seconds.
[2024-04-16 16:55:12] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [provision-manager-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 16:55:12] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [allocate-agent-linux-centos-7-amd64] Finished task in 24.17 seconds.
[2024-04-16 16:55:13] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Finished task in 24.56 seconds.
[2024-04-16 16:55:13] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [allocate-agent-linux-oracle-9-amd64] Finished task in 24.57 seconds.
[2024-04-16 16:55:13] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [allocate-agent-linux-debian-10-amd64] Finished task in 25.12 seconds.
[2024-04-16 16:55:14] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [allocate-agent-linux-ubuntu-22.04-amd64] Finished task in 25.46 seconds.
[2024-04-16 16:55:14] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [allocate-agent-linux-debian-12-amd64] Finished task in 25.77 seconds.
[2024-04-16 16:55:14] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Finished task in 26.09 seconds.
[2024-04-16 16:55:15] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [allocate-agent-linux-redhat-7-amd64] Finished task in 27.02 seconds.
[2024-04-16 16:55:15] [INFO] [456815] [ThreadPoolExecutor-0_12] [workflow_engine]: [allocate-agent-linux-redhat-9-amd64] Finished task in 27.31 seconds.
[2024-04-16 16:55:17] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [allocate-agent-linux-centos-8-amd64] Finished task in 28.81 seconds.
[2024-04-16 16:55:17] [INFO] [456815] [ThreadPoolExecutor-0_5] [workflow_engine]: [allocate-agent-linux-debian-11-amd64] Finished task in 28.85 seconds.
[2024-04-16 16:55:35] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [allocate-agent-linux-amazon-2-amd64] Finished task in 23.18 seconds.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [provision-manager-linux-ubuntu-20.04-amd64] Finished task in 292.66 seconds.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [provision-install-linux-ubuntu-18.04-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [provision-install-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [provision-install-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [provision-install-linux-debian-10-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [provision-install-linux-debian-11-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [provision-install-linux-debian-12-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [provision-install-linux-oracle-9-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [provision-install-linux-centos-7-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_12] [workflow_engine]: [provision-install-linux-centos-8-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [provision-install-linux-redhat-7-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_5] [workflow_engine]: [provision-install-linux-redhat-8-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [provision-install-linux-redhat-9-amd64] Starting task.
[2024-04-16 17:00:05] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [provision-install-linux-amazon-2-amd64] Starting task.
[2024-04-16 17:00:56] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [provision-install-linux-debian-10-amd64] Finished task in 51.67 seconds.
[2024-04-16 17:00:56] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [run-agent-linux-debian-10-amd64-tests] Starting task.
[2024-04-16 17:01:44] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [provision-install-linux-amazon-2-amd64] Finished task in 99.12 seconds.
[2024-04-16 17:01:44] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-linux-amazon-2-amd64-tests] Starting task.
[2024-04-16 17:01:59] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [provision-install-linux-debian-11-amd64] Finished task in 114.73 seconds.
[2024-04-16 17:01:59] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [run-agent-linux-debian-11-amd64-tests] Starting task.
[2024-04-16 17:02:05] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [run-agent-linux-debian-10-amd64-tests] Finished task in 68.48 seconds.
[2024-04-16 17:02:13] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [provision-install-linux-ubuntu-22.04-amd64] Finished task in 128.52 seconds.
[2024-04-16 17:02:13] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [run-agent-linux-ubuntu-22.04-amd64-tests] Starting task.
[2024-04-16 17:02:18] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [provision-install-linux-oracle-9-amd64] Finished task in 133.08 seconds.
[2024-04-16 17:02:18] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [run-agent-linux-oracle-9-amd64-tests] Starting task.
[2024-04-16 17:02:18] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [provision-install-linux-ubuntu-20.04-amd64] Finished task in 133.32 seconds.
[2024-04-16 17:02:18] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [run-agent-linux-ubuntu-20.04-amd64-tests] Starting task.
[2024-04-16 17:02:22] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [provision-install-linux-redhat-7-amd64] Finished task in 137.17 seconds.
[2024-04-16 17:02:22] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [run-agent-linux-redhat-7-amd64-tests] Starting task.
[2024-04-16 17:02:29] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [provision-install-linux-redhat-9-amd64] Finished task in 144.46 seconds.
[2024-04-16 17:02:29] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [run-agent-linux-redhat-9-amd64-tests] Starting task.
[2024-04-16 17:02:31] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [provision-install-linux-ubuntu-18.04-amd64] Finished task in 146.27 seconds.
[2024-04-16 17:02:31] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [run-agent-linux-ubuntu-18.04-amd64-tests] Starting task.
[2024-04-16 17:02:33] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [provision-install-linux-centos-7-amd64] Finished task in 147.76 seconds.
[2024-04-16 17:02:33] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [run-agent-linux-centos-7-amd64-tests] Starting task.
[2024-04-16 17:02:34] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [provision-install-linux-debian-12-amd64] Finished task in 149.23 seconds.
[2024-04-16 17:02:34] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [run-agent-linux-debian-12-amd64-tests] Starting task.
[2024-04-16 17:02:51] [INFO] [456815] [ThreadPoolExecutor-0_0] [workflow_engine]: [run-agent-linux-amazon-2-amd64-tests] Finished task in 66.99 seconds.
[2024-04-16 17:03:06] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [run-agent-linux-debian-11-amd64-tests] Finished task in 66.69 seconds.
[2024-04-16 17:03:08] [INFO] [456815] [ThreadPoolExecutor-0_5] [workflow_engine]: [provision-install-linux-redhat-8-amd64] Finished task in 183.17 seconds.
[2024-04-16 17:03:08] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [run-agent-linux-redhat-8-amd64-tests] Starting task.
[2024-04-16 17:03:10] [INFO] [456815] [ThreadPoolExecutor-0_12] [workflow_engine]: [provision-install-linux-centos-8-amd64] Finished task in 185.53 seconds.
[2024-04-16 17:03:10] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [run-agent-linux-centos-8-amd64-tests] Starting task.
[2024-04-16 17:03:19] [INFO] [456815] [ThreadPoolExecutor-0_4] [workflow_engine]: [run-agent-linux-ubuntu-22.04-amd64-tests] Finished task in 65.46 seconds.
[2024-04-16 17:03:23] [INFO] [456815] [ThreadPoolExecutor-0_7] [workflow_engine]: [run-agent-linux-oracle-9-amd64-tests] Finished task in 65.50 seconds.
[2024-04-16 17:03:24] [INFO] [456815] [ThreadPoolExecutor-0_1] [workflow_engine]: [run-agent-linux-ubuntu-20.04-amd64-tests] Finished task in 65.67 seconds.
[2024-04-16 17:03:28] [INFO] [456815] [ThreadPoolExecutor-0_2] [workflow_engine]: [run-agent-linux-redhat-7-amd64-tests] Finished task in 65.49 seconds.
[2024-04-16 17:03:35] [INFO] [456815] [ThreadPoolExecutor-0_9] [workflow_engine]: [run-agent-linux-redhat-9-amd64-tests] Finished task in 65.81 seconds.
[2024-04-16 17:03:36] [INFO] [456815] [ThreadPoolExecutor-0_11] [workflow_engine]: [run-agent-linux-ubuntu-18.04-amd64-tests] Finished task in 65.48 seconds.
[2024-04-16 17:03:38] [INFO] [456815] [ThreadPoolExecutor-0_8] [workflow_engine]: [run-agent-linux-centos-7-amd64-tests] Finished task in 65.15 seconds.
[2024-04-16 17:03:40] [INFO] [456815] [ThreadPoolExecutor-0_10] [workflow_engine]: [run-agent-linux-debian-12-amd64-tests] Finished task in 65.49 seconds.
[2024-04-16 17:04:16] [INFO] [456815] [ThreadPoolExecutor-0_6] [workflow_engine]: [run-agent-linux-redhat-8-amd64-tests] Finished task in 67.88 seconds.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-0_3] [workflow_engine]: [run-agent-linux-centos-8-amd64-tests] Finished task in 67.60 seconds.
[2024-04-16 17:04:18] [INFO] [456815] [MainThread] [workflow_engine]: Executing Reverse DAG tasks.
[2024-04-16 17:04:18] [INFO] [456815] [MainThread] [workflow_engine]: Executing tasks in parallel.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_0] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-agent-linux-ubuntu-22.04-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_3] [workflow_engine]: [allocate-agent-linux-debian-10-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_4] [workflow_engine]: [allocate-agent-linux-debian-11-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_5] [workflow_engine]: [allocate-agent-linux-debian-12-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_6] [workflow_engine]: [allocate-agent-linux-oracle-9-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_7] [workflow_engine]: [allocate-agent-linux-centos-7-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_8] [workflow_engine]: [allocate-agent-linux-centos-8-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_9] [workflow_engine]: [allocate-agent-linux-redhat-7-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_10] [workflow_engine]: [allocate-agent-linux-redhat-8-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_11] [workflow_engine]: [allocate-agent-linux-redhat-9-amd64] Starting task.
[2024-04-16 17:04:18] [INFO] [456815] [ThreadPoolExecutor-1_12] [workflow_engine]: [allocate-agent-linux-amazon-2-amd64] Starting task.
[2024-04-16 17:05:09] [INFO] [456815] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-agent-linux-ubuntu-22.04-amd64] Finished task in 50.55 seconds.
[2024-04-16 17:05:09] [INFO] [456815] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-manager-linux-ubuntu-20.04-amd64] Starting task.
[2024-04-16 17:05:09] [INFO] [456815] [ThreadPoolExecutor-1_1] [workflow_engine]: [allocate-agent-linux-ubuntu-20.04-amd64] Finished task in 50.57 seconds.
[2024-04-16 17:05:09] [INFO] [456815] [ThreadPoolExecutor-1_4] [workflow_engine]: [allocate-agent-linux-debian-11-amd64] Finished task in 51.19 seconds.
[2024-04-16 17:05:11] [INFO] [456815] [ThreadPoolExecutor-1_0] [workflow_engine]: [allocate-agent-linux-ubuntu-18.04-amd64] Finished task in 52.82 seconds.
[2024-04-16 17:05:11] [INFO] [456815] [ThreadPoolExecutor-1_8] [workflow_engine]: [allocate-agent-linux-centos-8-amd64] Finished task in 52.81 seconds.
[2024-04-16 17:05:11] [INFO] [456815] [ThreadPoolExecutor-1_9] [workflow_engine]: [allocate-agent-linux-redhat-7-amd64] Finished task in 53.40 seconds.
[2024-04-16 17:05:12] [INFO] [456815] [ThreadPoolExecutor-1_11] [workflow_engine]: [allocate-agent-linux-redhat-9-amd64] Finished task in 54.02 seconds.
[2024-04-16 17:05:25] [INFO] [456815] [ThreadPoolExecutor-1_7] [workflow_engine]: [allocate-agent-linux-centos-7-amd64] Finished task in 67.13 seconds.
[2024-04-16 17:05:25] [INFO] [456815] [ThreadPoolExecutor-1_5] [workflow_engine]: [allocate-agent-linux-debian-12-amd64] Finished task in 67.14 seconds.
[2024-04-16 17:05:27] [INFO] [456815] [ThreadPoolExecutor-1_12] [workflow_engine]: [allocate-agent-linux-amazon-2-amd64] Finished task in 69.32 seconds.
[2024-04-16 17:05:39] [INFO] [456815] [ThreadPoolExecutor-1_3] [workflow_engine]: [allocate-agent-linux-debian-10-amd64] Finished task in 81.47 seconds.
[2024-04-16 17:05:42] [INFO] [456815] [ThreadPoolExecutor-1_10] [workflow_engine]: [allocate-agent-linux-redhat-8-amd64] Finished task in 83.99 seconds.
[2024-04-16 17:05:56] [INFO] [456815] [ThreadPoolExecutor-1_6] [workflow_engine]: [allocate-agent-linux-oracle-9-amd64] Finished task in 98.34 seconds.
[2024-04-16 17:05:59] [INFO] [456815] [ThreadPoolExecutor-1_2] [workflow_engine]: [allocate-manager-linux-ubuntu-20.04-amd64] Finished task in 50.52 seconds worflow.log fileExecution time
|
UPDATE - STRANGE BEHAVIORSometimes, when I run workflows, whether I use the threads parameter or not, the allocation and clean-up tasks are executed OK, but the workflow does not perform the provision and the testing tasks. Here's a log file that shows the execution: I could not find a pattern to reproduce the behavior. |
@mhamra you could execute an execution with the following input and parameters: workflow.yml file
Execution command:Show dry-run: python3 -m workflow_engine input_yaml.yaml --log-level DEBUG --dry-run
Execute test: python3 -m workflow_engine input_yaml.yaml --log-level DEBUG
|
UPDATEI've run the workflow file provided by @fcaffieri with the option Here are the results
Analysis
ConclusionThe manager provisioning task runs the initialization script and exits without waiting for the manager installation to finish. While this approach is good because it allows the continuation of other tasks in parallel, the agent test should start after the manager installation finishes. To check the manager installation is finished and the manager is up and running, I think that we can implement one of these options:
|
UPDATEI've modified the workflow, adding a task that waits 5 minutes after provisioning the manager. All the tests depend on that task and the agent allocation.
AnalysisAfter adding a delay task, some agent tests finished well, but others failed. The delay may have been shorter than needed to finish the manager installation. |
External test
|
New analysisAnalyzing the executions and the logs, I notice that the problem occurs because the provision cannot connect to the VM that raised the allocation, throwing the error:
The problem is that the VM, even though it was created by the allocator, is still not available in AWS to connect. This was fixed from the allocation module in this issue: #5198 That said, tests were carried out both with and without threads and satisfactory results were obtained:
|
CONCLUSION
|
LGTM! |
LGTM |
Description
The objective of this issue is to solve the bug when executing the Workflow with threads. Currently, when executing an execution with several VMs, random errors are found due to execution with threads. If the same execution is performed without the threads parameter, it works correctly.
Tasks
Fix the bugThe text was updated successfully, but these errors were encountered: