wazuh icon indicating copy to clipboard operation
wazuh copied to clipboard

HP-UX Wazuh agent package size increased considerably

Open jnasselle opened this issue 1 year ago • 2 comments

Wazuh version Component Install type Install method Platform
v4.6.0-beta1 Wazuh agent package Agent Packages HP-UX

Description

During https://github.com/wazuh/wazuh/issues/19212, it was found that HP-UX Wazuh Agent size has the next increase

  • https://packages-dev.wazuh.com/pre-release/hp-ux/wazuh-agent-4.6.0-1-hpux-11v3-ia64.tar 53MB
  • https://packages.wazuh.com/4.x/hp-ux/wazuh-agent-4.5.2-1-hpux-11v3-ia64.tar is 21MB (last production version)

Size is related to packaging the next libraries

image

DoD

  • [ ] Make sure that those libraries are deployed/installed as wanted
  • [ ] Research if there's any tweak to improve package size

jnasselle avatar Sep 26 '23 11:09 jnasselle

On hold due to issues of higher priority on 4.8.0

sebasfalcone avatar Feb 26 '24 14:02 sebasfalcone

Findings

Notes

The behavior also occurs with AIX (https://github.com/wazuh/wazuh/pull/19012), but since the package is an RPM the compression does not let us see the difference in size with the addition of libstdc++6.so

image image

As mentioned in this comment, the library with pthread support is big and was avoided some developments ago.

https://github.com/wazuh/wazuh/issues/18980#issuecomment-1718812593 https://github.com/wazuh/wazuh/issues/16220#issuecomment-1432604840

HP-UX

Coming back to HP-UX, since as explained in the installation guide, we need just to decompress the content in the specified path.

https://documentation.wazuh.com/current/installation-guide/wazuh-agent/wazuh-agent-package-hpux.html

We can compress it with XZ to reduce its size.

image

The decompressor is available for HP-UX.

image

The compilation of the libraries we can see in 4.6.0 was introduced as part of the development https://github.com/wazuh/wazuh/pull/12745 (Add RSync and DBSync to FIM) overridden the previous fix in https://github.com/wazuh/wazuh/pull/7374

On the other hand, the libstdc++ library distribution was implemented as a fix for GCP machines with os-login enabled

https://github.com/wazuh/wazuh/issues/14018#issuecomment-1179813664 https://github.com/wazuh/wazuh/pull/14190

However the distribution of libraries for HP-UX is not related to the GCP issue but a compilation fix as part of the fim development https://github.com/wazuh/wazuh-packages/commit/943eef91749f312ba4c9a21c315c5777c74ae5be

Proposal here https://github.com/wazuh/wazuh-packages/pull/2864 If accepted, the documentation should be modified to reflect the change

https://documentation.wazuh.com/current/installation-guide/packages-list.html https://documentation.wazuh.com/current/installation-guide/wazuh-agent/wazuh-agent-package-hpux.html

MiguelazoDS avatar Mar 01 '24 18:03 MiguelazoDS

Moved ETA -> Waiting for final review

sebasfalcone avatar Mar 08 '24 13:03 sebasfalcone

@MiguelazoDS ,

Friendly reminder: if anything release-related is changed, make sure to search it in the whole Wazuh organization

New issue https://github.com/wazuh/wazuh-jenkins/issues/6345

jnasselle avatar Mar 08 '24 15:03 jnasselle