-
Notifications
You must be signed in to change notification settings - Fork 21
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
Improve agent execution modes #313
Merged
TomasTurina
merged 7 commits into
master
from
enhancement/288-improve-agent-execution-modes
Nov 22, 2024
Merged
Improve agent execution modes #313
TomasTurina
merged 7 commits into
master
from
enhancement/288-improve-agent-execution-modes
Nov 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdvendramini
force-pushed
the
enhancement/288-improve-agent-execution-modes
branch
6 times, most recently
from
November 20, 2024 16:52
d0aafd4
to
6c42847
Compare
TomasTurina
reviewed
Nov 21, 2024
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.
Remember to update the BUILD.md
file.
sdvendramini
force-pushed
the
enhancement/288-improve-agent-execution-modes
branch
2 times, most recently
from
November 22, 2024 10:45
dbef125
to
0ba59bc
Compare
TomasTurina
reviewed
Nov 22, 2024
sdvendramini
force-pushed
the
enhancement/288-improve-agent-execution-modes
branch
4 times, most recently
from
November 22, 2024 15:01
7aec7db
to
aea31b7
Compare
TomasTurina
reviewed
Nov 22, 2024
TomasTurina
reviewed
Nov 22, 2024
TomasTurina
reviewed
Nov 22, 2024
TomasTurina
reviewed
Nov 22, 2024
The way the agent is executed has been simplified. Additionally, the use of a PID file to check if the agent is running has been replaced with a wazuh-agent.lock file, which remains write-locked during the agent's execution. This prevents another instance from running. The `--start` and `--run` options have been removed, and the process now runs in the foreground without any options. The `--stop` and `--restart` options have also been removed.
The GetExecutablePath function has been modified to support macOS.
Changes were made to correctly generate RPM and DEB packages with the new execution modes.
The BUILD.md file has been updated to reflect the new behavior.
Validation of execution options has been added.
sdvendramini
force-pushed
the
enhancement/288-improve-agent-execution-modes
branch
from
November 22, 2024 15:57
aea31b7
to
694389a
Compare
TomasTurina
approved these changes
Nov 22, 2024
TomasTurina
deleted the
enhancement/288-improve-agent-execution-modes
branch
November 22, 2024 17:47
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to improve how the agent runs in different environments.
The
--start
and--run
options have been removed, so the agent now starts running by default without any options. Additionally, the--stop
and--restart
options have also been removed, but currently only on Unix systems.The creation of the
wazuh-agent.pid
file has been replaced with the creation of awazuh-agent.lock
file. When the file is created, a write lock is applied, lasting until the execution ends. This prevents the execution of a new instance without needing to check the PID or process name.For now, the lock file will be created in the execution directory under
var/run
.