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

Wrong rabbitmq-plugins command is used installing plugins #748

Closed
rzitter opened this issue Dec 10, 2018 · 1 comment · Fixed by #766
Closed

Wrong rabbitmq-plugins command is used installing plugins #748

rzitter opened this issue Dec 10, 2018 · 1 comment · Fixed by #766
Labels
bug Something isn't working

Comments

@rzitter
Copy link

rzitter commented Dec 10, 2018

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.8
  • Ruby:
  • Distribution: EL6
  • Module version: 8.4.0

How to reproduce (e.g Puppet code you use)

Install and configure a rabbitmq server for the first time and enable an extra plugin

What are you seeing

The extra plugins are enable but not running.

[root@rmq first_puppet]# rabbitmq-plugins list 
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@rmq
 |/
[  ] rabbitmq_amqp1_0                  3.7.7
[  ] rabbitmq_auth_backend_cache       3.7.7
[  ] rabbitmq_auth_backend_http        3.7.7
[  ] rabbitmq_auth_backend_ldap        3.7.7
[  ] rabbitmq_auth_mechanism_ssl       3.7.7
[  ] rabbitmq_consistent_hash_exchange 3.7.7
[  ] rabbitmq_event_exchange           3.7.7
[  ] rabbitmq_federation               3.7.7
[  ] rabbitmq_federation_management    3.7.7
[  ] rabbitmq_jms_topic_exchange       3.7.7
[E*] rabbitmq_management               3.7.7
[e*] rabbitmq_management_agent         3.7.7
[E ] rabbitmq_message_deduplication    0.3.5
[e ] rabbitmq_mqtt                     3.7.7
[  ] rabbitmq_peer_discovery_aws       3.7.7
[  ] rabbitmq_peer_discovery_common    3.7.7
[  ] rabbitmq_peer_discovery_consul    3.7.7
[  ] rabbitmq_peer_discovery_etcd      3.7.7
[  ] rabbitmq_peer_discovery_k8s       3.7.7
[  ] rabbitmq_random_exchange          3.7.7
[  ] rabbitmq_recent_history_exchange  3.7.7
[  ] rabbitmq_sharding                 3.7.7
[  ] rabbitmq_shovel                   3.7.7
[  ] rabbitmq_shovel_management        3.7.7
[  ] rabbitmq_stomp                    3.7.7
[  ] rabbitmq_top                      3.7.7
[  ] rabbitmq_tracing                  3.7.7
[  ] rabbitmq_trust_store              3.7.7
[e*] rabbitmq_web_dispatch             3.7.7
[E ] rabbitmq_web_mqtt                 3.7.7
[  ] rabbitmq_web_mqtt_examples        3.7.7
[  ] rabbitmq_web_stomp                3.7.7
[  ] rabbitmq_web_stomp_examples       3.7.7

What behaviour did you expect instead

The extra plugins are enabled and running

Output log

rmq.development.org - 2018-12-10 16:28:47: Debug: Puppet::Type::Rabbitmq_plugin::ProviderRabbitmqplugins: file /usr/lib/rabbitmq/bin/rabbitmq-plugins does not exist
rmq.development.org - 2018-12-10 16:28:47: Debug: Puppet::Type::Rabbitmq_plugin::ProviderRabbitmqplugins: file /usr/lib/rabbitmq/bin/rabbitmq-plugins does not exist
rmq.development.org - 2018-12-10 16:28:47: Debug: Puppet::Type::Rabbitmq_plugin::ProviderRabbitmqplugins: file /usr/lib/rabbitmq/bin/rabbitmq-plugins does not exist
rmq.development.org - 2018-12-10 16:28:47: Debug: Puppet::Type::Rabbitmq_plugin::ProviderRabbitmqplugins: file /usr/lib/rabbitmq/bin/rabbitmq-plugins does not exist
rmq.development.org - 2018-12-10 16:28:47: Debug: Puppet::Type::Rabbitmq_plugin::ProviderRabbitmqplugins: file /usr/lib/rabbitmq/bin/rabbitmq-plugins does not exist
rmq.development.org - 2018-12-10 16:30:16: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins list -E -m'
rmq.development.org - 2018-12-10 16:30:18: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management'
rmq.development.org - 2018-12-10 16:33:22: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins list -E -m'
rmq.development.org - 2018-12-10 16:33:23: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_message_deduplication'
rmq.development.org - 2018-12-10 16:33:26: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins list -E -m'
rmq.development.org - 2018-12-10 16:33:27: Debug: Executing '/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_web_mqtt'

Any additional information you'd like to impart

Related to issue #566 and #570

@wyardley
Copy link
Contributor

wyardley commented Dec 19, 2018

Which version does which rabbitmq-plugins give you? Does /sbin/rabbitmq-plugins exist, and is /sbin in the path of the user running Puppet at the time of the run? Does it only fail on the first run, and succeed on subsequent runs (idempotency problem), or does it fail every time (is the example debug output from a single run, or from two consecutive runs)?

Since the code uses which, you may be able to influence this by adjusting the PATH that your puppet run runs under.

If this is with RabbitMQ 3.7.x (which I'm assuming it is from the versions above), this module doesn't explicitly list support for that version yet. As you'll see in the current issues, there are some other issues which may affect later 3.7.x issues like 3.7.9 and later.

@wyardley wyardley added the bug Something isn't working label Jan 16, 2019
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
using the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the wrapper)
vs. the one in /usr/lib/rabbitmq/bin
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
using the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the wrapper)
vs. the one in /usr/lib/rabbitmq/bin
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
using the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the wrapper)
vs. the one in /usr/lib/rabbitmq/bin
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
using the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the wrapper)
vs. the one in /usr/lib/rabbitmq/bin
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
preferring the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the
wrapper) if it exists, then falling back to the one in /usr/lib/rabbitmq/bin
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Jan 16, 2019
Fixes voxpupuli#763
Fixes voxpupuli#748

This should resolve an idempotency issue, at least on certain platforms, by
preferring the version of rabbitmqctl / rabbitmq-plugins in /usr/sbin (the
wrapper) if it exists, then falling back to the one in /usr/lib/rabbitmq/bin
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.

2 participants