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

rabbitmq_policy action set is not seen as idempotent by Chef w.r.t. resource execution #500

Closed
gordonbondon opened this issue Sep 26, 2018 · 5 comments
Milestone

Comments

@gordonbondon
Copy link

Cookbook version: 5.6.1

#425 removed check for policy existance before set_policy is used. This has fixed the issue when policy was not reapplied on parameter changes. But now it is causing similar messages to appear every chef run:

* rabbitmq_policy[ha-all] action set
           * execute[set_policy ha-all] action run
             - execute rabbitmqctl set_policy -p / ha-all ".*" '{"ha-mode":"exactly","ha-params":2,"ha-sync-mode":"automatic","queue-master-locator":"min-masters"}' --priority 0

Which in turn fails if you are using enforce_idempotency in your test kitchen suite.

Will you accept a pull request with a change: compare configs and use set_policy only when it has changed?

@michaelklishin michaelklishin changed the title rabbitmq_policy action set is not idempotent for chef itself rabbitmq_policy action set is not seen as idempotent by Chef w.r.t. resource execution Sep 26, 2018
@michaelklishin
Copy link
Member

You can try comparing defined policies. The rest of configuration is orthogonal to policies. I have concerns that this may end up being too fragile but let's wait and see.

@michaelklishin
Copy link
Member

This should be easier if there was a way to display definition of a single policy e.g. as JSON. I will look at extending rabbitmq-diagnostics to that.

@fr33l
Copy link

fr33l commented Aug 14, 2020

any update on this please?

@michaelklishin
Copy link
Member

@fr33l there were no updates. The proposed contribution has never materialized. This is open source software, so you are welcome to look into addressing this. Asking others to do it for you is not how it works around here.

@fozboz fozboz mentioned this issue Apr 6, 2022
11 tasks
@michaelklishin
Copy link
Member

This should be addressed by #587.

@michaelklishin michaelklishin added this to the 5.10.0 milestone Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants