Switch novajoin to use RpcUserName

In queens with instack-undercloud we used to generate a random
rabbitmq user. During a UC upgrade this gets migrated to the RpcUserName
env variable. But since novajoin uses RabbitUserName it will default
to guest during an upgrade and will fail to connect to rabbitmq:
2020-11-24 20:01:31.569 7 ERROR join     method_sig, payload, content,
2020-11-24 20:01:31.569 7 ERROR join   File
"/usr/lib/python3.6/site-packages/amqp/abstract_channel.py", line 126,
in dispatch_method
2020-11-24 20:01:31.569 7 ERROR join     listener(*args)
2020-11-24 20:01:31.569 7 ERROR join   File
"/usr/lib/python3.6/site-packages/amqp/connection.py", line 639, in
_on_close
2020-11-24 20:01:31.569 7 ERROR join     (class_id, method_id),
ConnectionError)
2020-11-24 20:01:31.569 7 ERROR join amqp.exceptions.AccessRefused: (0,
0): (403) ACCESS_REFUSED - Login was refused using authentication
  mechanism AMQPLAIN. For detail s see the broker logfile.

Server side wo;; gives us:
2020-11-24 20:12:31.426 [error] <0.5096.1> Error on AMQP connection
<0.5096.1> (192.168.24.1:57254 -> 192.168.24.1:5672, state: starting):
AMQPLAIN login refused: user 'guest' - invalid credentials
During a queens->train FF

Let's just switch to use RpcUserName and make this more consistent.
This is fine, as both RabbitUserName and RpcUserName default to 'guest'
and changing one but not the other is not really feasible in a
deployment.

Tested and a full FFU with TLS-E correctly works now.

Closes-Bug: #1905526

Change-Id: Ida039c3e0f4c73c8f666f730f290bf18c24f92ed
This commit is contained in:
Michele Baldessari 2020-11-24 21:53:00 +01:00
parent 1960669619
commit 47d31250e8
1 changed files with 3 additions and 3 deletions

View File

@ -65,9 +65,9 @@ parameters:
description: The password for messaging backend
type: string
hidden: true
RabbitUserName:
RpcUserName:
default: guest
description: The username for RabbitMQ
description: The username for messaging backend
type: string
NovajoinIpaOtp:
default: ''
@ -112,7 +112,7 @@ outputs:
config_settings:
tripleo::profile::base::novajoin::oslomsg_rpc_password: {get_param: RpcPassword}
tripleo::profile::base::novajoin::oslomsg_rpc_port: {get_param: RabbitClientPort}
tripleo::profile::base::novajoin::oslomsg_rpc_username: {get_param: RabbitUserName}
tripleo::profile::base::novajoin::oslomsg_rpc_username: {get_param: RpcUserName}
tripleo::profile::base::novajoin::oslomsg_use_ssl: {get_param: RabbitClientUseSSL}
tripleo::profile::base::novajoin::service_password: {get_param: NovajoinPassword}
nova::metadata::novajoin::api::bind_address: &novajoin_address