wazuh / wazuh-puppet

Wazuh - Puppet module
https://wazuh.com
GNU General Public License v2.0
46 stars 135 forks source link

The version of the dashboard package with -* causes Puppet to change the version of the package at every run #530

Open poloz-lab opened 2 years ago

poloz-lab commented 2 years ago

This issue is a question about the change introduced in PR #490 .

The -* notation is expanded in the right version but it causes Puppet to detect a version change at every run :

Notice: /Stage[main]/Wazuh::Dashboard/Package[wazuh-dashboard]/ensure: ensure changed '4.3.6-1' to '4.3.6-*' (corrective)

This causes Puppet to return the status 2, which means in puppet-agent manual :

2: The run succeeded, and some resources were changed.

I can confirm it on a Debian 10 machine :

Notice: /Stage[main]/Wazuh::Dashboard/Package[wazuh-dashboard]/ensure: ensure changed '4.3.6-1' to '4.3.6-*' (corrective)
Notice: Applied catalog in 4.15 seconds
14:02:47 root@wazuh-dashboard ~ ---------------------------------------------------------
>echo $?
2

This is not what I expect from Puppet. I want it to tell me that nothing is changed when nothing is changed. But in my Puppet dashboard, it keeps saying that changes were applied.

Is it the expected behaviour ?

Why not do as in the indexer class, or agent class or server class, when the user can fill the whole version number ?

aderumier commented 2 years ago

Hi, another related bug,

with debian11, aptitude can't install with wildcard

# /usr/bin/aptitude -y -o DPkg::Options::=--force-confold install wazuh-dashboard=4.3.6-*
Impossible de trouver la version « 4.3.6-* » du paquet « wazuh-dashboard »