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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Wazuh indexer remaining files #2492

Merged
merged 1 commit into from Oct 3, 2023

Conversation

davidcr01
Copy link
Contributor

@davidcr01 davidcr01 commented Oct 2, 2023

Related issue
#2487

Description

The aim of this PR is to modify the installCommon_rollBack function to remove some Wazuh indexer remaining files. These files stopped the execution of the script after an uninstallation of the Wazuh stack.

The deleted files are duplicated.

Logs

The following logs show how the Installation Assistant is going to install the Wazuh indexer after an uninstallation.

馃煝 Uninstallation after AIO
[root@ip-172-31-79-73 ec2-user]# bash wazuh-install.sh -u -i
02/10/2023 13:58:47 INFO: Starting Wazuh installation assistant. Wazuh version: 4.5.2
02/10/2023 13:58:47 INFO: Verbose logging redirected to /var/log/wazuh-install.log
02/10/2023 13:58:50 INFO: Removing Wazuh manager.
02/10/2023 13:59:17 INFO: Wazuh manager removed.
02/10/2023 13:59:17 INFO: Removing Wazuh indexer.
02/10/2023 13:59:20 INFO: Wazuh indexer removed.
02/10/2023 13:59:20 INFO: Removing Filebeat.
02/10/2023 13:59:21 INFO: Filebeat removed.
02/10/2023 13:59:21 INFO: Removing Wazuh dashboard.
02/10/2023 13:59:35 INFO: Wazuh dashboard removed.


[root@ip-172-31-79-73 ec2-user]# bash wazuh-install.sh -a -i
02/10/2023 14:02:38 INFO: Starting Wazuh installation assistant. Wazuh version: 4.5.2
02/10/2023 14:02:38 INFO: Verbose logging redirected to /var/log/wazuh-install.log
02/10/2023 14:02:53 WARNING: Hardware and system checks ignored.
02/10/2023 14:02:53 INFO: Wazuh web interface port will be 443.
02/10/2023 14:02:55 INFO: Wazuh repository added.
02/10/2023 14:02:55 INFO: --- Configuration files ---
02/10/2023 14:02:55 INFO: Generating configuration files.
02/10/2023 14:02:58 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
02/10/2023 14:02:58 INFO: --- Wazuh indexer ---
02/10/2023 14:02:58 INFO: Starting Wazuh indexer installation.
馃煝 Uninstallation after Wazuh indexer installation
[root@ip-172-31-79-73 ec2-user]# bash wazuh-install.sh -wi wazuh-indexer -i
02/10/2023 15:11:26 INFO: Starting Wazuh installation assistant. Wazuh version: 4.5.2
02/10/2023 15:11:26 INFO: Verbose logging redirected to /var/log/wazuh-install.log
02/10/2023 15:11:35 WARNING: Hardware and system checks ignored.
02/10/2023 15:11:36 INFO: Wazuh repository added.
02/10/2023 15:11:37 INFO: --- Wazuh indexer ---
02/10/2023 15:11:37 INFO: Starting Wazuh indexer installation.
02/10/2023 15:12:57 INFO: Wazuh indexer installation finished.
02/10/2023 15:12:57 INFO: Wazuh indexer post-install configuration finished.
02/10/2023 15:12:57 INFO: Starting service wazuh-indexer.
grep: warning: stray \ before white space
grep: warning: stray \ before white space
02/10/2023 15:13:20 INFO: wazuh-indexer service started.
02/10/2023 15:13:20 INFO: Initializing Wazuh indexer cluster security settings.
02/10/2023 15:13:24 INFO: Wazuh indexer cluster initialized.
02/10/2023 15:13:24 INFO: Installation finished.

[root@ip-172-31-79-73 ec2-user]# bash wazuh-install.sh -u -i
02/10/2023 15:13:38 INFO: Starting Wazuh installation assistant. Wazuh version: 4.5.2
02/10/2023 15:13:38 INFO: Verbose logging redirected to /var/log/wazuh-install.log
02/10/2023 15:13:41 INFO: Wazuh manager was not found in the system so it was not uninstalled.
02/10/2023 15:13:41 INFO: Filebeat was not found in the system so it was not uninstalled.
02/10/2023 15:13:41 INFO: Wazuh dashboard was not found in the system so it was not uninstalled.
02/10/2023 15:13:41 INFO: Removing Wazuh indexer.
02/10/2023 15:13:43 INFO: Wazuh indexer removed.

[root@ip-172-31-79-73 ec2-user]# bash wazuh-install.sh -wi wazuh-indexer -i
02/10/2023 15:13:48 INFO: Starting Wazuh installation assistant. Wazuh version: 4.5.2
02/10/2023 15:13:48 INFO: Verbose logging redirected to /var/log/wazuh-install.log
02/10/2023 15:13:56 WARNING: Hardware and system checks ignored.
02/10/2023 15:13:58 INFO: Wazuh repository added.
02/10/2023 15:13:58 INFO: --- Wazuh indexer ---
02/10/2023 15:13:58 INFO: Starting Wazuh indexer installation.

The grep warning is known and reported: #2473

@davidcr01 davidcr01 self-assigned this Oct 2, 2023
@teddytpc1 teddytpc1 merged commit 3b40811 into 4.5.3 Oct 3, 2023
4 checks passed
@teddytpc1 teddytpc1 deleted the bug/2487-wazuh-indexer-remaining-files branch October 3, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Wazuh installation assistant does not uninstall the Wazuh indexer completely
3 participants