[Bug 2080393] Re: Package python3-neutron-vpnaas 24.0.1 is missing DB migrations
James Page
2080393 at bugs.launchpad.net
Wed Sep 18 14:29:15 UTC 2024
** Changed in: cloud-archive
Status: Triaged => Fix Committed
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron-vpnaas in Ubuntu.
https://bugs.launchpad.net/bugs/2080393
Title:
Package python3-neutron-vpnaas 24.0.1 is missing DB migrations
Status in Ubuntu Cloud Archive:
Fix Committed
Status in Ubuntu Cloud Archive caracal series:
Triaged
Status in Ubuntu Cloud Archive dalmation series:
Fix Committed
Status in neutron-vpnaas package in Ubuntu:
Fix Released
Status in neutron-vpnaas source package in Noble:
Triaged
Status in neutron-vpnaas source package in Oracular:
Fix Released
Bug description:
We run Openstack Caracal on Ubuntu 22.04 and install the packages via
the cloud archive.
The package "python3-neutron-vpnaas" with version 24.0.1 does not
contain the necessary database migration files to setup the MYSQL
database correctly, which causes an error in the neutron-server
service.
2024-09-11 15:28:40.339 1287225 CRITICAL neutron [None req-d756302c-6093-4b7c-88c1-5398c35a5ebb - - - - - -] Unhandled error: sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError
) (1054, "Unknown column 'vpnservices.project_id' in 'field list'")
[SQL: SELECT vpnservices.project_id AS vpnservices_project_id, vpnservices.id AS vpnservices_id, vpnservices.name AS vpnservices_name, vpnservices.description AS vpnservices_description, v
pnservices.status AS vpnservices_status, vpnservices.admin_state_up AS vpnservices_admin_state_up, vpnservices.external_v4_ip AS vpnservices_external_v4_ip, vpnservices.external_v6_ip AS v
pnservices_external_v6_ip, vpnservices.subnet_id AS vpnservices_subnet_id, vpnservices.router_id AS vpnservices_router_id, vpnservices.flavor_id AS vpnservices_flavor_id
FROM vpnservices]
The vpnservices table still has the inital schema and is missing the
necessary migrations:
MariaDB [neutron]> DESCRIBE vpnservices;
+----------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| tenant_id | varchar(255) | YES | | NULL | |
| id | varchar(36) | NO | PRI | NULL | |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| status | varchar(16) | NO | | NULL | |
| admin_state_up | tinyint(1) | NO | | NULL | |
| subnet_id | varchar(36) | NO | MUL | NULL | |
| router_id | varchar(36) | NO | MUL | NULL | |
+----------------+--------------+------+-----+---------+-------+
This should be fixable with "neutron-db-manage --subproject neutron-
vpnaas upgrade head", but this command does not update the database.
When inspecting the directory that should contain the migration
scripts, we can see that they are missing (note the absence of the
"versions" folder).
root at dev-az1-ctrl-01:~ 15:31:09 # ll /usr/lib/python3/dist-packages/neutron_vpnaas/db/migration/alembic_migrations/
total 20
drwxr-xr-x 3 root root 4096 Sep 11 13:56 ./
drwxr-xr-x 4 root root 4096 Sep 11 13:56 ../
-rw-r--r-- 1 root root 2536 Apr 3 13:51 env.py
-rw-r--r-- 1 root root 654 Apr 3 13:51 __init__.py
I could reproduce the issue by manually building the package via the
following commands:
apt source python3-neutron-vpnaas
apt build-dep python3-neutron
cd neutron-vpnaas-24.0.1/
debuild -us -uc
The output of that build also doesn't contain the database migration scripts, indicating some sort of error during the package build process.
The package for the Bobcat release works fine (23.0.0).
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/2080393/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list