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

Added roll back and exit in case the Wazuh indexer security admin fails #2784

Conversation

c-bordon
Copy link
Member

Related issue
close #2781

Description

This PR adds the necessary roll backs in the event of failures in the execution of the security admin and the ISM policy. This improves waiting time and makes it easier to debug the installation without having to wait for the WIA to move forward with the rest of the components.

Logs example

Tested in Debian 12

Security admin fail:

vagrant@bookworm:~$ sudo bash wazuh-install.sh -i -a
18/01/2024 19:02:41 INFO: Starting Wazuh installation assistant. Wazuh version: 4.8.0
18/01/2024 19:02:41 INFO: Verbose logging redirected to /var/log/wazuh-install.log
18/01/2024 19:02:45 WARNING: Hardware and system checks ignored.
18/01/2024 19:02:45 INFO: Wazuh web interface port will be 443.
18/01/2024 19:02:51 INFO: Wazuh development repository added.
18/01/2024 19:02:51 INFO: --- Configuration files ---
18/01/2024 19:02:51 INFO: Generating configuration files.
18/01/2024 19:02:52 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
18/01/2024 19:02:53 INFO: --- Wazuh indexer ---
18/01/2024 19:02:53 INFO: Starting Wazuh indexer installation.
18/01/2024 19:03:30 INFO: Wazuh indexer installation finished.
18/01/2024 19:03:30 INFO: Wazuh indexer post-install configuration finished.
18/01/2024 19:03:30 INFO: Starting service wazuh-indexer.
18/01/2024 19:03:40 INFO: wazuh-indexer service started.
18/01/2024 19:03:40 INFO: Initializing Wazuh indexer cluster security settings.
18/01/2024 19:03:41 ERROR: The Wazuh indexer cluster security configuration could not be initialized.
18/01/2024 19:03:41 INFO: --- Removing existing Wazuh installation ---
18/01/2024 19:03:41 INFO: Removing Wazuh indexer.
18/01/2024 19:03:43 INFO: Wazuh indexer removed.
18/01/2024 19:03:43 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.

ISM policy fail:

vagrant@bookworm:~$ sudo bash wazuh-install.sh -i -a
18/01/2024 19:05:28 INFO: Starting Wazuh installation assistant. Wazuh version: 4.8.0
18/01/2024 19:05:28 INFO: Verbose logging redirected to /var/log/wazuh-install.log
18/01/2024 19:05:32 WARNING: Hardware and system checks ignored.
18/01/2024 19:05:32 INFO: Wazuh web interface port will be 443.
18/01/2024 19:05:38 INFO: Wazuh development repository added.
18/01/2024 19:05:38 INFO: --- Configuration files ---
18/01/2024 19:05:38 INFO: Generating configuration files.
18/01/2024 19:05:40 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation.
18/01/2024 19:05:40 INFO: --- Wazuh indexer ---
18/01/2024 19:05:40 INFO: Starting Wazuh indexer installation.
18/01/2024 19:06:18 INFO: Wazuh indexer installation finished.
18/01/2024 19:06:18 INFO: Wazuh indexer post-install configuration finished.
18/01/2024 19:06:18 INFO: Starting service wazuh-indexer.
18/01/2024 19:06:28 INFO: wazuh-indexer service started.
18/01/2024 19:06:28 INFO: Initializing Wazuh indexer cluster security settings.
18/01/2024 19:06:40 WARNING: The Wazuh indexer cluster ISM policy could not be created.
18/01/2024 19:06:40 INFO: --- Removing existing Wazuh installation ---
18/01/2024 19:06:40 INFO: Removing Wazuh indexer.
18/01/2024 19:06:42 INFO: Wazuh indexer removed.
18/01/2024 19:06:42 INFO: Installation cleaned. Check the /var/log/wazuh-install.log file to learn more about the issue.

@c-bordon c-bordon self-assigned this Jan 18, 2024
@teddytpc1 teddytpc1 merged commit 916c65c into 4.8.0 Jan 18, 2024
4 checks passed
@teddytpc1 teddytpc1 deleted the enhancement/2781-ism-policy-error-in-wia-aio-deployment-to4.8.0 branch January 18, 2024 19:23
@teddytpc1 teddytpc1 linked an issue Jan 18, 2024 that may be closed by this pull request
1 task
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.

ISM policy error in WIA AIO deployment
2 participants