fix
This commit is contained in:
@@ -147,10 +147,10 @@ class SharedDBContext(OSContextGenerator):
|
|||||||
'database_host': rdata.get('db_host'),
|
'database_host': rdata.get('db_host'),
|
||||||
'database': self.database,
|
'database': self.database,
|
||||||
'database_user': self.user,
|
'database_user': self.user,
|
||||||
'database_password': passwd,
|
'database_password': rdata.get(password_setting)
|
||||||
'database_type': 'mysql',
|
|
||||||
}
|
}
|
||||||
if context_complete(ctxt):
|
if context_complete(ctxt):
|
||||||
|
db_ssl(rdata, ctxt, self.ssl_dir)
|
||||||
return ctxt
|
return ctxt
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
@@ -180,7 +180,6 @@ class PostgresqlDBContext(OSContextGenerator):
|
|||||||
'database_type': 'postgresql',
|
'database_type': 'postgresql',
|
||||||
}
|
}
|
||||||
if context_complete(ctxt):
|
if context_complete(ctxt):
|
||||||
db_ssl(rdata, ctxt, self.ssl_dir)
|
|
||||||
return ctxt
|
return ctxt
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
@@ -256,6 +255,7 @@ class AMQPContext(OSContextGenerator):
|
|||||||
raise OSContextError
|
raise OSContextError
|
||||||
ctxt = {}
|
ctxt = {}
|
||||||
for rid in relation_ids('amqp'):
|
for rid in relation_ids('amqp'):
|
||||||
|
ha_vip_only = False
|
||||||
for unit in related_units(rid):
|
for unit in related_units(rid):
|
||||||
if relation_get('clustered', rid=rid, unit=unit):
|
if relation_get('clustered', rid=rid, unit=unit):
|
||||||
ctxt['clustered'] = True
|
ctxt['clustered'] = True
|
||||||
@@ -284,7 +284,6 @@ class AMQPContext(OSContextGenerator):
|
|||||||
ha_vip_only = relation_get('ha-vip-only',
|
ha_vip_only = relation_get('ha-vip-only',
|
||||||
rid=rid, unit=unit) is not None
|
rid=rid, unit=unit) is not None
|
||||||
|
|
||||||
>>>>>>> MERGE-SOURCE
|
|
||||||
if context_complete(ctxt):
|
if context_complete(ctxt):
|
||||||
if 'rabbit_ssl_ca' in ctxt:
|
if 'rabbit_ssl_ca' in ctxt:
|
||||||
if not self.ssl_dir:
|
if not self.ssl_dir:
|
||||||
@@ -299,12 +298,8 @@ class AMQPContext(OSContextGenerator):
|
|||||||
# Sufficient information found = break out!
|
# Sufficient information found = break out!
|
||||||
break
|
break
|
||||||
# Used for active/active rabbitmq >= grizzly
|
# Used for active/active rabbitmq >= grizzly
|
||||||
if ('clustered' not in ctxt or relation_get('ha-vip-only') == 'True') and \
|
if ('clustered' not in ctxt or ha_vip_only) \
|
||||||
len(related_units(rid)) > 1:
|
and len(related_units(rid)) > 1:
|
||||||
if relation_get('ha_queues'):
|
|
||||||
ctxt['rabbitmq_ha_queues'] = relation_get('ha_queues')
|
|
||||||
else:
|
|
||||||
ctxt['rabbitmq_ha_queues'] = False
|
|
||||||
rabbitmq_hosts = []
|
rabbitmq_hosts = []
|
||||||
for unit in related_units(rid):
|
for unit in related_units(rid):
|
||||||
rabbitmq_hosts.append(relation_get('private-address',
|
rabbitmq_hosts.append(relation_get('private-address',
|
||||||
|
Reference in New Issue
Block a user