aboutsummaryrefslogtreecommitdiffstats
path: root/tools/yaml-validate.py
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-02-09 11:14:03 +0100
committerMichele Baldessari <michele@acksyn.org>2017-02-17 17:22:42 +0100
commit90431683b5927abb066d7964d513828b5488001c (patch)
tree9de308330e92bcd3fe13a237a5713967331f6162 /tools/yaml-validate.py
parentfcda1872cf51df0325680edb6e7f2c9dcfaa3c2c (diff)
Make the DB URIs host-independent for all services
When fixing LP#1643487 we added ?bind_address to all DB URIs. Since this clashes with Cellsv2 due to the URIs becoming host dependent, we need a new approach to pass bind_address to pymysql that leaves the DB URIs host-independent. In change Iff8bd2d9ee85f7bb1445aa2e1b3cfbff1f397b18 we first create a /etc/my.cnf.d/tripleo.cnf file with a [tripleo] section with the correct bind-address option. In this change we make sure that the DB URIs will point to the added file and to the specific section containing the necessary bind-address option. We do introduce a new MySQLClient profile which will hold all this more client-specific configuration so that this change can fit better in the composable roles work. Also, in the future it might contain the necessary configuration for SSL for example. Note that in case the /etc/my.cnf.d/tripleo.cnf file does not exist (because it is created via the mysqlclient profile), things keep on working as usual and the bind-address option simply won't be set, which has no impact on hosts where there are no VIPs. Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com> Change-Id: Ieac33efe38f32e949fd89545eb1cd8e0fe114a12 Related-Bug: #1643487 Closes-Bug: #1663181 Closes-Bug: #1664524 Depends-On: Iff8bd2d9ee85f7bb1445aa2e1b3cfbff1f397b18
Diffstat (limited to 'tools/yaml-validate.py')
-rwxr-xr-xtools/yaml-validate.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py
index 0eacbc60..1d0dba02 100755
--- a/tools/yaml-validate.py
+++ b/tools/yaml-validate.py
@@ -62,14 +62,12 @@ def validate_mysql_connection(settings):
return items == ['EndpointMap', 'MysqlInternal', 'protocol']
def client_bind_address(item):
- return 'bind_address' in item
+ return 'read_default_file' in item and \
+ 'read_default_group' in item
def validate_mysql_uri(key, items):
# Only consider a connection if it targets mysql
- # TODO(owalsh): skip nova mysql uris,temporary workaround for
- # tripleo/+bug/1662344
- if not key.startswith('nova') and \
- key.endswith('connection') and \
+ if key.endswith('connection') and \
search(items, mysql_protocol, no_op):
# Assume the "bind_address" option is one of
# the token that made up the uri