read_timeout not supported by pymysql causes deployment failures

Bug #1526938 reported by Alex Schultz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alex Schultz

Bug Description

Currently we have a read_timeout=## added to our connection string settings[0] within fuel library.

Unfortunately pymysql does not support this option[1] which results in a stack trace & failure if the configuration has the read_timeout defined and pymysql is used.

Currently the UCA packages use pymsql instead of python-mysqldb as used by the MOS packages. We need to only provide the read_timeouts if supported by the python package being used.

[0] https://github.com/openstack/fuel-library/search?p=2&q=read_timeout&utf8=%E2%9C%93
[1] https://github.com/PyMySQL/PyMySQL/issues/393

Revision history for this message
Alex Schultz (alex-schultz) wrote :
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

@Alex, keep in mind that this option is not explicitly supported in oslo.db, but it is in sqlalchemy. I think we should file an upstream bug to pymysql for the regression (since it's a rewrite of python-mysqldb). Without the read_timeout variable, it will take I belive around 120s for connections to timeout, which is less than ideal.

Revision history for this message
Alex Schultz (alex-schultz) wrote :

So it's an open issue with pymysql, but I believe we need make it configurable for us until it is resolved in pymysql. I think debian package use python-mysqldb where as ubuntu uses python-pymsql so it should be easy to key off of the os_package_type fact as a work around until it is resolved by pymysql.

Ilya Kutukov (ikutukov)
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/259190

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Alex Schultz (alex-schultz)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/259214

Changed in fuel:
assignee: Alex Schultz (alex-schultz) → Andrey Shestakov (ashestakov)
Changed in fuel:
importance: Medium → High
Changed in fuel:
assignee: Andrey Shestakov (ashestakov) → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-library (master)

Change abandoned by Alex Schultz (<email address hidden>) on branch: master
Review: https://review.openstack.org/259214
Reason: rolled this change into the parent

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/262590
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=985d1731db7b21d15b3142638d0188347cafb88c
Submitter: Jenkins
Branch: master

commit 985d1731db7b21d15b3142638d0188347cafb88c
Author: Alex Schultz <email address hidden>
Date: Wed Dec 30 12:02:43 2015 -0700

    Update openstacklib for os_database_connection

    This change is to update the openstacklib module to a version that has
    the updates os_database_connection function that supports extra params
    for connection strings.

    Change-Id: I0f473fbfeaf39aa6418fa18858d397802e17b307
    Related-Bug: #1526938

tags: added: team-enhancements
Changed in fuel:
assignee: Alex Schultz (alex-schultz) → Matthew Mosesohn (raytrac3r)
Changed in fuel:
assignee: Matthew Mosesohn (raytrac3r) → Ivan Berezovskiy (iberezovskiy)
Changed in fuel:
assignee: Ivan Berezovskiy (iberezovskiy) → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/259190
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=739a5a611cdfaa7e6d22d42f38339d2ea3796ea5
Submitter: Jenkins
Branch: master

commit 739a5a611cdfaa7e6d22d42f38339d2ea3796ea5
Author: Alex Schultz <email address hidden>
Date: Thu Dec 17 14:38:47 2015 -0700

    Update connection string generation

    This change leverages the os_database_connection function from
    openstacklib to generate the connection strings for our services. As
    part of this change, we are moving the database connection string
    generation to the osnailyfacter modular tasks and updating the
    openstack classes to consume a connection string rather than the
    seperate host, user, password, database name and database type.

    Additionally as part of this change, we are updating the mysql
    connection strings to only include read_time=60 if debian based packages
    are used. This is due to the fact that python-pymysql, which is used by
    Ubuntu packages, does not support the read_timeout option as part of the
    connection string.

    Change-Id: I45c51a05ba7cf9648b0202cc3c2216d185bd7eda
    Closes-Bug: #1526938
    Related-Blueprint: deploy-with-uca-packages

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.