Mistral config guide has wrong DB connection URL

Bug #1762720 reported by Hardik Jasani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Hardik Jasani

Bug Description

Mistral config guide instructs to install python-mysqldb driver for MySQL based databases. But, corresponding DB url conf has mysql+pymysql driver. This causes mistral-server process to crash as soon as it is launched.

$ pip install mysql-python

Configure connection in Mistral config:

[database]
connection = mysql+pymysql://<user>:<password>@<database-host>:3306/mistral

This page has several grammatical errors too.

Link: https://docs.openstack.org/mistral/latest/configuration/config-guide.html

-----

  16770 2018-04-10 17:25:59.852 14498 CRITICAL Mistral [-] Unhandled error: ImportError: No module named pymysql
  16771 2018-04-10 17:25:59.852 14498 ERROR Mistral Traceback (most recent call last):
  16772 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/cmd/launch.py", line 240, in <module>
  16773 2018-04-10 17:25:59.852 14498 ERROR Mistral sys.exit(main())
  16774 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/cmd/launch.py", line 212, in main
  16775 2018-04-10 17:25:59.852 14498 ERROR Mistral launch_any(set(cfg.CONF.server))
  16776 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/cmd/launch.py", line 109, in launch_any
  16777 2018-04-10 17:25:59.852 14498 ERROR Mistral LAUNCH_OPTIONS[option]()
  16778 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/cmd/launch.py", line 103, in launch_api
  16779 2018-04-10 17:25:59.852 14498 ERROR Mistral server = api_service.WSGIService('mistral_api')
  16780 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/api/service.py", line 29, in __init__
  16781 2018-04-10 17:25:59.852 14498 ERROR Mistral self.app = app.setup_app()
  16782 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/api/app.py", line 54, in setup_app
  16783 2018-04-10 17:25:59.852 14498 ERROR Mistral db_api_v2.setup_db()
  16784 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/db/v2/api.py", line 29, in setup_db
  16785 2018-04-10 17:25:59.852 14498 ERROR Mistral IMPL.setup_db()
  16786 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/db/v2/sqlalchemy/api.py", line 69, in setup_db
  16787 2018-04-10 17:25:59.852 14498 ERROR Mistral models.Workbook.metadata.create_all(b.get_engine())
  16788 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/db/sqlalchemy/base.py", line 78, in get_engine
  16789 2018-04-10 17:25:59.852 14498 ERROR Mistral return _get_facade().get_engine()
  16790 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/db/sqlalchemy/base.py", line 45, in _get_facade
  16791 2018-04-10 17:25:59.852 14498 ERROR Mistral **dict(cfg.CONF.database.items())
  16792 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 126 16792 1, in __init__
  16793 2018-04-10 17:25:59.852 14498 ERROR Mistral slave_connection=slave_connection)
  16794 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 495 16794 , in _start
  16795 2018-04-10 17:25:59.852 14498 ERROR Mistral engine_args, maker_args)
  16796 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 519 16796 , in _setup_for_connection
  16797 2018-04-10 17:25:59.852 14498 ERROR Mistral sql_connection=sql_connection, **engine_kwargs)
  16798 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/debtcollector/renames.py", line 43, in decora 16798 tor
  16799 2018-04-10 17:25:59.852 14498 ERROR Mistral return wrapped(*args, **kwargs)
  16800 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 178, in 16800 create_engine
  16801 2018-04-10 17:25:59.852 14498 ERROR Mistral engine = sqlalchemy.create_engine(url, **engine_args)
  16802 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/mistral/db/sqlalchemy/base.py", line 69, in _sqlalchemy_create_engine_wrapper
  16803 2018-04-10 17:25:59.852 14498 ERROR Mistral return _sqlalchemy_create_engine_orig(*args, **kwargs)
  16804 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/__init__.py", line 424, in 16804 create_engine
  16805 2018-04-10 17:25:59.852 14498 ERROR Mistral return strategy.create(*args, **kwargs)
  16806 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 81, in 16806 create
  16807 2018-04-10 17:25:59.852 14498 ERROR Mistral dbapi = dialect_cls.dbapi(**dbapi_args)
  16808 2018-04-10 17:25:59.852 14498 ERROR Mistral File "/home/cbuser/projects/mistral/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/pymysql.py", line 6 16808 2, in dbapi
  16809 2018-04-10 17:25:59.852 14498 ERROR Mistral return __import__('pymysql')
  16810 2018-04-10 17:25:59.852 14498 ERROR Mistral ImportError: No module named pymysql

Tags: docs
Hardik Jasani (hjasani)
Changed in mistral:
assignee: nobody → Hardik Jasani (hjasani)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

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

Dougal Matthews (d0ugal)
Changed in mistral:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/560015
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=e43cf4559a1065d2a11288b92b798b2f1981a1ef
Submitter: Zuul
Branch: master

commit e43cf4559a1065d2a11288b92b798b2f1981a1ef
Author: hardikj <email address hidden>
Date: Tue Apr 10 18:16:44 2018 +0530

    Fix DB connection url in config guide

    Change MySQL DB default driver to PyMySQL in
    config guide to align with Dockerfile.

    And some grammar fixes.

    Change-Id: Id4379c7c86e2f8b50341dcbd72f34af834f99261
    Closes-Bug: 1762720

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

This issue was fixed in the openstack/mistral 7.0.0.0b1 development milestone.

Dougal Matthews (d0ugal)
Changed in mistral:
milestone: none → rocky-1
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.