Liberty install guide RHEL, keystone DB population unsuccessful: Module pymysql not found

Bug #1501991 reported by Bernd Bausch
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
High
Matt Kassawara

Bug Description

When trying to populate the keystone DB, the database is not populated, as evidenced by var/log/keystone/keystone.log:

2015-10-02 11:00:27.901 10021 CRITICAL keystone [-] ImportError: No module named pymysql
2015-10-02 11:00:27.901 10021 ERROR keystone Traceback (most recent call last):
..... more stacktrace ....

(full log attached).

The Centos and RDO repos don't seem to have a pymysql package.

To run keystone-manage successfully, I see two options:
- pip install pymysql
- in keystone.conf, remove pymysql from the DB connection string
Both work in my environment.

-----------------------------------
Release: 0.1 on 2015-10-01 18:26
SHA: dd2f1cc5821def46021536f17f46f01ac7e290e7
Source: http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-guide/source/keystone-install.rst
URL: http://docs.openstack.org/draft/install-guide-rdo/keystone-install.html

Revision history for this message
Bernd Bausch (berndbausch) wrote :
description: updated
description: updated
Changed in openstack-manuals:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Matt Kassawara (ionosphere80) wrote :

What package did you try to install? I think the name is 'python-PyMySQL' on RH-style distributions.

Revision history for this message
Bernd Bausch (berndbausch) wrote :

Matt: I don't find pymysql -

[root@libcontrol ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.jaist.ac.jp
 * epel: ftp.iij.ad.jp
 * epel-testing: ftp.iij.ad.jp
 * extras: ftp.jaist.ac.jp
 * updates: ftp.jaist.ac.jp
repo id repo name status
!base/7/x86_64 CentOS-7 - Base 8,652
!delorean delorean-openstack-tripleo-heat-templates-1a336269c8b07b5d2cbf6c15cdd3a8b302421c45 384
!delorean-common-testing/x86_64 delorean-common-testing 489
!delorean-liberty-testing/x86_64 delorean-liberty-testing 31
!epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 8,536
!epel-testing/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 937
!extras/7/x86_64 CentOS-7 - Extras 214
!updates/7/x86_64 CentOS-7 - Updates 1,501
repolist: 20,744
[root@libcontrol ~]# yum list available |grep -i pymysql
[root@libcontrol ~]#

Shuquan Huang (shuquan)
Changed in openstack-manuals:
assignee: nobody → Shuquan Huang (shuquan)
Tom Fifield (fifieldt)
Changed in openstack-manuals:
importance: Medium → High
Revision history for this message
Matt Kassawara (ionosphere80) wrote :

So, in summary... Fedora includes this package, but RHEL and CentOS do not include it?

Revision history for this message
Bernd Bausch (berndbausch) wrote :

I didn't find any trace of pymysql in Centos. I can't check RedHat but it's unlikely that RedHat has it and Centos doesn't. I didn't test Fedora either.

Revision history for this message
Matt Kassawara (ionosphere80) wrote :

Upstream issue, not a documentation issue... but we can track it here.

Revision history for this message
Stephen Gordon (sgordon) wrote :

The package python-mysql switched upstreams and is now based on pyMySQL:

https://www.redhat.com/archives/rdo-list/2015-October/msg00004.html

That is to say, the correct package name is python-mysql.

Revision history for this message
Brian Moss (bmoss) wrote :

This bug still exists using http://rdo.fedorapeople.org/openstack-liberty/rdo-release-liberty.rpm.

It looks like the package change will take place for Mitaka. For Liberty, I think changing the DB connection string is the easiest workaround currently.

Revision history for this message
Shuquan Huang (shuquan) wrote :

Should I add the package 'python-mysql' to keystone installation?
Is it a documentation issue or not??

Revision history for this message
Matt Kassawara (ionosphere80) wrote :

Still not sure what to do here. The 'python-mysql' package does not provide the correct library, so we either need to change all DB connection entries for RHEL/CentOS or decide against publishing the RHEL/CentOS guide until the packages comply with upstream requirements.

Revision history for this message
Bernd Bausch (berndbausch) wrote :

To me, adapting the database connection string in keystone.conf seems a good solution. If this is the only issue that remains with Red Hat.

Changed in openstack-manuals:
assignee: Shuquan Huang (shuquan) → nobody
Changed in openstack-manuals:
status: Confirmed → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

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

Changed in openstack-manuals:
assignee: nobody → Matt Kassawara (ionosphere80)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-manuals (master)

Change abandoned by Matthew Kassawara (<email address hidden>) on branch: master
Review: https://review.openstack.org/240315
Reason: Git broken.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/240318
Committed: https://git.openstack.org/cgit/openstack/openstack-manuals/commit/?id=271d907b08316958a0aace86ea75e2cf95fda454
Submitter: Jenkins
Branch: master

commit 271d907b08316958a0aace86ea75e2cf95fda454
Author: Matthew Kassawara <email address hidden>
Date: Thu Oct 29 14:12:43 2015 -0600

    [install] Workaround for RDO lacking PyMySQL

    Upstream uses the PyMySQL library in Liberty, but RDO
    does not provide a package for it. Installations using
    RDO packages must revert to the python-MySQL library
    for any service that uses an SQL database which requires
    changing the database connection string from
    'mysql+pymysql://' to 'mysql://'.

    As a workaround, this patch adds conditionals for each
    SQL database connection string. After merging, we can
    publish the RDO version of the installation guide.

    Change-Id: If2423fcfbc08d028d35731aee2896a5bd45c2fb4
    Implements: bp installguide-liberty
    Closes-Bug: #1501991

Changed in openstack-manuals:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-manuals 15.0.0

This issue was fixed in the openstack/openstack-manuals 15.0.0 release.

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.