wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
98 stars 89 forks source link

Add procps dependency in all deployment options #2805

Closed mjcr99 closed 3 months ago

mjcr99 commented 5 months ago
Wazuh version Component Install type Install method Platform
4.7.2 Wazuh Manager and Agent Manager/Agent Packages/Sources Behaviour detected in the redhat/ubi9 docker image but It could happen in other Yum based OS or Apt based, with lack of procps package.

Hi team,

while researching https://github.com/wazuh/wazuh/issues/13585, it has been found that procps is a needed dependency to let wazuh start and run in deployment over yum based os.

One example of a file that should be reviewed is the wazuh-install.sh. When it's used, it shows a log where it covers this dependency:

31/01/2024 16:00:23 INFO: --- Dependencies ---
31/01/2024 16:00:23 INFO: Installing procps-ng.

But after it, the dependency is removed:

31/01/2024 16:06:31 INFO: --- Dependencies ---
31/01/2024 16:06:31 INFO: Removing procps-ng.

Then if we try to start wazuh the following logs appear:

[root@centos9s vagrant]# /var/ossec/bin/wazuh-control start
Starting Wazuh v4.7.2...
wazuh-apid: Process 5049 not used by Wazuh, removing...
wazuh-apid: Orphan child process 5190 was terminated.
wazuh-apid: Orphan child process 5193 was terminated.
wazuh-apid: Orphan child process 5196 was terminated.
wazuh-apid: Process 7255 not used by Wazuh, removing...
wazuh-apid did not start correctly.

[root@centos9s vagrant]# /var/ossec/bin/wazuh-control status
wazuh-clusterd not running...
wazuh-modulesd: Process 5271 not used by Wazuh, removing...
wazuh-modulesd not running...
wazuh-monitord: Process 5261 not used by Wazuh, removing...
wazuh-monitord not running...
wazuh-logcollector: Process 5244 not used by Wazuh, removing...
wazuh-logcollector not running...
wazuh-remoted: Process 5211 not used by Wazuh, removing...
wazuh-remoted not running...
wazuh-syscheckd: Process 5185 not used by Wazuh, removing...
wazuh-syscheckd not running...
wazuh-analysisd: Process 5141 not used by Wazuh, removing...
wazuh-analysisd not running...
wazuh-maild not running...
wazuh-execd: Process 5126 not used by Wazuh, removing...
wazuh-execd not running...
wazuh-db: Process 5103 not used by Wazuh, removing...
wazuh-db not running...
wazuh-authd: Process 5089 not used by Wazuh, removing...
wazuh-authd not running...
wazuh-agentlessd not running...
wazuh-integratord not running...
wazuh-dbd not running...
wazuh-csyslogd not running...
wazuh-apid not running...

Wazuh can not start until procps dependency is covered again.

davidjiglesias commented 5 months ago

Delayed this to Beta 2 and Feb 8 for further discussion.

davidcr01 commented 3 months ago

Opened issue to change the way the Installation assistant installs the dependencies: https://github.com/wazuh/wazuh-packages/issues/2879

When this issue is closed, we will open an issue in the internal devel request repository and add the propcs as a dependency in the rest of the deployments.

We are closing this issue as not planned.