wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

Fixed a routes loop when reinstalling Wazuh indexer

Open Desvelao opened this issue 1 year ago • 1 comments

Description

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

Closes #4293.

Related PR: https://github.com/wazuh/wazuh-documentation/pull/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 avatar Aug 02 '22 13:08 Desvelao

Changes

  • Applied the suggested changes

Screenshots

image

Desvelao avatar Aug 04 '22 10:08 Desvelao

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[bot] avatar Aug 12 '22 20:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 12 '22 20:08 github-actions[bot]