summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Bryant <corey.bryant@canonical.com>2019-01-11 14:36:00 +0000
committerCorey Bryant <corey.bryant@canonical.com>2019-01-11 14:36:05 +0000
commit57531582996f2bbf39df999608b581e14baf62e4 (patch)
treeecb80b99cfc22e657ff3ad318a15b5192502907f
parente3f280851fcfbbcc9925214cc8241c14658bfda2 (diff)
Sync charm-helpers
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:35:03 +0000 Reviewed-on: https://review.openstack.org/630256 Project: openstack/charm-cinder-backup Branch: refs/heads/master
-rw-r--r--hooks/charmhelpers/contrib/openstack/context.py5
1 files changed, 5 insertions, 0 deletions
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