-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Windows Agentd Integration tests fails for 4.8.0 RC2 #23465
Comments
This test deletes the 'clients.keys' file in order to force agentd to request a new key and then verifies that this new key has been received by monitoring the message "Valid key received" in the ossec.log file: def wait_enrollment(line):
"""Callback function to wait for enrollment."""
if 'Valid key received' in line:
return line
return None The log has been analyzed and while this message does not appear, neither does the message “Requesting a key from server: ”. However, the agent connects to the manager without problems: 2024/05/15 10:45:44 wazuh-agent[4620] start_agent.c:93 at connect_server(): INFO: Trying to connect to server ([127.0.0.1]:1514/tcp). 2024/05/15 10:45:44 wazuh-agent[4620] start_agent.c:365 at agent_handshake_to_server(): INFO: (4102): Connected to the server ([127.0.0.1]:1514/tcp). 2024/05/15 10:45:44 wazuh-agent[4620] notify.c:198 at run_notify(): DEBUG: Sending keep alive: #!-Microsoft Windows Server 2016 Datacenter [Ver: 10.0.14393.3204] - Wazuh v4.8.0 / ab73af41699f13fdd81903b5f23d8d00
4a8724b20dee0124ff9656783c490c4e merged.mg
#"_agent_ip":127.0.0.1
2024/05/15 10:45:44 wazuh-agent[4620] receiver.c:96 at receive_msg(): DEBUG: Received message: '#!-agent ack ' This indicates that agentd does not try to enroll again because it already has a valid key. Therefore, it seems that the 'client.keys' file is not being deleted. It can be seen that the function does not confirm that the file has been deleted: def delete_keys():
"""Remove the agent's client.keys file."""
os.remove(CLIENT_KEYS_PATH)
sleep(1) Apparently this is a flaky test. We will re-launch the test to confirm it and make changes to make it more robust. |
We have run the test again: https://ci.wazuh.info/job/Test_integration/47353/. In this case the test test_agentd_reconection_enrollment_no_keys_file[tcp] did not fail: I confirm that it is a flaky test. Therefore, I am going to modify it to make it more robust. |
Testing the integration test with new changes in jenkinsNew job: https://ci.wazuh.info/job/Test_integration/47361/ |
UpdateI have run the test test_agentd_reconnection.py locally several times and no errors occurred: I have manually deleted the file client.keys and run test_agentd_reconection_enrollment_no_keys_file[tcp]. In this case an exception occurs when os.remove() tries to remove the file that does not exist: I then manually opened the file and run the test. In this case the test does not fail: That is, in none of the cases has it been possible to reproduce the same failure reported in the issue. |
Multiple hypothesis
As we're unable to reproduce this problem reliably, in order to find out the cause of the problem, it's indispensable to have access to the environment where this issue occurred. Please open an issue to QA team. |
UpdateHypothesis: File client.keys was not properly removedIn order to confirm this hypothesis, this tests have been performed: 1. Open client.keys file without
|
Local executionI've launched this test locally lots of times, it has always passed. 🟢 local ossec.log We can see that the critical log is truncated. Meet with @Rebits
Conclusion
That's why, unless we find any new evidence today, we can close this issue. |
We're blocking this issue until checking "Release 4.8.0 - RC 3 - Integration tests" |
Description
During Release 4.8.0 - RC 2 - Integration tests it has been detected that Windows Agentd integration tests fails.
These tests were migrated from Jenkins to GHA #17696. However, these are not available for 4.8.0, so it is necessary a manual review
Cases
It has been only fails the test
test_agentd/test_agentd_reconnection.py::test_agentd_reconection_enrollment_no_keys_file[tcp]
. Regarding the report, it seems the agent was never able to enroll to the managerEvidences
Report: agent_windows_html_report_Test_integration_B47206(2).zip
The text was updated successfully, but these errors were encountered: