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 issue with implicitly enabled plugins #930

Closed
wyardley opened this issue May 11, 2023 · 0 comments · Fixed by #928
Closed

Idempotency issue with implicitly enabled plugins #930

wyardley opened this issue May 11, 2023 · 0 comments · Fixed by #928
Labels
bug Something isn't working

Comments

@wyardley
Copy link
Contributor

rabbitmq_pluginwas retrieving a list of existing plugins by querying for "explicitly" enabled plugins using therabbitmq-plugin -E` command. This caused us issues when adding support for CentOS/RHEL8 where we noticed that in this mode, ordering of plugins matters.

Example of the scenario we saw:

In this spec test: https:/voxpupuli/puppet-rabbitmq/blob/master/spec/acceptance/parameter_spec.rb#L18

The following plugins are declared:

rabbitmq_plugin { [ 'rabbitmq_federation_management', 'rabbitmq_federation' ]:
  ensure => present
}

The rabbitmq_federation_management plugin depends on rabbitmq_federation, so when our code enables rabbitmq_federation_management it will automatically enable rabbitmq_federation, but mark it as being "implicitly" enabled because it was enabled as a result of enabling rabbitmq_federation_management.

Then, when go to query for the list of enabled plugins using the -E option, this only lists our "explicitly" enabled plugins, so rabbitmq_federation is never listed and every time we run Puppet it attempts to enable the plugin, breaking idempotency.

Copied this text from @nmaludy's #844, but creating an issue as well, just for tracking purposes.

This also implements a different fix for what was originally fixed in #909

wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue May 11, 2023
Rabbitmq_plugin now correctly detects implicitly enabled plugins to
preserve idempotency regardless of plugin install order

Cherry-picked from voxpupuli#844
Fixes voxpupuli#930

Signed-off-by: William Yardley <[email protected]>
wyardley pushed a commit to wyardley/puppet-rabbitmq that referenced this issue May 11, 2023
Rabbitmq_plugin now correctly detects implicitly enabled plugins to
preserve idempotency regardless of plugin install order

Cherry-picked from voxpupuli#844
Fixes voxpupuli#930

Signed-off-by: William Yardley <[email protected]>
@wyardley wyardley added bug Something isn't working and removed bug Something isn't working labels May 11, 2023
@wyardley wyardley reopened this May 11, 2023
@wyardley wyardley added bug Something isn't working and removed bug Something isn't working labels May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant