[All][Neutron] Migrate old DB migration versions to init ops
Lajos Katona
katonalala at gmail.com
Tue Jun 30 12:00:18 UTC 2020
Hi,
Simplification sounds good (I do not take into considerations like "no code
fanatic movements" or similar).
How this could affect upgrade, I am sure there are deployments older than
pike, and those at a point will
got for some newer version (I hope we can give them good answers for their
problems as Openstack)
What do you think about stadium projects? As those have much less activity
(as mostly solve one rather specific problem),
and much less migration scripts shall we just "merge" those to init ops?
I checked quickly a few stadium project and only bgpvpn has newer migration
scripts than pike.
Regards
Lajos
Rodolfo Alonso Hernandez <ralonsoh at redhat.com> ezt írta (időpont: 2020.
jún. 24., Sze, 15:25):
> Hello all:
>
> Along this years we have increased the number of DB migrations each time
> we needed a new DB schema. This is good because that means the project is
> evolving and adding new features.
>
> Although this is not a problem per se, there are some inconvenients:
> - Every time a system is deployed (for example in the CI using devstack),
> the initial DB schema is created. Then, each migration is applied
> sequentially.
> - Some FT tests are still checking the sanity of some migrations [1]
> implemented a few releases ago.
> - We are still testing the contract DB migrations. Of course, this is
> something supported before and we still need to apply those revisions.
> - "TestWalkMigrationsMysql" and "TestModelsMigrationsMysql", both using
> MySQL backend, are still affected by LP#1687027.
>
> The proposal is to remove some DB migrations, starting from Liberty; of
> course, because all migrations must be applied in a specific order, we
> should begin from the initial revision, "kilo". The latest migration to be
> removed should be decided depending on the stable releases support.
>
> Apart from mitigating or solving some of the commented problems, we can
> "group" the DB model definition in one place. E.g.: "subnetpools" table is
> created in "other_extensions_init_ops". This file contains the first table.
> However is modified in at least two migrations:
> - 1b4c6e320f79_address_scope_support_in_subnetpool: added
> "address_scope_id" field
> - 13cfb89f881a_add_is_default_to_subnetpool: added "is_default" field
>
> Instead of having (at least) three places where the "subnetpools" DB
> schema is defined, we can remove the Mitaka migration and group this
> definition in just one place.
>
> One possible issue: some migrations add dependencies on other tables. That
> means the table the dependency is referring should be created in advance.
> That implies that, in some cases, the table creation order should be
> modified. That should never affect subsequent created tables or migrations.
>
> Do you see any inconvenience on this proposal? Am I missing something that
> I didn't consider?
>
> Thank you and regards.
>
> [1]
> https://github.com/openstack/neutron/blob/9fd60ffaac6b178de62dab169c826d52f7bfbb2d/neutron/tests/functional/db/test_migrations.py
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200630/3d8153d2/attachment.html>
More information about the openstack-discuss
mailing list