Merge "Use proper IP address for rabbit management access" into stable/newton

This commit is contained in:
Jenkins 2017-03-23 10:34:13 +00:00 committed by Gerrit Code Review
commit 9f16ad761c
3 changed files with 19 additions and 5 deletions

View File

@ -21,8 +21,10 @@
# Defaults to $::rabbitmq::port
#
# [*host_ip*]
# String. A string used for OCF script to collect
# RabbitMQ statistics
# String. An IP address that to be used as a part of the URL
# for importing rabbitmq definitions from a backup as a part of
# a recovery action.
#
# Defaults to '127.0.0.1'
#
# [*debug*]
@ -124,7 +126,7 @@ class cluster::rabbitmq_ocf (
$mon_interval = '30',
) inherits ::rabbitmq::service {
if $host_ip == 'UNSET' or $host_ip == '0.0.0.0' {
if $host_ip == '0.0.0.0' {
$real_host_ip = '127.0.0.1'
} else {
$real_host_ip = $host_ip

View File

@ -185,7 +185,19 @@ class osnailyfacter::rabbitmq::rabbitmq {
erlang_cookie => $erlang_cookie,
admin_user => $rabbit_hash['user'],
admin_pass => $rabbit_hash['password'],
host_ip => $rabbitmq_bind_ip_address,
# NOTE(binarin) This value is needed by (never-used) feature
# of dumping/resoring RabbitMQ definitions during
# recovery. Default value of '127.0.0.1' works very well,
# but when this value has node-specific values it can lead
# to random deploy failures. So in a very unlikely event the
# need to change this value arises the following things
# needs to be done:
# - support for private pacemaker attirbutes (attrd_update -p)
# should be added to https://github.com/fuel-infra/puppet-pacemaker
# - '::cluster::rabbitmq_ocf' should start setting this attribute
# via that new private attr functionality
# - HA OCF script should be updated accordingly in rabbitmq upstream
host_ip => $management_bind_ip_address,
enable_rpc_ha => $enable_rpc_ha,
enable_notifications_ha => $enable_notifications_ha,
fqdn_prefix => $fqdn_prefix,

View File

@ -160,7 +160,7 @@ describe manifest do
:erlang_cookie => erlang_cookie,
:admin_user => rabbit_hash['user'],
:admin_pass => rabbit_hash['password'],
:host_ip => rabbitmq_bind_ip_address,
:host_ip => management_bind_ip_address,
:enable_rpc_ha => enable_rpc_ha,
:enable_notifications_ha => enable_notifications_ha,
:fqdn_prefix => fqdn_prefix,