folsom_initial db migration does not create quotas table

Bug #1277379 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Ann Taraday

Bug Description

When using the master branch (now Icehouse),
folsom_initial db migration does not create quotas table
for a plugin which had db quota support (quota-ext).

It is because neutron/db/migration/alembic_migrations/env.py checks quota_db config option, but DB_QUOTA_DRIVER was moved in Grizzly cycle. As a result the check in env.py always returns False and quotas table is not created.
It affects OVS, Linuxbridge, ML2 and NVP plugins.

It causes potential db migration failure when the migration changes quotas table (like https://review.openstack.org/#/c/71521/ ).

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I think there are several options to fix this:

(a) Remove db_driver config check from db/migration/alembic_migrations/env.py
(b) Change QUOTA_DB_DRIVER in db/migration/alembic_migrations/env.py to the current path

I prefer to option (a).

The following is a discussion.

- For new deployment, either option works.
- For running system (including trunk chaser) with quota db driver: both works. quotas table already exists and future migrations related to quotas table works.
- For running system (including trunk chaser) with config quota driver:
-- option (a) future migraiton scripts related quotas table fails because there is no quotas table.
-- option (b) future migraiton scripts related quotas table may fails if future migration scripts do not take care of config options.

My question is whether we should consider config option in db migration scripts.
IMO it is better db migration scripts do not depend on config parameters, i.e., I prefer to option (a).

Revision history for this message
Akihiro Motoki (amotoki) wrote :

It is a blocker of https://review.openstack.org/#/c/40296/.
Now am sorting out the sitaution.

tags: added: cisco
Changed in neutron:
assignee: nobody → Akihiro Motoki (amotoki)
importance: Undecided → Medium
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This issue is raised again in https://review.openstack.org/#/c/40296/.

I re-investigated the situations.

Releases we need to take care of:
- Icehouse (initial deployment)
- Grizzly/Havana/trunk chaser (already deployed)

A case of initial deployment:
In this case, what we need to do is to ensure quotas table is created
regardless of quota driver configuraiton.

A case of deployed environment:
We can assume quotas table already exists if one of plugins with quotas extensions support are enabled.
They are created by db schema auto-generation even if config quota driver is used.
Thus we don't need to consider a case where no qutoas table exists.

My conclusion is:
- to remove quotas driver configuration dependency in folsom_initial, and
- to update quotas db driver path in folsom_initial

By doing so, we can ensure quotas table for plugins with quotas extension.

Changed in neutron:
assignee: Akihiro Motoki (amotoki) → Henry Gessau (gessau)
status: New → In Progress
Changed in neutron:
assignee: Henry Gessau (gessau) → Akihiro Motoki (amotoki)
Changed in neutron:
assignee: Akihiro Motoki (amotoki) → Henry Gessau (gessau)
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

I think maybe the patch for this bug was not linked?

Changed in neutron:
assignee: Henry Gessau (gessau) → Ann Kamyshnikova (akamyshnikova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/96438
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5c3293f9f65912d904df56d9a3c449150af7fcdb
Submitter: Jenkins
Branch: master

commit 5c3293f9f65912d904df56d9a3c449150af7fcdb
Author: Ann Kamyshnikova <email address hidden>
Date: Wed May 28 12:38:35 2014 +0400

    Database healing migration

    Add script that will add all tables for all plugins and make db schema
    unconditional.

    partially implement bp: db-migration-refactor

    Closes-bug: #1277379
    Closes-bug: #1304741
    Closes-bug: #1298456
    Closes-bug: #1298461
    Closes-bug: #1239974
    Closes-bug: #1336177
    Closes-bug: #1337185

    Change-Id: Ie49088a74bc5a87466f46989ce14d935e27567d1

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → juno-2
status: Fix Committed → Fix Released
Revision history for this message
Abhishek Raut (abhraut) wrote :

This bug was fixed with bug 1207402 in master branch for Juno release. I dont see that patch being back ported to stable/icehouse branch. Is there a backport strategy or should we open a bug against stable/icehouse branch just to create quota tables with folsom_initial?

Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.