Make containerized galera use mysql_network everywhere
authorDamien Ciabrini <dciabrin@redhat.com>
Tue, 26 Sep 2017 13:23:11 +0000 (15:23 +0200)
committerDamien Ciabrini <dciabrin@redhat.com>
Sat, 7 Oct 2017 16:07:09 +0000 (16:07 +0000)
The containerized galera service generates a galera.cnf which uses
short hostname to identify itself rather than the fqdn from the
mysql_network (e.g. overcloud-x.internalapi.cloudname).

This breaks when internal TLS is in use, because the mysql certificate
does not reference this short hostname.

Fix the appropriate hiera parameter to make it behave like the
non-containerized galera service.

Change-Id: I904cde38f2baeddab5178e8ad48d34a0c73629af
Closes-Bug: #1719599
(cherry picked from commit e10aa591dc9155a2746df01279c4ba4f2133fd17)

docker/services/pacemaker/database/mysql.yaml

index 9dace27..e856208 100644 (file)
@@ -97,6 +97,12 @@ outputs:
                   - 4567
                   - 4568
                   - 9200
+            tripleo::profile::pacemaker::database::mysql_bundle::bind_address:
+              str_replace:
+                template:
+                  "%{hiera('fqdn_$NETWORK')}"
+                params:
+                  $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
           -
             if:
             - internal_tls_enabled