add status set to blocked for no v6 addr rxed from storage rel
This commit is contained in:
commit
85e326e17d
|
@ -214,6 +214,7 @@ def storage_changed():
|
|||
"(got=%s)" % (addr))
|
||||
log(msg, level=WARNING)
|
||||
host_ip = addr
|
||||
return
|
||||
else:
|
||||
host_ip = openstack.get_host_ip(addr)
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ from charmhelpers.core.host import (
|
|||
from charmhelpers.contrib.network.ip import (
|
||||
format_ipv6_addr,
|
||||
get_ipv6_addr,
|
||||
is_ipv6,
|
||||
)
|
||||
from charmhelpers.core.decorators import (
|
||||
retry_on_exception,
|
||||
|
@ -1057,6 +1058,16 @@ def assess_status(configs):
|
|||
status_set('blocked', 'Not enough storage zones for minimum replicas')
|
||||
return
|
||||
|
||||
if config('prefer-ipv6'):
|
||||
for rid in relation_ids('swift-storage'):
|
||||
for unit in related_units(rid):
|
||||
addr = relation_get(attribute='private-address', unit=unit,
|
||||
rid=rid)
|
||||
if not is_ipv6(addr):
|
||||
status_set('blocked', 'Did not get IPv6 address from '
|
||||
'storage relation (got=%s)' % (addr))
|
||||
return
|
||||
|
||||
if relation_ids('identity-service'):
|
||||
required_interfaces['identity'] = ['identity-service']
|
||||
|
||||
|
|
Loading…
Reference in New Issue