Comments (5)
What's odd is that it looks like that's a python error, not a ruby one. I can run the commands that the mcollective module is trying without an issue on the command line without issue. Only when it's run by puppet is it an issue.
(This is a vagrant install of mcollective, for testing and debugging this problem. it uses the defaults :)
Error: Could not prefetch rabbitmq_exchange provider 'rabbitmqadmin': Execution of '/usr/local/bin/rabbitmqadmin list exchanges' returned 1: Traceback (most recent call last):
File "/usr/local/bin/rabbitmqadmin", line 939, in
main()
File "/usr/local/bin/rabbitmqadmin", line 370, in main
(options, args) = make_configuration()
File "/usr/local/bin/rabbitmqadmin", line 319, in make_configuration
config_file = default_config()
File "/usr/local/bin/rabbitmqadmin", line 310, in default_config
return home + os.sep + ".rabbitmqadmin.conf"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Error: Execution of '/usr/local/bin/rabbitmqadmin declare exchange --vhost=/mcollective --user=admin --password=secret name=mcollective_broadcast type=topic' returned 1: Traceback (most recent call last):
File "/usr/local/bin/rabbitmqadmin", line 939, in
main()
File "/usr/local/bin/rabbitmqadmin", line 370, in main
(options, args) = make_configuration()
File "/usr/local/bin/rabbitmqadmin", line 319, in make_configuration
config_file = default_config()
File "/usr/local/bin/rabbitmqadmin", line 310, in default_config
return home + os.sep + ".rabbitmqadmin.conf"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
from puppet-rabbitmq.
Found the issue: RabbitMQ 3.2.0 broke the behavior of the provider. The command doesn't work when run via puppet.
Using the rabbitmqadmin from 3.1.5, - https://raw.github.com/rabbitmq/rabbitmq-management/rabbitmq_v3_1_5/bin/rabbitmqadmin - the provider works just perfectly.
I've opened a bug on their side, since this shouldn't break,
rabbitmq/rabbitmq-management#10
Would it be easier to just the API for this? vs getting rabbitmqadmin?
from puppet-rabbitmq.
This error appears because the puppet user has no bash configuration by default. (keyword: /etc/passwd)
Just as quick fix proposal you can do something like this:
define components::rabbitmq::exchange (
$vhost = '',
$type = '',
$user = '',
$password = '',
) {
exec { "declare exchange ${name}":
command => "/usr/local/bin/rabbitmqadmin declare exchange --vhost=${vhost} --user=${user} --password=${password} name=${name} type=${type}",
environment => 'HOME=/var/lib/puppet:/bin/bash',
user => 'root'
}
}
from puppet-rabbitmq.
Thanks- i'd love to use that, but... the call is actually by the puppetlabs-mcollective module, and i'd prefer to avoid patching that.
For now, i'm just putting the "right" version of the admin tool into the correct place, so the code doesn't try to download it. That way, the type call actually works.
from puppet-rabbitmq.
Looks like it was resolved in RMQ 3.2.2, via my bug 25920.
from puppet-rabbitmq.
Related Issues (20)
- Problem removing (ensure => 'absent') federation upstream HOT 1
- Not idempotent again on RHEL based platforms since move to systemd module HOT 7
- erlang_cookie echo'ed to agent output HOT 2
- rabbitmq_user resource displays password when needed changed in noop
- Cannot set delivery-limit policy
- Password comparison error in Rabbitmq_user when password contains double quotes
- Ensuring absent user_permissions with missing (or absent) user / missing (or absent) vhost HOT 1
- ssl_insecure option not supported in rabbitmqadmin.conf
- Debian 8 deprecation
- Not compatible with latest puppet-systemd HOT 1
- Add support for debian 10
- Adding rabbitmq-delayed-message-exchange plugin HOT 1
- Reference for log_levels does not apply
- Compatibility with puppet-systemd HOT 3
- need support for newer versions of dependency puppet-archive HOT 1
- rabbitmq_plugin not working properly with RabbitMQ 3.10.x
- Feature-request: Configure prometheus exporter HOT 5
- Unable to use custom list inside enabled_plugins file HOT 1
- Missing option to add members to quorum queue
- Idempotency issue with implicitly enabled plugins
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-rabbitmq.