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 - Testing module. Agent's OS version check procedure. #5359
Comments
UPDATEI'm verifying the commands to use on each platform Ubuntu | Debiancat /etc/os-release
Amazon Linuxcat /etc/system-release
RedHat | Oracle | Centoscat /etc/redhat-release
Windows |
UPDATEI've investigated the agent's C++ source code to define how to get the OS version on each platform. The source code is in the I've started coding the logic to replace the current testing logic based on the info obtained from the inventory of the VM instance provided by the allocation module. |
UPDATEI've investigated the I've used Vagrant for development and committed the first version of the modifications to the repo after checking runs and fixing errors. I've launched a workflow in AWS with all the UNIX agent versions. |
UPDATEI've run a workflow file testing all Tested versions
Log file: workflow.log |
UPDATEI've found a bug in the installation of the wazuh agent in New issue reported #5380 |
Update reportModification made to all linux system. Test with two linux agents 🟢 : Input yaml:
Result: Test with all linux agents 🟢 : Input yaml:
Result: |
Update reportThe modifications were made to obtain the Windows version. The unit tests were satisfactory. Then when performing a full test, I encounter the following problem: The agent is installed correctly, but for some reason winrm is now returning empty std_out and std_err, and the pytest validations fail. An example: Logs: Inside Windows agent: The agent was installed successfully: I continue analyzing the problem |
Update reportThe problem was due to the winrm version. It was updated and the unit tests were successful: Full test: Input yaml:
Result 🟢 : |
Update reportObtaining the version from the agent was implemented based on dict_detect.sh:
But for Somona it brings the wrong version and produces a failure in the test due to disparity of versions. The following command was used, obtaining the correct version from the agent:
Unit test: Full macOS test 🟢 : Input yaml:
Result: |
Update reportThe tests that failed were for the Windows systems windows-desktop-10-amd64 and windows-server-2016-amd64 because instances of the small type were used to create the VMs. This causes the allocator and consequently, the test to fail because the VMs are not instantiated. The logs display:
The maximum waiting time was exceeded and then the instance was deleted due to failure from the allocator. Tests were carried out with instances of the large type, to verify that the PR changes had no impact on this failure and the tests were satisfactory: Intput yaml:
Result 🟢 : |
Review NotesLGTM |
LGTM |
Description
The current implementation of the testing module compares the result of the Wazuh agent API endpoint with the OS version reported by the inventory file.
The testing module should obtain the OS version using OS native commands.
Tasks
The text was updated successfully, but these errors were encountered: