Comment 13 for bug 1717545

Revision history for this message
Damien Ciabrini (dciabrin) wrote : Re: python 2.7.5-50 breaks PyMySQL in TripleO CI

A quick summary of what we know and what we found so far.

Facts:
- The PyMySQL code has never read /etc/my.cnf because of what Michele said in comment #11.
- All the DB URI that we configure in tripleo are of the form:

   connection=mysql+pymysql://user:pass@IP/service?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf

So all CI jobs error out trying to parse /etc/my.cnf.. by looking at the PyMySQL code [1] it looks like PyMySQL is being passed only half of the options, namely only "read_default_group".
In that case, PyMySQL would use a default value of /etc/my.cnf as read_default_file. And the parsing would break as explained in comment #11.

PyMySQL's read_default_* are being initialized by overriding optional arguments of class Connection.

SQLAlchemy is in charge of passing those arguments to PyMYSQL, but SQLAlchemy itself has no knowledge of those value, it's just forwarding the key/values that's it's being passed by oslo.db, or whichever component parsed and validated the configuration file in the first place.

So our current guess is that something changed lately which makes the DB URI being incorrectly parsed/validated.

Still investigating the reasons why

[1] https://github.com/PyMySQL/PyMySQL/blob/master/pymysql/connections.py#L608-L612