fixed get_mon_hosts()

This commit is contained in:
Edward Hope-Morley 2014-09-19 10:57:53 +01:00
parent b715ebd273
commit 7af7549025
1 changed files with 5 additions and 5 deletions

View File

@ -142,11 +142,11 @@ def get_mon_hosts():
hosts = []
for relid in relation_ids('mon'):
for unit in related_units(relid):
if config('prefer-ipv6'):
addr = relation_get('ceph-public-address', unit, relid) or \
relation_get('private-address', unit, relid)
else:
addr = relation_get('ceph-public-address', unit, relid) or \
addr = relation_get('ceph-public-address', unit, relid)
if not addr:
if config('prefer-ipv6'):
addr = relation_get('private-address', unit, relid)
else:
get_host_ip(relation_get('private-address', unit, relid))
if addr is not None: