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

[BUG] Infinite loop when using a negative value for job.schedule #223

Closed
AlexRuiz7 opened this issue Jan 16, 2025 · 1 comment · Fixed by #236
Closed

[BUG] Infinite loop when using a negative value for job.schedule #223

AlexRuiz7 opened this issue Jan 16, 2025 · 1 comment · Fixed by #236
Assignees
Labels
level/subtask Subtask issue mvp Minimum Viable Product type/bug Bug issue

Comments

@AlexRuiz7
Copy link
Member

Describe the bug
The CM enters an infinite loop when a negative value is set for the job.schedule setting.

To Reproduce
Steps to reproduce the behavior:

Expected behavior

  • No negative values are allowed for this setting.
  • No infinite loop when using a custom value for this setting.
  • The CM validates that this setting is under the expected working window.

Plugins
Command Manager.

Additional context
#213 (comment)

@AlexRuiz7 AlexRuiz7 added level/task Task issue type/bug Bug issue labels Jan 16, 2025
@AlexRuiz7 AlexRuiz7 added level/subtask Subtask issue and removed level/task Task issue labels Jan 16, 2025
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 5.0.0 Jan 16, 2025
@f-galland f-galland self-assigned this Jan 16, 2025
@wazuhci wazuhci moved this from Backlog to In progress in XDR+SIEM/Release 5.0.0 Jan 16, 2025
@AlexRuiz7 AlexRuiz7 added the mvp Minimum Viable Product label Jan 17, 2025
@f-galland
Copy link
Member

Regarding the time values here, I believe they should keep the following relationship:

CLIENT_TIMEOUT < JOB_SCHEDULE
JOB_SCHEDULE == PIT_KEEP_ALIVE

The reasoning behind this is:

  • CLIENT_TIMEOUT < JOB_SCHEDULE: The timeout is used for search actions. If the search timeout is longer than the period of the job, a concurrent search with the same query may be issued.
  • JOB_SCHEDULE == PIT_KEEP_ALIVE: It is safer to keep the PIT alive throughout the job's lifecycle. Making it longer wouldn't make sense, since by the time a new job run is triggered, the data of the indices may have changed, so we need to issue a new PIT.

@f-galland f-galland linked a pull request Jan 21, 2025 that will close this issue
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 5.0.0 Jan 21, 2025
@wazuhci wazuhci moved this from Pending review to In review in XDR+SIEM/Release 5.0.0 Jan 22, 2025
@wazuhci wazuhci moved this from In review to Done in XDR+SIEM/Release 5.0.0 Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/subtask Subtask issue mvp Minimum Viable Product type/bug Bug issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants