Package python3-neutron-vpnaas 24.0.1 is missing DB migrations

Bug #2080393 reported by Simon Hensel
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
High
Unassigned
Caracal
Triaged
High
Unassigned
Dalmatian
Fix Released
High
Unassigned
neutron-vpnaas (Ubuntu)
Fix Released
High
Unassigned
Noble
Triaged
High
Unassigned
Oracular
Fix Released
High
Unassigned

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@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).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in neutron-vpnaas (Ubuntu):
status: New → Confirmed
James Page (james-page)
Changed in neutron-vpnaas (Ubuntu Noble):
status: New → Triaged
Changed in neutron-vpnaas (Ubuntu Oracular):
status: Confirmed → Triaged
Changed in neutron-vpnaas (Ubuntu Noble):
importance: Undecided → High
Changed in neutron-vpnaas (Ubuntu Oracular):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron-vpnaas - 2:24.0.1+git2024080809.f2fcd458-0ubuntu2

---------------
neutron-vpnaas (2:24.0.1+git2024080809.f2fcd458-0ubuntu2) oracular; urgency=medium

  * d/p/install-missing-files.patch: Ensure database migrations are
    installed as part of the binary package (LP: #2080393).

 -- James Page <email address hidden> Thu, 12 Sep 2024 08:14:52 +0100

Changed in neutron-vpnaas (Ubuntu Oracular):
status: Triaged → Fix Released
Simon Hensel (shensel)
Changed in neutron-vpnaas (Ubuntu Oracular):
status: Fix Released → Confirmed
status: Confirmed → Fix Released
Revision history for this message
Simon Hensel (shensel) wrote :

To add to this, the "python3-neutron-dynamic-routing" package is also missing the necessary DB migration files, most likely due to the same error.

James Page (james-page)
Changed in cloud-archive:
status: Triaged → Fix Committed
Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package neutron-vpnaas - 2:24.0.1+git2024080809.f2fcd458-0ubuntu2~cloud0
---------------

 neutron-vpnaas (2:24.0.1+git2024080809.f2fcd458-0ubuntu2~cloud0) noble-dalmatian; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 neutron-vpnaas (2:24.0.1+git2024080809.f2fcd458-0ubuntu2) oracular; urgency=medium
 .
   * d/p/install-missing-files.patch: Ensure database migrations are
     installed as part of the binary package (LP: #2080393).

Changed in cloud-archive:
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.