Browse Source

Sync charm-helpers

Change-Id: Ie7019f5ac71e3272dc2b3ea5feeef2dc0814900a
master
Corey Bryant 4 months ago
parent
commit
5753158299
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      hooks/charmhelpers/contrib/openstack/context.py

+ 5
- 0
hooks/charmhelpers/contrib/openstack/context.py View File

@@ -97,6 +97,7 @@ from charmhelpers.contrib.network.ip import (
97 97
 )
98 98
 from charmhelpers.contrib.openstack.utils import (
99 99
     config_flags_parser,
100
+    get_os_codename_install_source,
100 101
     enable_memcache,
101 102
     CompareOpenStackReleases,
102 103
     os_release,
@@ -240,6 +241,8 @@ class SharedDBContext(OSContextGenerator):
240 241
         else:
241 242
             rids = relation_ids(self.interfaces[0])
242 243
 
244
+        rel = (get_os_codename_install_source(config('openstack-origin')) or
245
+               'icehouse')
243 246
         for rid in rids:
244 247
             self.related = True
245 248
             for unit in related_units(rid):
@@ -253,6 +256,8 @@ class SharedDBContext(OSContextGenerator):
253 256
                     'database_password': rdata.get(password_setting),
254 257
                     'database_type': 'mysql+pymysql'
255 258
                 }
259
+                if CompareOpenStackReleases(rel) < 'stein':
260
+                    ctxt['database_type'] = 'mysql'
256 261
                 if self.context_complete(ctxt):
257 262
                     db_ssl(rdata, ctxt, self.ssl_dir)
258 263
                     return ctxt

Loading…
Cancel
Save