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

not working with rabbitmq-server 3.7 - Cannot parse invalid user line #671

Closed
heap98 opened this issue Dec 6, 2017 · 23 comments
Closed

Comments

@heap98
Copy link

heap98 commented Dec 6, 2017

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

@wyardley
Copy link
Contributor

wyardley commented Dec 6, 2017

@heap98:
What's the output of rabbitmqctl -q list_users as the user Puppet is running as? Does it have that same warning:

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)

It's possible that dumping stderr in the rabbitmqctl command would fix this (or, more helpfully, capturing it in a different stream), but it might also obscure errors that would be helpful in debugging.
I'm going to guess that fixing the locale issue mentioned in the error might fix this problem
https://stackoverflow.com/questions/32407164/the-vm-is-running-with-native-name-encoding-of-latin1-which-may-cause-elixir-to

@heap98
Copy link
Author

heap98 commented Dec 7, 2017

puppet runs as user root. output of the command is below and looks fine.

root@rabbit01:~# rabbitmqctl -q list_users
guest [administrator]

update-locale LC_ALL=en_US.UTF-8

doesn't fix the issue.

output von locale:

[root@rabbit01 ~]$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

@wikimatze
Copy link

I have a similar error. The solution for this is to use:

def self.instances
    user_list = run_with_retries do
      rabbitmqctl('-q', 'list_users')
    end

    user_list = `/usr/sbin/rabbitmqctl -q list_users`
    ....

instead of:

 def self.instances
    user_list = run_with_retries do
      rabbitmqctl('-q', 'list_users')
    end

    user_list.split(%r{\n}).map do |line|
      ....
    end

So the problem arise with the mapped usage of modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb command within the project. Even if I set #encoding: UTF-8 at the beginning of the file, it does not solve the problem.

@mUbsta
Copy link

mUbsta commented Dec 7, 2017

class {'rabbitmq':
  environment_variables => {
    'LC_ALL' => 'en_GB.UTF-8',
  }
}

Gets around this issue

@wikimatze
Copy link

@mUbsta thanks for the advice, I'll try this.

@desertkun
Copy link

@mUbsta thank you very much, you have saved my life here.

@wyardley
Copy link
Contributor

wyardley commented Dec 8, 2017

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?

@ThaDanus
Copy link

Thank you very much @mUbsta, this had us stumped for a couple of days!

@ghost
Copy link

ghost commented Dec 21, 2017

After adding environment_variables => { 'LC_ALL' => 'en_GB.UTF-8', }
this ocurres:

root@dev-mq-02:~  #
root@dev-mq-02:~  # pat
Info: Using configured environment '186312_mq'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for dev-mq-02.svc.int.ix.org.au
Info: Applying configuration version '1513829253'
Notice: /Stage[main]/Rabbitmq::Config/File[rabbitmq-env.config]/content:
--- /etc/rabbitmq/rabbitmq-env.conf	2017-12-21 14:27:26.551001889 +1100
+++ /tmp/puppet-file20171221-7604-1tcbc9v	2017-12-21 15:08:13.587487767 +1100
@@ -1,3 +1,4 @@
+LC_ALL=en_GB.UTF-8
 NODENAME=rabbit
 NODE_IP_ADDRESS=0.0.0.0
 NODE_PORT=5672

Notice: /Stage[main]/Rabbitmq::Config/File[rabbitmq-env.config]/content:

Notice: /Stage[main]/Rabbitmq::Config/File[rabbitmq-env.config]/content: content changed '{md5}41196d5c8c9a6193a4f956922ad6d8b4' to '{md5}be8c2728663459a409e45fab8311fef4'
Info: /Stage[main]/Rabbitmq::Config/File[rabbitmq-env.config]: Scheduling refresh of Class[Rabbitmq::Service]
Info: Class[Rabbitmq::Config]: Scheduling refresh of Class[Rabbitmq::Service]
Info: Class[Rabbitmq::Service]: Scheduling refresh of Service[rabbitmq-server]
Notice: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]: Triggered 'refresh' from 1 event
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[hsnet-admin_docker_dev]/Rabbitmq_policy[ha-all@hsnet-admin_docker_dev]: Could not evaluate: cannot parse line from list_policies:hsnet-admin_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[hsnet-admin-test_docker_dev]/Rabbitmq_policy[ha-all@hsnet-admin-test_docker_dev]: Could not evaluate: cannot parse line from list_policies:hsnet-admin-test_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[s2x_docker_dev]/Rabbitmq_policy[ha-all@s2x_docker_dev]: Could not evaluate: cannot parse line from list_policies:s2x_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[s2x-test_docker_dev]/Rabbitmq_policy[ha-all@s2x-test_docker_dev]: Could not evaluate: cannot parse line from list_policies:s2x-test_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[iss3_docker_dev]/Rabbitmq_policy[ha-all@iss3_docker_dev]: Could not evaluate: cannot parse line from list_policies:iss3_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[iss3-test_docker_dev]/Rabbitmq_policy[ha-all@iss3-test_docker_dev]: Could not evaluate: cannot parse line from list_policies:iss3-test_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[profiles_docker_dev]/Rabbitmq_policy[ha-all@profiles_docker_dev]: Could not evaluate: cannot parse line from list_policies:profiles_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[profiles-test_docker_dev]/Rabbitmq_policy[ha-all@profiles-test_docker_dev]: Could not evaluate: cannot parse line from list_policies:profiles-test_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[oneplace_docker_dev]/Rabbitmq_policy[ha-all@oneplace_docker_dev]: Could not evaluate: cannot parse line from list_policies:oneplace_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[oneplace-test_docker_dev]/Rabbitmq_policy[ha-all@oneplace-test_docker_dev]: Could not evaluate: cannot parse line from list_policies:oneplace-test_docker_dev	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Error: /Stage[main]/Profiles::Services::Rabbitmq::Docker_app_accounts/Profiles::Services::Rabbitmq::User[nagios]/Rabbitmq_policy[ha-all@/]: Could not evaluate: cannot parse line from list_policies:/	ha-all	.*	all	{"ha-mode":"all","ha-sync-mode":"automatic"}	0
Info: Stage[main]: Unscheduling all events on Stage[main]

So, this solution removes one problem and introduces another one.

The problem is in this regular expression:
rabbitmq/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb

Line 20: raise Puppet::Error, "cannot parse line from list_policies:#{line}" unless line =~ %r{^(\S+)\s+(\S+)\s+(all|exchanges|queues)?\s*(\S+)\s+(\S+)\s+(\d+)$}

@ghost
Copy link

ghost commented Dec 27, 2017

Created a PR to resolve this ^^^
#674

@waza-ari
Copy link

waza-ari commented Feb 8, 2018

Hm, it looks I'm also hitting this bug with latest 8.1.0 code. Distribution is CentOS 7, but also RHEL 6.8 seems to be affected.

This is the debug output around the error:

Debug: Prefetching rabbitmqctl resources for rabbitmq_user
Debug: Executing: '/sbin/rabbitmqctl -q list_users'
Debug: Command succeeded
Debug: Storing state
Debug: Stored state in 0.11 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
Debug: Dynamically-bound port lookup failed; falling back to report_port setting

Running the command /sbin/rabbitmqctl -q list_users directly from the CLI works without problems, it shows the users.

And yes, the solution proposes by @mUbsta is working

@oneiros-de
Copy link

oneiros-de commented Mar 19, 2018

We are seeing the same issue with Debian 8.10 and RabbitMQ 3.7.2 on Erlang 20.1 and the latest 8.1.0 code.

@wyardley
Copy link
Contributor

Can someone post the actual list_users output from one of the affected systems?

@oneiros-de
Copy link

guest [administrator]

@wyardley
Copy link
Contributor

wyardley commented Mar 24, 2018

I think #674 fixed the policy provider, not user
Does the workaround involving locales work?
I did a quick test, and it seems like the regex is correct: %r{^(\S+)\s+\[(.*?)\]$
So this probably has to do with the locale vs. a change in syntax between RabbitMQ versions....

I agree that fixing this with that workaround is not ideal, but I'm not sure that this module should be getting into the business of doing a more complicated fix for this (unless it's to set the locale to something sane like C or UTF-8 in the defaults?), e.g.,

-  $environment_variables               = {}
+  $environment_variables               = { 'LC_ALL' => 'C' }

in params.pp? This would seem to be sane and I imagine for most users, setting locale to C should not cause issues with normal user / queue / etc. names in RabbitMQ.

@wyardley
Copy link
Contributor

wyardley commented Apr 4, 2018

Can you see if #690 resolves this?

@oneiros-de
Copy link

@wyardley Doesn't seem so

root@test-icms-rabbitmq1:/home/martinsc # puppet agent --test --noop
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Applying configuration version '1522921614'
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)
root@test-icms-rabbitmq1:/home/martinsc # locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Apr 5, 2018
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this issue Apr 6, 2018
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 RabbitMQ CLI tools.
@michaelklishin
Copy link

This is an Elixir requirement and their team seems to feel strongly about this.

Configuration software that uses CLI tools can override locale environment variables for the calls that expect an output that is parsed:

LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" rabbitmqctl …

Team RabbitMQ will consider forcing this in our shell scripts (rabbitmq/rabbitmq-server#1573) but IIRC this has been considered before and rejected.

wyardley added a commit that referenced this issue Apr 9, 2018
Set default LC_ALL => en_US.UTF-8 (#671, #689)
@wyardley
Copy link
Contributor

wyardley commented Apr 9, 2018

Merged a fix that forces en_US.UTF-8 vs. C, which fixes in my test environment.
Happy to help if someone wants to play with a fix that actually ignores the output, but I think this would require significantly more effort for maybe not much gain.

@wyardley wyardley closed this as completed Apr 9, 2018
@jurim76
Copy link

jurim76 commented Nov 18, 2018

Same issue again

In rabbitmq-3.7.9 added a new string "user tags", that breaks output parsing

rabbitmqctl list_users
Listing users ...
user tags
comps [management]
tr3 [management]
admin [administrator]
sugarcrm [management]
backup [administrator, management]
zabbix [monitoring]
tasks [management]

Puppet exit with error

"Error: Failed to apply catalog: Cannot parse invalid user line: user tags"

@benpollard
Copy link

See rabbitmq/rabbitmq-cli#273 for details on how to solve this issue.

@danpawlik
Copy link

See rabbitmq/rabbitmq-cli#273 for details on how to solve this issue.

So the issue is not resolved for new rabbitmq.

openstack-gerrit pushed a commit to openstack-archive/puppet-tripleo that referenced this issue Apr 2, 2019
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 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)

This is fundamentally the tripleo version of
voxpupuli/puppet-rabbitmq#671

This is a strict requirement coming from Elixir:
elixir-lang/elixir#3548

Since containers do not have UTF-8 as a default we have this problem:
[root@overcloud-controller-0 ~]# podman exec -it rabbitmq-bundle-podman-0 sh
()[root@overcloud-controller-0 /]$ rabbitmqctl -q list_users
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 ru nning "locale" in your shell) user tags
guest [administrator]
()[root@overcloud-controller-0 /]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Related-Bug: #1822673
Change-Id: I21ef2e7862f3e5e21812d342b1681f8d5f7f005d
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Apr 2, 2019
* 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 we might hit the following issue when running rabbitmqctl commands inside containers (as puppet does):
    
      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)
    
    This is fundamentally the tripleo version of
    voxpupuli/puppet-rabbitmq#671
    
    This is a strict requirement coming from Elixir:
    elixir-lang/elixir#3548
    
    Since containers do not have UTF-8 as a default we have this problem:
    [root@overcloud-controller-0 ~]# podman exec -it rabbitmq-bundle-podman-0 sh
    ()[root@overcloud-controller-0 /]$ rabbitmqctl -q list_users
    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 ru nning "locale" in your shell) user tags
    guest [administrator]
    ()[root@overcloud-controller-0 /]$ locale
    LANG=
    LC_CTYPE="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_COLLATE="POSIX"
    LC_MONETARY="POSIX"
    LC_MESSAGES="POSIX"
    LC_PAPER="POSIX"
    LC_NAME="POSIX"
    LC_ADDRESS="POSIX"
    LC_TELEPHONE="POSIX"
    LC_MEASUREMENT="POSIX"
    LC_IDENTIFICATION="POSIX"
    LC_ALL=
    
    Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
    Related-Bug: #1822673
    Change-Id: I21ef2e7862f3e5e21812d342b1681f8d5f7f005d
