Closed nico-stefani closed 1 month ago
It was verified to run the test_manager_endpoints.tavern.yaml
locally to check its functionality. It was executed 4 times, and all passed successfully:
wazuh@javier:~/Git/wazuh$ git checkout v4.9.0-alpha3
Nota: cambiando a 'v4.9.0-alpha3'.
The tests that failed in test_manager_endpoints.tavern.yaml
in https://github.com/wazuh/wazuh/issues/24893 were :
FAILED test_manager_endpoints.tavern.yaml::GET /manager/configuration/validation (OK)
FAILED test_manager_endpoints.tavern.yaml::PUT /manager/configuration
FAILED test_manager_endpoints.tavern.yaml::GET /manager/version/check with update_check enabled
FAILED test_manager_endpoints.tavern.yaml::GET /manager/version/check with update_check service error
It was verified by rerunning the test in Jenkins with the same parameters as in the release, and they passed successfully:
Test name | Pass | XPass | Skip | XFail | Fail | Issues Ref. | Status |
---|---|---|---|---|---|---|---|
test_manager_endpoints.tavern.yaml | 35 | 0 | 0 | 0 | 0 | :green_circle: |
Investigating further into the files of the failed test, we found the following:
Timeout
:'title': 'Wazuh Internal Error', 'detail': 'Timeout executing API request'
Regarding the rest of the files:
The cluster.log
file of the master
is empty.
In the cluster.log
file of worker1
, we found the following:
2024/07/23 16:49:30 ERROR: [Local 803069] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:31 ERROR: [Local 97321] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:32 ERROR: [Local 848132] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:33 ERROR: [Local 882024] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:33 ERROR: [Local Server] [Main] Could not connect to master. Trying again in 10 seconds.
In the cluster.log
file of worker2
, we found the following:
2024/07/23 16:49:29 ERROR: [Local 118577] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:30 ERROR: [Local 734080] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:31 ERROR: [Local 466445] [Main] Internal error processing request 'b'sendsync'': Error 3023 - Worker node is not connected to master
2024/07/23 16:49:31 ERROR: [Local Server] [Main] Could not connect to master. Trying again in 10 seconds.
Also, within the ossec.log
files of both worker1
and worker2
, we found:
2024/07/23 16:49:23 wazuh-remoted: ERROR: Could not send message through the cluster after '10' attempts.
2024/07/23 16:49:23 wazuh-remoted: ERROR: Agent 'xxx' invalid or empty group assigned.
2024/07/23 16:49:23 wazuh-remoted: ERROR: Error getting group for agent '005'
2024/07/23 16:49:23 wazuh-remoted: WARNING: Could not connect to socket 'queue/cluster/c-internal.sock': No such file or directory (2).
2024/07/23 16:49:24 wazuh-remoted: WARNING: Cluster error detected
2024/07/23 16:49:25 wazuh-remoted: WARNING: Cluster error detected
It seems that the issue with the TIMEOUTs
is due to the workers being unable to establish a connection with the master node, leading to those timeouts and resulting in failures
cluster.log
file is empty, and the workers show attempts to connect to it. Within the ossec.log
file, no related errors or anything unusual are observedIn the previous release for the API integration tests in Alpha 2, they passed perfectly Release 4.9.0 - Alpha 2 - API integration tests without any failures
No changes in the code are evident during the period between releases that could have caused the test failure
There are also no reported problems with similar failures
It seems that this failure has been sporadic during the test execution, and based on the provided test results from both local and Jenkins runs, it appears that the test is functioning correctly
This may also be due to issue https://github.com/wazuh/wazuh/issues/24679, which has already been completed and merged into version 4.9.0
.
The API integration tests were relaunched with the changes merged from the issue to see if the tests that failed in the release alpha3 now pass correctly.
The API integration tests were rerun after merging the changes from https://github.com/wazuh/wazuh/issues/24679, and the tests that failed in https://github.com/wazuh/wazuh/issues/24893 passed successfully
Test name | Pass | XPass | Skip | XFail | Fail | Issues Ref. | Status |
---|---|---|---|---|---|---|---|
test_active_response_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_agent_DELETE_endpoints.tavern.yaml | 6 | 0 | 0 | 0 | 0 | :green_circle: | |
test_agent_GET_endpoints.tavern.yaml | 94 | 0 | 0 | 0 | 1 | https://github.com/wazuh/wazuh/issues/24106 | :yellow_circle: |
test_agent_POST_endpoints.tavern.yaml | 6 | 0 | 0 | 0 | 0 | :green_circle: | |
test_agent_PUT_endpoints.tavern.yaml | 10 | 0 | 0 | 0 | 0 | :green_circle: | |
test_cdb_list_endpoints.tavern.yaml | 5 | 0 | 0 | 0 | 0 | :green_circle: | |
test_cluster_endpoints.tavern.yaml | 49 | 0 | 0 | 0 | 0 | :green_circle: | |
test_decoder_endpoints.tavern.yaml | 25 | 0 | 0 | 0 | 0 | :green_circle: | |
test_default_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_event_endpoints.tavern.yaml | 5 | 0 | 0 | 0 | 0 | :green_circle: | |
test_experimental_endpoints.tavern.yaml | 12 | 0 | 0 | 0 | 0 | :green_circle: | |
test_logtest_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_manager_endpoints.tavern.yaml | 35 | 0 | 0 | 0 | 0 | :green_circle: | |
test_mitre_endpoints.tavern.yaml | 7 | 0 | 0 | 0 | 0 | :green_circle: | |
test_overview_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_active_response_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_agent_endpoints.tavern.yaml | 41 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_cdb_list_endpoints.tavern.yaml | 5 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_cluster_endpoints.tavern.yaml | 19 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_decoder_endpoints.tavern.yaml | 6 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_event_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_experimental_endpoints.tavern.yaml | 12 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_logtest_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_manager_endpoints.tavern.yaml | 16 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_mitre_endpoints.tavern.yaml | 7 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_overview_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_rootcheck_endpoints.tavern.yaml | 4 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_rule_endpoints.tavern.yaml | 8 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_sca_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_security_endpoints.tavern.yaml | 25 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_syscheck_endpoints.tavern.yaml | 4 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_syscollector_endpoints.tavern.yaml | 9 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_black_task_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_active_response_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_agent_endpoints.tavern.yaml | 41 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_all_endpoints.tavern.yaml | 162 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_cdb_list_endpoints.tavern.yaml | 5 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_cluster_endpoints.tavern.yaml | 19 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_decoder_endpoints.tavern.yaml | 6 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_event_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_experimental_endpoints.tavern.yaml | 12 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_logtest_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_manager_endpoints.tavern.yaml | 16 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_mitre_endpoints.tavern.yaml | 7 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_overview_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_rootcheck_endpoints.tavern.yaml | 4 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_rule_endpoints.tavern.yaml | 8 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_sca_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_security_endpoints.tavern.yaml | 25 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_syscheck_endpoints.tavern.yaml | 4 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_syscollector_endpoints.tavern.yaml | 9 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rbac_white_task_endpoints.tavern.yaml | 1 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rootcheck_endpoints.tavern.yaml | 4 | 0 | 0 | 0 | 0 | :green_circle: | |
test_rule_endpoints.tavern.yaml | 15 | 0 | 0 | 0 | 0 | :green_circle: | |
test_sca_endpoints.tavern.yaml | 45 | 0 | 0 | 0 | 0 | :green_circle: | |
test_security_DELETE_endpoints.tavern.yaml | 15 | 0 | 0 | 0 | 0 | :green_circle: | |
test_security_GET_endpoints.tavern.yaml | 11 | 0 | 0 | 0 | 0 | :green_circle: | |
test_security_POST_endpoints.tavern.yaml | 8 | 0 | 0 | 0 | 0 | :green_circle: | |
test_security_PUT_endpoints.tavern.yaml | 9 | 0 | 0 | 0 | 0 | :green_circle: | |
test_syscheck_endpoints.tavern.yaml | 34 | 0 | 0 | 0 | 0 | :green_circle: | |
test_syscollector_endpoints.tavern.yaml | 159 | 0 | 0 | 0 | 0 | :green_circle: | |
test_task_endpoints.tavern.yaml | 2 | 0 | 0 | 0 | 0 | :green_circle: |
The only failed test was test_agent_GET_endpoints
, which has already been investigated in https://github.com/wazuh/wazuh/issues/24106
The test failure was caused by API timeouts which were occurring because of an issue in the wazuh-analysisd
module connection with wazuh-db
. After this issue has been resolved, the tests execution was successfully and no timeouts were observed.
The investigation correctly pointed out the root cause of the problem and validated that the tests passed after the changes. LGTM.
LGTM
Description
During #24893 we detected a failure in the test_manager_endpoints.tavern.yaml integration tests.
Test_integration_endpoints_B4701_test_manager_endpoints.txt Test_integration_endpoints_B4701_test_manager_endpoints.zip Test_integration_endpoints_B4701_test_manager_endpoints_logs.zip
The root cause of the problem needs to be investigated.
Checks
The following elements have been updated or reviewed (should also be checked if no modification is required):
api/test/integration/mapping/_test_mapping.py
).