Add rabbitmq workaround if rabbitmq plugin enabled

Keystone admin fails if no RabbitMQ servers are available,
so AMQP should be correctly configured.

FIXME. RabbitMQ plugin cannot notify other plugins of its
settings because in normal deployments, those role are
not present in the deployment graph and fail to resolve.

Change-Id: Ifb03165d44395ac7957180c454b70c148d653df3
Partial-Bug: #1490523
This commit is contained in:
Matthew Mosesohn 2015-09-02 17:36:59 +03:00
parent b49c5c7262
commit 418cbc01cd

View File

@ -59,6 +59,18 @@ if $detach_keystone_plugin {
$memcache_nodes = $keystone_nodes
$deploy_vrouter = 'false'
$keystone_enabled = 'true'
#FIXME(mattymo): Allow plugins to depend on each other and update each other
$detach_rabbitmq_plugin = hiera('detach-rabbitmq', undef)
if $detach_rabbitmq_plugin {
$rabbitmq_roles = [ 'standalone-rabbitmq' ]
$amqp_port = hiera('amqp_ports', '5673')
$rabbit_nodes = get_nodes_hash_by_roles($network_metadata, $rabbitmq_roles)
$rabbit_address_map = get_node_to_ipaddr_map_by_network_role($rabbit_nodes, 'mgmt/messaging')
$amqp_ips = ipsort(values($rabbit_address_map))
$amqp_hosts = amqp_hosts($amqp_ips, $amqp_port)
}
}
/controller/: {
$deploy_vrouter = 'true'
@ -122,6 +134,9 @@ memcache_roles:
<% end -%>
<% end -%>
deploy_vrouter: <%= @deploy_vrouter %>
<% if @amqp_hosts -%>
amqp_hosts: <%= @amqp_hosts %>
<% end -%>
')
file { '/etc/hiera/override':