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

Short refresh timeout on manager restart #4181

Closed
Tracked by #4391
okynos opened this issue Jun 1, 2022 · 4 comments · Fixed by #4264
Closed
Tracked by #4391

Short refresh timeout on manager restart #4181

okynos opened this issue Jun 1, 2022 · 4 comments · Fixed by #4264
Assignees
Labels
type/bug Bug issue

Comments

@okynos
Copy link

okynos commented Jun 1, 2022

Wazuh Elastic Rev Security
4.3.3 4.3.3 4331-1 Wazuh-dashboard
Browser
Firefox

Description
Hello!

We have detected a short period of wait on manager restart procedure that leads me to an error in the healtcheck section.

Preconditions

  1. Environment up and running (Manager included).

Steps to reproduce

  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. See the error

Expected Result

  1. Show a pop up to restart in X seconds, maybe 15 or perform a some kind of wait process.

Actual Result

  1. Immediate restart with error result

Screenshots

Peek.2022-06-01.15-48.mp4

image

@yenienserrano
Copy link
Member

yenienserrano commented Jun 15, 2022

This issue will be temporarily fixed with the PR #4264, however, as we dug into the bug cause, we found that there are 3 different codes to restart the environment (manager or cluster).

We'll centralize this functionality on an independent service-like component, which any view or component of the App will be able to use. This development requires an amount of time that we do not have in terms of timings for the release v4.3.5, so we'll address this on a future update, and include this temporarily fix for v4.3.5. This issue will be closed once the PR #4264 is merged, and the refactor will be addressed on the issue #4277

@yenienserrano
Copy link
Member

Investigating a little more the logic of the restart, we could see that what causes the redirection to the healtcheck is because in the wz-fetch.js file, in the makePing function (line 195), it makes a polling to check when the API is available and in the first iteration calls the checkDeamons() method (line 158), which has a call to the API (WzRequest. apiReq('GET', '/manager/status', {}))), the function apiReq() (line 107), which is in the file wz-request.ts, calls await this.genericReq('POST', '/api/request', requestData); (line 114) and when it has no results from the API redirects to the healtcheck method.

image

@davidjiglesias
Copy link
Member

The issue is still happening:

image

@matiasmoreno876
Copy link
Contributor

Duplicate #4277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug issue
Projects
No open projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants