Skip to content
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

Introduce Data Directory Configuration #315

Closed
Tracked by #241
vikman90 opened this issue Nov 19, 2024 · 2 comments · Fixed by #325
Closed
Tracked by #241

Introduce Data Directory Configuration #315

vikman90 opened this issue Nov 19, 2024 · 2 comments · Fixed by #325
Assignees
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/enhancement Enhancement issue

Comments

@vikman90
Copy link
Member

Parent Issue: #241

Description

Currently, the agent creates its local databases in the current working directory.

Proposal

  1. Add a new configuration option, path.data, in the wazuh-agent.yml file.
  2. Default value for path.data: /var/lib/wazuh-agent.
  3. Store all local databases and modifiable files in the specified data directory.
@vikman90 vikman90 added the mvp Minimum Viable Product refinement label Nov 19, 2024
@wazuhci wazuhci moved this to Backlog in Release 5.0.0 Nov 19, 2024
@vikman90 vikman90 self-assigned this Nov 20, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 5.0.0 Nov 20, 2024
@vikman90
Copy link
Member Author

vikman90 commented Nov 20, 2024

Work report

November 20

  • Added new option path.data.
  • Option parsed and applied for agent_info.db.

November 21

  • Fixed a segmentation fault occurred when the agent fails to open agent_info.db.
  • Worked on unit tests for the default data path change and the segmentation fault fix.
  • Next steps:
    • Adapt AgentStopsWhenSignalReceived unit tests.
    • Continue with queue.db and local.db.

November 22

  • Adapted path for local.db and queue.db, including unit tests.
  • Defined per-platform default values.
  • Tested on Linux and macOS.
  • Next steps:
    • Adapt command_store.db.
    • Fix build on Windows.

November 25

  • Prevented unit tests from running in parallel, since that was causing race conditions accessing the local databases.
  • Adapted path for command_store.db.
  • Applied some review requests.

@cborla cborla linked a pull request Nov 20, 2024 that will close this issue
4 tasks
@cborla
Copy link
Member

cborla commented Nov 21, 2024

Work report

November 20

  • PR created.
  • Included config.h to agent_info CMakeLists.
  • Fixed clang format.

November 21

  • Agent test adapted.

@wazuhci wazuhci moved this from In progress to Done in Release 5.0.0 Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/enhancement Enhancement issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants