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

Improve execution modes for Windows #489

Open
3 tasks
TomasTurina opened this issue Jan 8, 2025 · 1 comment · May be fixed by #512
Open
3 tasks

Improve execution modes for Windows #489

TomasTurina opened this issue Jan 8, 2025 · 1 comment · May be fixed by #512
Assignees
Labels

Comments

@TomasTurina
Copy link
Member

Description

As requested in #362, the goal of this task is to test and implement the necessary changes to run the new agent in the foreground on the Windows platform. Additionally, the logic for creating the wazuh-agent.lock file, as implemented on Unix systems, will be reviewed to determine its applicability to Windows.

Tasks

  • Implement the required changes to run the agent in the foreground.
  • Determine if the use of wazuh-agent.lock file should be applied to Windows.
  • Implement necessary changes and appropriate testing.
@aritosteles
Copy link
Contributor

aritosteles commented Jan 16, 2025

Update

  • 2025-01-15:
    Setting up environment
  • 2025-01-16:
    Finished setting up the environment. Ran into some issues with warnings triggered as errors, had to use the W- flag to build. Started evaluating possible solutions for the issue at hand. Will investigate if SCM allows us to specify command line parameters so as to keep the behavior consistent with that of linux and macOS.
  • 2025-01-17:
    Have a first attempt of a running agent in foreground. Having some trouble with impostor server-mock.
  • 2025-01-20:
    Agent is running in the foreground.
    Modified Logger to print to stderr same as in linux agent.
    Looked into windows logger using single threaded sinks (as opposed to multithreaded sinks used in linux logger) and fixed it.
  • 2025-01-21:
    Verified the agent is running both in foreground and as a service.
    Removed WindowsEventLog sink from logger and left only stderr sink when running in foreground.
    Working on implementing file lock mechanism in Windows.
  • 2025-01-22:
    Implemented the instance lock using named mutexes for Windows. Separated unix/windows implementations each into their own files. Refactored LockFileHandler class into InstanceHandler to avoid references to any particular implementation.

@aritosteles aritosteles linked a pull request Jan 17, 2025 that will close this issue
2 tasks
@aritosteles aritosteles linked a pull request Jan 17, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants