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 https://github.com/voxpupuli/puppet-rabbitmq/issues/671 This is a strict requirement coming from Elixir: https://github.com/elixir-lang/elixir/issues/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
This commit is contained in:
@@ -129,7 +129,10 @@ outputs:
|
||||
rabbitmq::package_source: undef
|
||||
rabbitmq::repos_ensure: false
|
||||
rabbitmq::tcp_keepalive: true
|
||||
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
|
||||
rabbitmq_environment:
|
||||
LANG: 'C.UTF-8'
|
||||
LC_ALL: 'C.UTF-8'
|
||||
NODE_PORT: ''
|
||||
NODE_IP_ADDRESS: ''
|
||||
RABBITMQ_NODENAME: "rabbit@%{::hostname}"
|
||||
|
||||
@@ -231,6 +231,9 @@ outputs:
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
|
||||
- 'LANG=C.UTF-8'
|
||||
- 'LC_ALL=C.UTF-8'
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
- list_join:
|
||||
|
||||
@@ -231,6 +231,9 @@ outputs:
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
|
||||
- 'LANG=C.UTF-8'
|
||||
- 'LC_ALL=C.UTF-8'
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
- list_join:
|
||||
|
||||
@@ -231,6 +231,9 @@ outputs:
|
||||
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
|
||||
- /bin/true:/bin/epmd
|
||||
environment:
|
||||
# https://launchpad.net/bugs/1822673 (lang/lc_all to utf-8 are an elixir requirement)
|
||||
- 'LANG=C.UTF-8'
|
||||
- 'LC_ALL=C.UTF-8'
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
- list_join:
|
||||
|
||||
Reference in New Issue
Block a user