openstack-gerrit pushed a commit to openstack/openstack that referenced this issue Apr 2, 2019
* 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 rabbitmq 3.7 we might hit the following issue when running rabbitmqctl commands inside containers (as puppet does):
    
      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)
    
    This is fundamentally the tripleo version of
    voxpupuli/puppet-rabbitmq#671
    
    This is a strict requirement coming from Elixir:
    elixir-lang/elixir#3548
    
    Since containers do not have UTF-8 as a default we have this problem:
    [root@overcloud-controller-0 ~]# podman exec -it rabbitmq-bundle-podman-0 sh
    ()[root@overcloud-controller-0 /]$ rabbitmqctl -q list_users
    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 ru nning "locale" in your shell) user tags
    guest [administrator]
    ()[root@overcloud-controller-0 /]$ locale
    LANG=
    LC_CTYPE="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_COLLATE="POSIX"
    LC_MONETARY="POSIX"
    LC_MESSAGES="POSIX"
    LC_PAPER="POSIX"
    LC_NAME="POSIX"
    LC_ADDRESS="POSIX"
    LC_TELEPHONE="POSIX"
    LC_MEASUREMENT="POSIX"
    LC_IDENTIFICATION="POSIX"
    LC_ALL=
    
    This is the THT version of forcing UTF-8 on all rabbitmq_init_bundles
    and on epmd itself. The puppet-tripleo one is the depends-on:
    Depends-on: I21ef2e7862f3e5e21812d342b1681f8d5f7f005d
    
    Tested on the original environment from Emilien where we saw this issue
    during scale-up. After appling this review and its dependency we
    correctly got a scaleup with rabbitm3.7 working
    
    Closes-Bug: #1822673
    Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
    Change-Id: Ifc1377811de68bf14ea4aea4dfb52e22a8864d46
openstack-gerrit pushed a commit to openstack-archive/tripleo-heat-templates that referenced this issue Apr 2, 2019
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 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)

This is fundamentally the tripleo version of
voxpupuli/puppet-rabbitmq#671

This is a strict requirement coming from Elixir:
elixir-lang/elixir#3548

Since containers do not have UTF-8 as a default we have this problem:
[root@overcloud-controller-0 ~]# podman exec -it rabbitmq-bundle-podman-0 sh
()[root@overcloud-controller-0 /]$ rabbitmqctl -q list_users
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 ru nning "locale" in your shell) user tags
guest [administrator]
()[root@overcloud-controller-0 /]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

This is the THT version of forcing UTF-8 on all rabbitmq_init_bundles
and on epmd itself. The puppet-tripleo one is the depends-on:
Depends-on: I21ef2e7862f3e5e21812d342b1681f8d5f7f005d

Tested on the original environment from Emilien where we saw this issue
during scale-up. After appling this review and its dependency we
correctly got a scaleup with rabbitm3.7 working

Closes-Bug: #1822673
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
Change-Id: Ifc1377811de68bf14ea4aea4dfb52e22a8864d46
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
Support policy format change in v3.7.0 - voxpupuli#671 (Replaces voxpupuli#674)
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
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 RabbitMQ CLI tools.
@NimishKmr
Copy link

Is this fixed? I too get same error when using in puppet..

Error -
Error: /Stage[main]/Mymodule::Rabbitmq/Rabbitmq_user_permissions[newdev@newdev]: Could not evaluate: cannot parse line from list_user_permissions: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)

Puppet config -
#Configure RabbitMQ
rabbitmq_user { "$rabbitmq_user":
admin => false,
password => "${rabbitmq_pass}",
provider => 'rabbitmqctl',
tags => ['policymaker'],
}->
rabbitmq_vhost { "$rabbitmq_vhost":
provider => 'rabbitmqctl',

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

No branches or pull requests