charm-helpers sync
Synchronize charm-helpers to get the bug fix when keystone leader fails to connect to itself while running identity-service-relation-changed hook. Closes-Bug: #2015103 Change-Id: Ia7622a41467aa963b4940171d1aa718e3b9fcf8d
This commit is contained in:
parent
d3688f33b3
commit
11454ac2ac
|
@ -224,6 +224,13 @@ def https():
|
|||
return True
|
||||
if config_get('ssl_cert') and config_get('ssl_key'):
|
||||
return True
|
||||
# Local import to avoid ciruclar dependency.
|
||||
import charmhelpers.contrib.openstack.cert_utils as cert_utils
|
||||
if (
|
||||
cert_utils.get_certificate_request() and not
|
||||
cert_utils.get_requests_for_local_unit("certificates")
|
||||
):
|
||||
return False
|
||||
for r_id in relation_ids('certificates'):
|
||||
for unit in relation_list(r_id):
|
||||
ca = relation_get('ca', rid=r_id, unit=unit)
|
||||
|
|
|
@ -1039,7 +1039,7 @@ def _determine_os_workload_status(
|
|||
state, message, lambda: charm_func(configs))
|
||||
|
||||
if state is None:
|
||||
state, message = _ows_check_services_running(services, ports)
|
||||
state, message = ows_check_services_running(services, ports)
|
||||
|
||||
if state is None:
|
||||
state = 'active'
|
||||
|
@ -1213,7 +1213,12 @@ def _ows_check_charm_func(state, message, charm_func_with_configs):
|
|||
return state, message
|
||||
|
||||
|
||||
@deprecate("use ows_check_services_running() instead", "2022-05", log=juju_log)
|
||||
def _ows_check_services_running(services, ports):
|
||||
return ows_check_services_running(services, ports)
|
||||
|
||||
|
||||
def ows_check_services_running(services, ports):
|
||||
"""Check that the services that should be running are actually running
|
||||
and that any ports specified are being listened to.
|
||||
|
||||
|
|
|
@ -813,8 +813,10 @@ def get_mon_map(service):
|
|||
ceph command fails.
|
||||
"""
|
||||
try:
|
||||
octopus_or_later = cmp_pkgrevno('ceph-common', '15.0.0') >= 0
|
||||
mon_status_cmd = 'quorum_status' if octopus_or_later else 'mon_status'
|
||||
mon_status = check_output(['ceph', '--id', service,
|
||||
'mon_status', '--format=json'])
|
||||
mon_status_cmd, '--format=json'])
|
||||
if six.PY3:
|
||||
mon_status = mon_status.decode('UTF-8')
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue