Incorrect dependency at Stein

Bug #1823729 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Base Layer
Fix Released
Critical
Frode Nordahl
charms.openstack
Invalid
Critical
Frode Nordahl
octavia (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

# sudo octavia-db-manage upgrade head
2019-04-08 13:57:50.232 23647 CRITICAL octavia-db-manage [-] Unhandled error: ModuleNotFoundError: No module named 'MySQLdb'
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage Traceback (most recent call last):
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/bin/octavia-db-manage", line 10, in <module>
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage sys.exit(main())
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/octavia/db/migration/cli.py", line 138, in main
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage CONF.command.func(config, CONF.command.name)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/octavia/db/migration/cli.py", line 68, in do_upgrade
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage do_alembic_command(config, cmd, revision, sql=CONF.command.sql)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/octavia/db/migration/cli.py", line 36, in do_alembic_command
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage getattr(alembic_cmd, cmd)(config, *args, **kwargs)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/alembic/command.py", line 254, in upgrade
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage script.run_env()
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/alembic/script/base.py", line 427, in run_env
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage util.load_python_file(self.dir, 'env.py')
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/alembic/util/pyfiles.py", line 81, in load_python_file
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage module = load_module_py(module_id, path)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/alembic/util/compat.py", line 82, in load_module_py
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage spec.loader.exec_module(module)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "<frozen importlib._bootstrap_external>", line 678, in exec_module
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/octavia/db/migration/alembic_migrations/env.py", line 88, in <module>
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage run_migrations_online()
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/octavia/db/migration/alembic_migrations/env.py", line 72, in run_migrations_online
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage poolclass=pool.NullPool)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/sqlalchemy/engine/__init__.py", line 425, in create_engine
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage return strategy.create(*args, **kwargs)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py", line 81, in create
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage dbapi = dialect_cls.dbapi(**dbapi_args)
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage File "/usr/lib/python3/dist-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 102, in dbapi
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage return __import__('MySQLdb')
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage ModuleNotFoundError: No module named 'MySQLdb'
2019-04-08 13:57:50.232 23647 ERROR octavia-db-manage

Installing ``python3-mysqldb`` resolves the issue.

# apt show python3-octavia
# apt show python3-octavia
Package: python3-octavia
Version: 4.0.0~rc1-0ubuntu1~cloud0
Priority: optional
Section: python
Source: octavia
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian OpenStack <email address hidden>
Installed-Size: 5,359 kB
Depends: alembic (>= 0.8.10), python3-alembic (>= 0.8.10), python3-babel (>= 2.3.4), python3-barbicanclient (>= 4.5.2), python3-castellan (>= 0.16.0), python3-cotyledon (>= 1.3.0), python3-cryptography (>= 2.1), python3-diskimage-builder (>= 1.1.2), python3-distro (>= 1.2.0), python3-flask (>= 0.10), python3-futurist (>= 1.2.0), python3-glanceclient (>= 1:2.8.0), python3-gunicorn (>= 19.0.0), python3-jinja2 (>= 2.10), python3-jsonschema (>= 2.6.0), python3-keystoneauth1 (>= 3.4.0), python3-keystonemiddleware (>= 4.17.0), python3-netifaces (>= 0.10.4), python3-neutronclient (>= 1:6.7.0), python3-novaclient (>= 2:9.1.0), python3-octavia-lib (>= 1.1.1), python3-openssl (>= 17.1.0), python3-oslo.config (>= 1:5.2.0), python3-oslo.context (>= 1:2.19.2), python3-oslo.db (>= 4.27.0), python3-oslo.i18n (>= 3.15.3), python3-oslo.log (>= 3.36.0), python3-oslo.messaging (>= 5.29.0), python3-oslo.middleware (>= 3.31.0), python3-oslo.policy (>= 1.30.0), python3-oslo.reports (>= 1.18.0), python3-oslo.upgradecheck (>= 0.1.0), python3-oslo.utils (>= 3.33.0), python3-pecan (>= 1.0.0), python3-pyasn1 (>= 0.1.8), python3-pyasn1-modules (>= 0.0.6), python3-pymysql (>= 0.7.6), python3-pyroute2 (>= 0.4.21), python3-requests (>= 2.14.2), python3-rfc3986 (>= 0.3.1), python3-six (>= 1.10.0), python3-sqlalchemy (>= 1.0.10), python3-stevedore (>= 1:1.20.0), python3-taskflow (>= 2.16.0), python3-tenacity (>= 4.9.0), python3-webob (>= 1:1.7.1), python3-wsme (>= 0.8.0), python3-debtcollector, python3-oslo.serialization (>= 2.18.0), python3-pbr (>= 2.0.0), python3:any
Download-Size: 474 kB
APT-Manual-Installed: no
APT-Sources: http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein/main amd64 Packages
Description: OpenStack Load Balancer as a Service - Python libraries

Revision history for this message
Frode Nordahl (fnordahl) wrote :

It appears the issue here is that we have been carrying a patch in UCA that adds ``+pymysql`` to the connection string.

That has been removed in UCA @ Stein, so we would have to add this back.

The connection string comes from here [0] and variables come from [1] and [2].

We would also need to version fence this given UCA prior to Stein has the above mentioned patch.

0: https://github.com/openstack/charm-layer-openstack/blob/master/templates/parts/section-database
1: https://github.com/openstack/charm-interface-mysql-shared/blob/master/requires.py
2: https://github.com/openstack/charms.openstack/blob/e57acaacdbdf98813e905fecd07e69ce5c86378a/charms_openstack/adapters.py#L449

Changed in octavia (Ubuntu):
status: New → Invalid
Changed in charms.openstack:
status: New → Triaged
importance: Undecided → Critical
Frode Nordahl (fnordahl)
Changed in layer-openstack:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Frode Nordahl (fnordahl)
Changed in charms.openstack:
assignee: nobody → Frode Nordahl (fnordahl)
Frode Nordahl (fnordahl)
Changed in layer-openstack:
status: Triaged → In Progress
Changed in charms.openstack:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charms.openstack (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charms.openstack (master)

Change abandoned by Frode Nordahl (<email address hidden>) on branch: master
Review: https://review.openstack.org/650936
Reason: We decided to switch to using the uri property instead https://review.openstack.org/#/c/650937/

Frode Nordahl (fnordahl)
Changed in charms.openstack:
status: In Progress → Invalid
Frode Nordahl (fnordahl)
Changed in layer-openstack:
status: In Progress → 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.