-
Notifications
You must be signed in to change notification settings - Fork 17
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
The Wazuh indexer removal does not remove the installation directory after upgrade #416
Comments
Removal of the 4.8.2 package root@ubuntu2204:/home/vagrant# ls -la /usr/share/wazuh-indexer/
total 304
drwxr-x--- 8 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 .
drwxr-xr-x 116 root root 4096 Sep 6 13:22 ..
drwxr-x--- 3 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 bin
drwxr-x--- 9 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 jdk
drwxr-x--- 3 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 lib
-rwxr-x--- 1 wazuh-indexer wazuh-indexer 11358 Sep 19 2023 LICENSE.txt
drwxr-x--- 21 wazuh-indexer wazuh-indexer 4096 Sep 6 13:13 modules
-rwxr-x--- 1 wazuh-indexer wazuh-indexer 261032 Sep 19 2023 NOTICE.txt
drwxr-x--- 5 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 performance-analyzer-rca
drwxr-x--- 21 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 plugins
-r--r----- 1 wazuh-indexer wazuh-indexer 6 Aug 19 17:14 VERSION
root@ubuntu2204:/home/vagrant# apt-get remove --purge wazuh-indexer -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
wazuh-indexer*
0 upgraded, 0 newly installed, 1 to remove and 157 not upgraded.
After this operation, 1050 MB disk space will be freed.
(Reading database ... 190752 files and directories currently installed.)
Removing wazuh-indexer (4.8.2-1) ...
Stopping wazuh-indexer service... OK
(Reading database ... 189618 files and directories currently installed.)
Purging configuration files for wazuh-indexer (4.8.2-1) ...
Deleting configuration directory... OK
dpkg: warning: while removing wazuh-indexer, directory '/var/lib/wazuh-indexer' not empty so not removed
dpkg: warning: while removing wazuh-indexer, directory '/var/log/wazuh-indexer' not empty so not removed
root@ubuntu2204:/home/vagrant# ls -la /usr/share/wazuh-indexer/
ls: cannot access '/usr/share/wazuh-indexer/': No such file or directory Removal of the 4.9.1 package root@ubuntu2204:/home/vagrant# apt-get remove --purge wazuh-indexer -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
wazuh-indexer*
0 upgraded, 0 newly installed, 1 to remove and 157 not upgraded.
After this operation, 1077 MB disk space will be freed.
(Reading database ... 190765 files and directories currently installed.)
Removing wazuh-indexer (4.9.1-0) ...
Running Wazuh Indexer Pre-Removal Script
(Reading database ... 189618 files and directories currently installed.)
Purging configuration files for wazuh-indexer (4.9.1-0) ...
dpkg: warning: while removing wazuh-indexer, directory '/var/log/wazuh-indexer' not empty so not removed
dpkg: warning: while removing wazuh-indexer, directory '/var/lib/wazuh-indexer' not empty so not removed
dpkg: warning: while removing wazuh-indexer, directory '/etc/wazuh-indexer' not empty so not removed
root@ubuntu2204:/home/vagrant# ls -la /usr/share/wazuh-indexer
ls: cannot access '/usr/share/wazuh-indexer': No such file or directory
root@ubuntu2204:/home/vagrant# ls -lR /etc/wazuh-indexer
/etc/wazuh-indexer:
total 12
dr-x------ 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 certs
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:23 internalusers-backup
-rw-rw---- 1 wazuh-indexer wazuh-indexer 196 Sep 6 13:14 opensearch.keystore
/etc/wazuh-indexer/certs:
total 20
-r-------- 1 wazuh-indexer wazuh-indexer 1704 Sep 6 13:06 admin-key.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1119 Sep 6 13:06 admin.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1204 Sep 6 13:06 root-ca.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1704 Sep 6 13:06 wazuh-indexer-key.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1285 Sep 6 13:06 wazuh-indexer.pem
/etc/wazuh-indexer/internalusers-backup:
total 4
-rw-r----- 1 wazuh-indexer wazuh-indexer 1145 Sep 6 13:23 internal_users_20240906_132300.yml.bkp During the uninstallation of the wazuh-indexer package, the However, I identified a new warning about the root@ubuntu2204:/home/vagrant# ls -lR /etc/wazuh-indexer
/etc/wazuh-indexer:
total 64
dr-x------ 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 certs
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:23 internalusers-backup
-rw-rw---- 1 wazuh-indexer wazuh-indexer 2943 Sep 6 13:14 jvm.options
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Aug 19 17:14 jvm.options.d
-rw-r----- 1 wazuh-indexer wazuh-indexer 14808 Aug 19 17:14 log4j2.properties
-rw-rw---- 1 wazuh-indexer wazuh-indexer 196 Sep 6 13:14 opensearch.keystore
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-notifications
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-notifications-core
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-observability
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-performance-analyzer
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-reports-scheduler
drwxr-x--- 2 wazuh-indexer wazuh-indexer 4096 Sep 6 13:14 opensearch-security
-rw-rw---- 1 wazuh-indexer wazuh-indexer 2152 Sep 6 13:14 opensearch.yml
/etc/wazuh-indexer/certs:
total 20
-r-------- 1 wazuh-indexer wazuh-indexer 1704 Sep 6 13:06 admin-key.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1119 Sep 6 13:06 admin.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1204 Sep 6 13:06 root-ca.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1704 Sep 6 13:06 wazuh-indexer-key.pem
-r-------- 1 wazuh-indexer wazuh-indexer 1285 Sep 6 13:06 wazuh-indexer.pem
/etc/wazuh-indexer/internalusers-backup:
total 4
-rw-r----- 1 wazuh-indexer wazuh-indexer 1145 Sep 6 13:23 internal_users_20240906_132300.yml.bkp |
We have performed several tests and we have been able to reproduce the problem only in RPM based systems. The Our tests have been performed under the following operating systems, using Vagrant boxes:
|
Describe the bug
The Wazuh indexer installation directory is not being removed from the system after upgrading from 4.8.2 to 4.9.1
Related wazuh/wazuh-qa#5753
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The
/usr/share/wazuh-indexer
directory should not exist after being removedPlugins
Default ones
Host/Environment (please complete the following information):
Debian systems should be checked
Additional context
The text was updated successfully, but these errors were encountered: