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

Timeout change in the restart manager in the configuration #4264

Merged
merged 5 commits into from
Jun 17, 2022

Conversation

yenienserrano
Copy link
Member

Description:

Added the waiting time to see if the manager is active again since it was not waiting for anything and in other ways of restarting it waits for 15000ms

Issue:

Preconditions:

  1. Wazuh manager environments

Test:

  1. Navigate to 'Management>Configuration'
  2. Click on 'Edit configuration'
  3. Change vulnerability-detector to enabled or disabled
  4. Click save
  5. Click restart manager button
  6. Wait for it to restart

Screenshot:

restartManager.mp4

@@ -280,6 +280,7 @@ export const restartNodeSelected = async (
`Restarting ${isCluster ? selectedNode : 'Manager'}, please wait.`
); //FIXME: if it enables/disables cluster, this will show Manager instead node name
isCluster ? await restartNode(selectedNode) : await restartManager();
await delayAsPromise(15000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why this delay is required?

Copy link
Member

@Desvelao Desvelao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review:
code ✔️
test ✔️

Screenshots

image

In the screenshot, the Wazuh API polling is visble in the API requests that are failing.

Copy link
Member

@asteriscos asteriscos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test: ✔️
CR: ✔️

Peek 2022-06-17 15-56

@github-actions
Copy link
Contributor

Jest Test Coverage % values
Statements 4.21% ( 1531 / 36379 )
Branches 1.79% ( 505 / 28247 )
Functions 3.29% ( 293 / 8896 )
Lines 4.25% ( 1478 / 34797 )

Copy link
Member

@AlexRuiz7 AlexRuiz7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AlexRuiz7 AlexRuiz7 merged commit 2f83a43 into 4.3-7.10 Jun 17, 2022
@AlexRuiz7 AlexRuiz7 deleted the fix/4181-short-refresh-timeout branch June 17, 2022 14:13
github-actions bot pushed a commit that referenced this pull request Jun 17, 2022
* fix: timeout change

* add changelog

* parmeters refractor and format

* changelog: replaced PR entry

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 2f83a43)
github-actions bot pushed a commit that referenced this pull request Jun 17, 2022
* fix: timeout change

* add changelog

* parmeters refractor and format

* changelog: replaced PR entry

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 2f83a43)
AlexRuiz7 pushed a commit that referenced this pull request Jun 17, 2022
…iguration (#4278)

Timeout change in the restart manager in the configuration (#4264)

* fix: timeout change

* add changelog

* parmeters refractor and format

* changelog: replaced PR entry

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 2f83a43)

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
AlexRuiz7 pushed a commit that referenced this pull request Jun 17, 2022
…onfiguration (#4279)

Timeout change in the restart manager in the configuration (#4264)

* fix: timeout change

* add changelog

* parmeters refractor and format

* changelog: replaced PR entry

Co-authored-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Co-authored-by: Álex <alejandro.ruiz.becerra@wazuh.com>
(cherry picked from commit 2f83a43)

Co-authored-by: Ian Yenien Serrano <63758389+yenienserrano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Short refresh timeout on manager restart
4 participants