Sync charm-helpers and corresponding amulet update
Change-Id: Ie83da73bc865994174f815d218f7dc76d0fad4ad
This commit is contained in:
parent
85292511ef
commit
e61644060f
@ -126,7 +126,7 @@ class CheckException(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class Check(object):
|
class Check(object):
|
||||||
shortname_re = '[A-Za-z0-9-_.]+$'
|
shortname_re = '[A-Za-z0-9-_.@]+$'
|
||||||
service_template = ("""
|
service_template = ("""
|
||||||
#---------------------------------------------------
|
#---------------------------------------------------
|
||||||
# This file is Juju managed
|
# This file is Juju managed
|
||||||
|
@ -97,6 +97,7 @@ from charmhelpers.contrib.network.ip import (
|
|||||||
)
|
)
|
||||||
from charmhelpers.contrib.openstack.utils import (
|
from charmhelpers.contrib.openstack.utils import (
|
||||||
config_flags_parser,
|
config_flags_parser,
|
||||||
|
get_os_codename_install_source,
|
||||||
enable_memcache,
|
enable_memcache,
|
||||||
CompareOpenStackReleases,
|
CompareOpenStackReleases,
|
||||||
os_release,
|
os_release,
|
||||||
@ -240,6 +241,8 @@ class SharedDBContext(OSContextGenerator):
|
|||||||
else:
|
else:
|
||||||
rids = relation_ids(self.interfaces[0])
|
rids = relation_ids(self.interfaces[0])
|
||||||
|
|
||||||
|
rel = (get_os_codename_install_source(config('openstack-origin')) or
|
||||||
|
'icehouse')
|
||||||
for rid in rids:
|
for rid in rids:
|
||||||
self.related = True
|
self.related = True
|
||||||
for unit in related_units(rid):
|
for unit in related_units(rid):
|
||||||
@ -253,6 +256,8 @@ class SharedDBContext(OSContextGenerator):
|
|||||||
'database_password': rdata.get(password_setting),
|
'database_password': rdata.get(password_setting),
|
||||||
'database_type': 'mysql+pymysql'
|
'database_type': 'mysql+pymysql'
|
||||||
}
|
}
|
||||||
|
if CompareOpenStackReleases(rel) < 'stein':
|
||||||
|
ctxt['database_type'] = 'mysql'
|
||||||
if self.context_complete(ctxt):
|
if self.context_complete(ctxt):
|
||||||
db_ssl(rdata, ctxt, self.ssl_dir)
|
db_ssl(rdata, ctxt, self.ssl_dir)
|
||||||
return ctxt
|
return ctxt
|
||||||
|
@ -1241,7 +1241,7 @@ def remote_restart(rel_name, remote_service=None):
|
|||||||
|
|
||||||
|
|
||||||
def check_actually_paused(services=None, ports=None):
|
def check_actually_paused(services=None, ports=None):
|
||||||
"""Check that services listed in the services object and ports
|
"""Check that services listed in the services object and and ports
|
||||||
are actually closed (not listened to), to verify that the unit is
|
are actually closed (not listened to), to verify that the unit is
|
||||||
properly paused.
|
properly paused.
|
||||||
|
|
||||||
|
@ -424,8 +424,12 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
rel_napi_ks['auth_port'])
|
rel_napi_ks['auth_port'])
|
||||||
rel_napi_db = self.pxc_sentry.relation('shared-db',
|
rel_napi_db = self.pxc_sentry.relation('shared-db',
|
||||||
'neutron-api:shared-db')
|
'neutron-api:shared-db')
|
||||||
db_conn = 'mysql+pymysql://neutron:{}@{}/neutron'.format(
|
if self._get_openstack_release() < self.bionic_stein:
|
||||||
rel_napi_db['password'], rel_napi_db['db_host'])
|
dialect = 'mysql'
|
||||||
|
else:
|
||||||
|
dialect = 'mysql+pymysql'
|
||||||
|
db_conn = '{}://neutron:{}@{}/neutron'.format(
|
||||||
|
dialect, rel_napi_db['password'], rel_napi_db['db_host'])
|
||||||
|
|
||||||
conf = '/etc/neutron/neutron.conf'
|
conf = '/etc/neutron/neutron.conf'
|
||||||
expected = {
|
expected = {
|
||||||
|
Loading…
Reference in New Issue
Block a user