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

fix idempotency #555

Merged
merged 1 commit into from
Jun 10, 2020
Merged

fix idempotency #555

merged 1 commit into from
Jun 10, 2020

Conversation

Wing924
Copy link
Contributor

@Wing924 Wing924 commented Jun 10, 2020

Proposed Changes

This PR is to keep idempotency of this cookbook.

The ohai 'reload_packages' do nothing when no package is installed but still report that some resources are changed.

Signed-off-by: Wing924 <[email protected]>
@michaelklishin
Copy link
Member

Thank you, I will test this later today.

@michaelklishin michaelklishin merged commit afa530c into rabbitmq:master Jun 10, 2020
@michaelklishin michaelklishin added this to the 5.8.5 milestone Jun 10, 2020
@michaelklishin
Copy link
Member

Thank you!

@michaelklishin
Copy link
Member

Unfortunately, this makes kitchen converge fail even when the "changed" resource is directory[/etc/rabbitmq]. enforce_idempotency is a good idea but currently counterproductive. I have a very limited amount of time to spend on this cookbook, so unless practically important issues with idempotency are found, I'd prefer to go back to the productive development flow over troubleshooting why Chef client detects resources as changed.

@michaelklishin
Copy link
Member

I have kept multiple runs to weed out the most problematic idempotency issues but disabled idempotency enforcement by the Chef client resource state tracker. We would definitely consider more PRs that improve idempotency of providers and recipes in this cookbook 💚

michaelklishin added a commit that referenced this pull request Jul 27, 2020
This is a nice idea in theory and a truly terrible one to my productivity
in practice: it makes 'kitchen converge' fail with hard to reason about
"resource changed" errors that involve resources such as
'directory[/etc/rabbitmq]'. Unless practically relevant
issues with recipe idempotency are found, I'd take a productive
development flow over hours spend troubleshooting
'kitchen converge' runs that are non-idempotent according
to the Chef resource change tracker.

Note that we do preserve multiple runs per convergence, which should
weed out obvious practical issues with non-idempotency of our recipes.

References #555.
@Wing924 Wing924 deleted the fix_idempotency branch July 27, 2020 04:48
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

Successfully merging this pull request may close these issues.

2 participants