puppet-rabbitmq: not working with rabbitmq-server 3.7 - Cannot parse invalid user line
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 5.3.3-1xenial
- Ruby: ruby2.4 (included in puppet package)
- Distribution: Ubuntu 16.04.3 LTS
- Module version: v8.0.0
- Rabbitmq-server : 3.7.0-1
How to reproduce (e.g Puppet code you use)
just run puppet agent -t
rabbitmq_user { 'new_user':
admin => true,
password => 'pass',
provider => 'rabbitmqctl'
}
What are you seeing
Error: Failed to apply catalog: Cannot parse invalid user line: warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
What behaviour did you expect instead
something went wrong with name encoding when the module is trying to fetch the result of the command: /usr/sbin/rabbitmqctl -q list_users
the function itself is located in this file line 22: ./lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb
Output log
Debug: Executing: '/usr/sbin/rabbitmqctl -q list_users'
Debug: Command succeeded
Debug: Storing state
Debug: Stored state in 0.16 seconds
Error: Failed to apply catalog: Cannot parse invalid user line: warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
Debug: Dynamically-bound server lookup failed, falling back to report_server setting
Any additional information you’d like to impart
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 23 (6 by maintainers)
Commits related to this issue
- Merge pull request #676 from fatmcgav/fix_up_674 Support policy format change in v3.7.0 - #671 (Replaces #674) — committed to voxpupuli/puppet-rabbitmq by bastelfreak 6 years ago
- Ignore warning in rabbitmqctl list_users output (#671, #689) — committed to wyardley/puppet-rabbitmq by wyardley 6 years ago
- Set default en_US.UTF-8 (#671, #689) This sets a (somewhat US-centric) default of en_US.UTF-8 for LC_ALL in $environment_variables, to work around a warning given via Elixir in newer version of the R... — committed to wyardley/puppet-rabbitmq by wyardley 6 years ago
- Merge pull request #694 from wyardley/issues_689_3 Set default LC_ALL => en_US.UTF-8 (#671, #689) — committed to voxpupuli/puppet-rabbitmq by wyardley 6 years ago
- Force C.UTF-8 when dealing with rabbitmq When we use rabbitmq 3.7 we might hit the following issue when running rabbitmqctl commands inside containers (as puppet does): Error: Failed to apply cata... — committed to openstack/puppet-tripleo by mbaldessari 5 years ago
- Update git submodules * Update puppet-tripleo from branch 'master' - Merge "Force C.UTF-8 when dealing with rabbitmq" - Force C.UTF-8 when dealing with rabbitmq When we use rabbitmq 3.7 ... — committed to openstack/openstack by deleted user 5 years ago
- Update git submodules * Update tripleo-heat-templates from branch 'master' - Merge "Force C.UTF-8 when dealing with rabbitmq" - Force C.UTF-8 when dealing with rabbitmq When we use rabbi... — committed to openstack/openstack by deleted user 5 years ago
- Force C.UTF-8 when dealing with rabbitmq When we use rabbitmq 3.7 we might hit the following issue when running rabbitmqctl commands inside containers (as puppet does): Error: Failed to apply cata... — committed to openstack/tripleo-heat-templates by mbaldessari 5 years ago
- Merge pull request #676 from fatmcgav/fix_up_674 Support policy format change in v3.7.0 - #671 (Replaces #674) — committed to cegeka/puppet-rabbitmq by bastelfreak 6 years ago
- Set default en_US.UTF-8 (#671, #689) This sets a (somewhat US-centric) default of en_US.UTF-8 for LC_ALL in $environment_variables, to work around a warning given via Elixir in newer version of the R... — committed to cegeka/puppet-rabbitmq by wyardley 6 years ago
Gets around this issue
So the issue is not resolved for new rabbitmq.
I wonder if there’s a good fix to this that’s clean but avoids explicitly hard coding locales / env variables. Maybe we could capture stderr from the command and only print it in the output it if the command fails?
@mUbsta thank you very much, you have saved my life here.