Volume manager extension, cannot run migrations for extension, without running core's migrations

Bug #1477020 reported by Evgeniy L
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Evgeniy L

Bug Description

Steps to reproduce:
1. clean up the database "manage.py dropdb"
2. start migrations for extensions only "manage.py extensions upgrade head"

Actual result:

  File "/home/eli/job/env_nailgun/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1159, in _handle_dbapi_exception
    exc_info
  File "/home/eli/job/env_nailgun/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/eli/job/env_nailgun/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
    context)
  File "/home/eli/job/env_nailgun/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) relation "extensions_migration_buffer" does not exist
LINE 1: SELECT id, data FROM extensions_migration_buffer WHERE exten...
                             ^
 'SELECT id, data FROM extensions_migration_buffer WHERE extension_name=%(extension_name)s' {'extension_name': 'volume_manager'}

Expected result:
Migration passed successfully.

Version:
  master 684f254 Move volume manager specific validators into extension

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/204584
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=c260a23091dca97822bf72d188910d0c3b3cb73d
Submitter: Jenkins
Branch: master

commit c260a23091dca97822bf72d188910d0c3b3cb73d
Author: Evgeniy L <email address hidden>
Date: Wed Jul 22 15:35:40 2015 +0300

    Migrations for extensions should not depend on Core's db schema

    There should be a way to use and test extensions when
    there is no core database schema.

    * perform data migration from the core only when there
      is buffer table
    * add basic tests which are run separately from core's
      tests

    Change-Id: Ide0d2e619913675ff4fff3febc9707bec3bfb112
    Closes-bug: #1477020

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Maksym Strukov (unbelll) wrote :
Download full text (3.5 KiB)

[root@nailgun ~]# supervisorctl stop all
oswl_tenant_collectord: stopped
oswl_flavor_collectord: stopped
nailgun: stopped
statsenderd: stopped
oswl_image_collectord: stopped
receiverd: stopped
assassind: stopped
oswl_volume_collectord: stopped
oswl_keystone_user_collectord: stopped
oswl_vm_collectord: stopped
[root@nailgun ~]# manage.py dropdb
2015-10-20 16:38:47.826 DEBUG [7fe812013700] (settings) Looking for settings.yaml package config using old style __file__
2015-10-20 16:38:47.826 DEBUG [7fe812013700] (settings) Trying to read config file /usr/lib/python2.6/site-packages/nailgun/settings.yaml
2015-10-20 16:38:47.934 DEBUG [7fe812013700] (settings) Trying to read config file /etc/nailgun/settings.yaml
2015-10-20 16:38:47.944 DEBUG [7fe812013700] (settings) Trying to read config file /etc/fuel/version.yaml
2015-10-20 16:38:47.981 INFO [7fe812013700] (manage) Dropping database...
2015-10-20 16:38:48.343 INFO [7fe812013700] (manage) Done
[root@nailgun ~]# manage.py extensions upgrade head
2015-10-20 16:38:57.552 DEBUG [7ff004840700] (settings) Looking for settings.yaml package config using old style __file__
2015-10-20 16:38:57.552 DEBUG [7ff004840700] (settings) Trying to read config file /usr/lib/python2.6/site-packages/nailgun/settings.yaml
2015-10-20 16:38:57.660 DEBUG [7ff004840700] (settings) Trying to read config file /etc/nailgun/settings.yaml
2015-10-20 16:38:57.669 DEBUG [7ff004840700] (settings) Trying to read config file /etc/fuel/version.yaml
2015-10-20 16:38:58.838 INFO [7ff004840700] (manage) Running command for extension volume_manager-1.0.0
INFO [alembic.migration] Context impl PostgresqlImpl.
INFO [alembic.migration] Will assume transactional DDL.
INFO [alembic.migration] Running upgrade None -> 086cde3de7cf, volume_manager
WARNI [alembic.migration] Cannot find buffer table 'extensions_migration_buffer'. Don't run data migrations from buffer table, because extension might be installed and used separately from Nailgun core and its database
INFO [alembic.migration] Context impl PostgresqlImpl.
INFO [alembic.migration] Will assume transactional DDL.
INFO [alembic.migration] Running upgrade None -> 3b5d115d7e49, cluster_upgrade

Verified as fixed in 7.0-301

{"build_id": "301", "build_number": "301", "release_versions": {"2015.1.0-7.0": {"VERSION": {"build_id": "301", "build_number": "301", "api": "1.0", "fuel-library_sha": "5d50055aeca1dd0dc53b43825dc4c8f7780be9dd", "nailgun_sha": "4162b0c15adb425b37608c787944d1983f543aa8", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha": "d7027952870a35db8dc52f185bb1158cdd3d1ebd", "openstack_version": "2015.1.0-7.0", "fuel-agent_sha": "50e90af6e3d560e9085ff71d2950cfbcca91af67", "production": "docker", "python-fuelclient_sha": "486bde57cda1badb68f915f66c61b544108606f3", "astute_sha": "6c5b73f93e24cc781c809db9159927655ced5012", "fuel-ostf_sha": "2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c", "release": "7.0", "fuelmain_sha": "a65d453215edb0284a2e4761be7a156bb5627677"}}}, "auth_required": true, "api": "1.0", "fuel-library_sha": "5d50055aeca1dd0dc53b43825dc4c8f7780be9dd", "nailgun_sha": "4162b0c15adb425b37608c787944d1983f543aa8", "feature_groups": ["mirantis"], "fuel-nailgun-agent_sha...

Read more...

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