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

Fixed a routes loop when reinstalling Wazuh indexer #4373

Merged

Conversation

Desvelao
Copy link
Member

@Desvelao Desvelao commented Aug 2, 2022

Description

This PR fixed a problem of routes loop when reinstalling the Wazuh dashboard.

Closes #4293.

Related PR: wazuh/wazuh-documentation#5497

Screenshots

image

Test

Scenario: Error due to saved objects can not be found
Given: Installed Wazuh indexer in a separated machine. Connect the others components (Wazuh dashboard, Filebeat, Wazuh manager) to work.
When: The user navigates to the Wazuh plugin and works correctly. Reinstall the Wazuh indexer.
Then: The user navigates to another Wazuh plugin section, it should redirect to the health check and display one error en each index pattern check (if they are enabled).

Replication approach

Install Wazuh indexer in a VM using the unattended script:

Download the script

curl -sO https://packages.wazuh.com/4.3/wazuh-install.sh

Install the indexer and start it:

bash wazuh-install.sh --generate-config-files
bash wazuh-install.sh --wazuh-indexer wazuh-indexer
bash wazuh-install.sh --start-cluster

Docker container

After environment is up and the user opens the Wazuh plugin in a browser tab. Follow the next steps:

  1. Stop the wazuh-indexer container
  2. Remove the wazuh-indexer container
  3. Up a new wazuh-indexer container.

How to reinstall the Wazuh indexer

sudo bash wazuh-install.sh -u && sudo bash wazuh-install.sh --wazuh-indexer indexer && sudo bash wazuh-install.sh --start-cluster

@Desvelao
Copy link
Member Author

Desvelao commented Aug 4, 2022

Changes

  • Applied the suggested changes

Screenshots

image

Copy link
Contributor

@matiasmoreno876 matiasmoreno876 left a comment

Choose a reason for hiding this comment

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

LGTM

@matiasmoreno876 matiasmoreno876 merged commit be7654a into 4.3-1.2-wzd Aug 12, 2022
@matiasmoreno876 matiasmoreno876 deleted the fix/4293-route-loop-wazuh-indexer-reinstall branch August 12, 2022 20:05
@github-actions
Copy link
Contributor

The backport to 4.3-7.16 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.3-7.16 4.3-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.3-7.16
# Create a new branch
git switch --create backport-4373-to-4.3-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 be7654a2912eec72ec37f942857067a611441b1e
# Push it to GitHub
git push --set-upstream origin backport-4373-to-4.3-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.3-7.16

Then, create a pull request where the base branch is 4.3-7.16 and the compare/head branch is backport-4373-to-4.3-7.16.

@github-actions
Copy link
Contributor

The backport to 4.3-7.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.3-7.10 4.3-7.10
# Navigate to the new working tree
cd .worktrees/backport-4.3-7.10
# Create a new branch
git switch --create backport-4373-to-4.3-7.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 be7654a2912eec72ec37f942857067a611441b1e
# Push it to GitHub
git push --set-upstream origin backport-4373-to-4.3-7.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.3-7.10

Then, create a pull request where the base branch is 4.3-7.10 and the compare/head branch is backport-4373-to-4.3-7.10.

matiasmoreno876 pushed a commit that referenced this pull request Aug 12, 2022
* fix: Fixed a routes loop when reinstalling Wazuh indexer

* fix: replaced the display error in the plugin loop

* changelog: add PR entry

* fix import variable

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
(cherry picked from commit be7654a)
matiasmoreno876 added a commit that referenced this pull request Aug 12, 2022
* fix: Fixed a routes loop when reinstalling Wazuh indexer

* fix: replaced the display error in the plugin loop

* changelog: add PR entry

* fix import variable

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
(cherry picked from commit be7654a)

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
matiasmoreno876 pushed a commit that referenced this pull request Aug 12, 2022
* fix: Fixed a routes loop when reinstalling Wazuh indexer

* fix: replaced the display error in the plugin loop

* changelog: add PR entry

* fix import variable

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
(cherry picked from commit be7654a)
matiasmoreno876 added a commit that referenced this pull request Aug 12, 2022
* fix: Fixed a routes loop when reinstalling Wazuh indexer

* fix: replaced the display error in the plugin loop

* changelog: add PR entry

* fix import variable

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.com>
(cherry picked from commit be7654a)

Co-authored-by: Antonio <34042064+Desvelao@users.noreply.github.com>
yenienserrano pushed a commit that referenced this pull request Sep 6, 2022
* fix: Fixed a routes loop when reinstalling Wazuh indexer

* fix: replaced the display error in the plugin loop

* changelog: add PR entry

* fix import variable

Co-authored-by: Matias Ezequiel Moreno <matiasmoreno876@gmail.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.

Infinite loop trying to check alerts index patterns after reinstalling Wazuh indexer
2 participants