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

Idempotency is broken #1262

Closed
poloz-lab opened this issue Feb 21, 2025 · 2 comments · Fixed by #1265
Closed

Idempotency is broken #1262

poloz-lab opened this issue Feb 21, 2025 · 2 comments · Fixed by #1265
Assignees
Labels
level/task Task issue reporter/community Issue reported by the community type/bug Bug issue

Comments

@poloz-lab
Copy link
Contributor

poloz-lab commented Feb 21, 2025

What I can see

Each Puppet run executes an apt update :

Notice: /Stage[main]/Wazuh::Repo/Exec[apt-update]/returns: executed successfully (corrective)

Even if there is nothing to do. Which is against the key concept of Puppet idempotency

Now my Puppet dashboard is like a Christmas tinsel, saying that all my machines are changing their state.

What I expect

On the second Puppet run, Puppet must not do anything since the first run has already configured everything.

puppet agent -t must return 0 and not 2

Clues

The bug seems introduced in #1256 with the removal of the refresh-only parameter.

poloz-lab added a commit to poloz-lab/wazuh-puppet that referenced this issue Feb 21, 2025
@vcerenu vcerenu self-assigned this Feb 24, 2025
@c-bordon c-bordon added type/bug Bug issue level/task Task issue reporter/community Issue reported by the community labels Feb 24, 2025
@wazuhci wazuhci moved this to Backlog in XDR+SIEM/Release 4.11.1 Feb 24, 2025
@vcerenu
Copy link
Member

vcerenu commented Feb 24, 2025

Hello @poloz-lab

Thank you very much for your contribution, I have reviewed and correctly we had a problem with the idempotence of the wazuh::repo class, so we proceeded to add this fix within our next version.

@vcerenu vcerenu linked a pull request Feb 24, 2025 that will close this issue
@wazuhci wazuhci moved this from Backlog to Done in XDR+SIEM/Release 4.11.1 Feb 24, 2025
@poloz-lab
Copy link
Contributor Author

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue reporter/community Issue reported by the community type/bug Bug issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants