-
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
Changed wazuh-agent service start from install test to registration test #5762
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes affect Windows and macOS systems, please run a complete agent tier
A complete agent tier test was executed correctly: Log: Template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gj! But it is necessary to update the CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ! Please, solve the conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing the test, I am a bit concerned about the implementation of this one:
- It was failing to start but was not reported as failed.
- The install starts the agent without registering it, which is why it fails. But also, it then checks for stopped, so it wouldn't make sense for it to start it, or for the check to be stopped.
- The state check is too wide, it should check that the status is correct for all valid statuses, it would even be expected statuses instead of valid statuses.
- The registration function is modified, which is not used by this test and this modification could affect where it is being used, since restart has been changed by start, and if the agent is already started, it is not going to be registered.
Please, let's take a quick look at this test, see what status is expected, see why the error is not being handled well and make the necessary modifications.
Everything related to starting the agent and checking its status has been removed from the installation function since, as no manager has been registered, it will fail to start causing the log reported in this issue. However, even if it fails in that part, the test does not report any failure and passes as valid, which should not happen and for which the following issue has been opened: It has been considered most logical to start the agent after registering a manager. For this reason, the As this has been modified for Linux and MacOS only (The change that was made in the Windows test was tested on #5762 (comment)), a build has been run to demonstrate that both the installation test and the registration test work perfectly and that the erroneous log reported in the issue no longer appears.
|
Co-authored-by: Julia Magán <80041853+juliamagan@users.noreply.github.com>
Co-authored-by: Julia Magán <80041853+juliamagan@users.noreply.github.com>
Description
This pull request is based on #5741. As said in #5741 (comment), the service cannot be started in the installation test because there is no manager IP assigned. Therefore, the solution is to start the service in the registration test, after adding the manager IP to the agent configuration.
After doing that and running the test, you can see in the logs that the message reported in the issue no longer appears:
Testing performed