summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Bryant <corey.bryant@canonical.com>2019-01-11 14:34:44 +0000
committerCorey Bryant <corey.bryant@canonical.com>2019-01-11 14:34:49 +0000
commita3fd4b31278f6a09e60a2b2c9c13c96ff1027b4a (patch)
treec46da0b6d2add950670f512e3c8d2505a687dcb1
parentb452e54401a17e7b46722ebd5f5f94b6174dd54d (diff)
Sync charm-helpersHEADmaster
Notes
Notes (review): Verified+1: Canonical CI <uosci-testing-bot@ubuntu.com> Code-Review+2: Frode Nordahl <frode.nordahl@canonical.com> Workflow+1: Frode Nordahl <frode.nordahl@canonical.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 14 Jan 2019 13:19:05 +0000 Reviewed-on: https://review.openstack.org/630252 Project: openstack/charm-ceph-osd Branch: refs/heads/master
-rw-r--r--hooks/charmhelpers/contrib/charmsupport/nrpe.py2
-rw-r--r--hooks/charmhelpers/contrib/openstack/context.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/hooks/charmhelpers/contrib/charmsupport/nrpe.py b/hooks/charmhelpers/contrib/charmsupport/nrpe.py
index f59fdd6..0626b32 100644
--- a/hooks/charmhelpers/contrib/charmsupport/nrpe.py
+++ b/hooks/charmhelpers/contrib/charmsupport/nrpe.py
@@ -126,7 +126,7 @@ class CheckException(Exception):
126 126
127 127
128class Check(object): 128class Check(object):
129 shortname_re = '[A-Za-z0-9-_.]+$' 129 shortname_re = '[A-Za-z0-9-_.@]+$'
130 service_template = (""" 130 service_template = ("""
131#--------------------------------------------------- 131#---------------------------------------------------
132# This file is Juju managed 132# This file is Juju managed
diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py
index d892bad..8a20375 100644
--- a/hooks/charmhelpers/contrib/openstack/context.py
+++ b/hooks/charmhelpers/contrib/openstack/context.py
@@ -97,6 +97,7 @@ from charmhelpers.contrib.network.ip import (
97) 97)
98from charmhelpers.contrib.openstack.utils import ( 98from charmhelpers.contrib.openstack.utils import (
99 config_flags_parser, 99 config_flags_parser,
100 get_os_codename_install_source,
100 enable_memcache, 101 enable_memcache,
101 CompareOpenStackReleases, 102 CompareOpenStackReleases,
102 os_release, 103 os_release,
@@ -240,6 +241,8 @@ class SharedDBContext(OSContextGenerator):
240 else: 241 else:
241 rids = relation_ids(self.interfaces[0]) 242 rids = relation_ids(self.interfaces[0])
242 243
244 rel = (get_os_codename_install_source(config('openstack-origin')) or
245 'icehouse')
243 for rid in rids: 246 for rid in rids:
244 self.related = True 247 self.related = True
245 for unit in related_units(rid): 248 for unit in related_units(rid):
@@ -253,6 +256,8 @@ class SharedDBContext(OSContextGenerator):
253 'database_password': rdata.get(password_setting), 256 'database_password': rdata.get(password_setting),
254 'database_type': 'mysql+pymysql' 257 'database_type': 'mysql+pymysql'
255 } 258 }
259 if CompareOpenStackReleases(rel) < 'stein':
260 ctxt['database_type'] = 'mysql'
256 if self.context_complete(ctxt): 261 if self.context_complete(ctxt):
257 db_ssl(rdata, ctxt, self.ssl_dir) 262 db_ssl(rdata, ctxt, self.ssl_dir)
258 return ctxt 263 return ctxt