Address all rabbit units in clustered deploy

If rabbitmq is deployed in a cluster then the ceilometer charm will
pass rabbitmq_hosts and rabbitmq_host to ceilometer-agent. This charm
was ignoring the rabbitmq_hosts key and thus always talking to a
single rabbit even if there were multiple.

Change-Id: I42c2e3ee4ee2bd1feb9815a4d9895a7121801995
Closes-Bug: #1670273
This commit is contained in:
Liam Young 2017-10-18 10:28:07 +00:00
parent 904aa0d604
commit 958dfc3e2f
3 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ tags
*.pyc
.unit-state.db
trusty
.stestr

View File

@ -53,7 +53,8 @@ class CeilometerServiceContext(OSContextGenerator):
optional_keys = [
'rabbit_ssl_port',
'rabbit_ssl_ca'
'rabbit_ssl_ca',
'rabbitmq_hosts'
]
def __init__(self, ssl_dir=None):

View File

@ -38,6 +38,7 @@ class CeilometerContextsTest(CharmTestCase):
'debug': True,
'verbose': False,
'rabbitmq_host': 'foo',
'rabbitmq_hosts': 'foo,bar',
'rabbitmq_user': 'bar',
'rabbitmq_password': 'baz',
'rabbitmq_virtual_host': 'openstack',