Command "manila-manage db downgrade" without arguments fails

Bug #1409770 reported by Igor Malinovskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Low
Igor Malinovskiy

Bug Description

Command "manila-manage db downgrade" without arguments tries to downgrade db to empty migration, but this is prohibited by base (manila_init) migration:

$ manila-manage db downgrade

2015-01-09 18:37:21.395 DEBUG manila.utils [-] backend <module 'manila.db.migrations.alembic.migration' from '/opt/stack/manila/manila/db/migrations/alembic/migration.pyc'> from (pid=25824) __get_backend /opt/stack/manila/manila/utils.py:184
2015-01-09 18:37:21.416 DEBUG oslo.db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION from (pid=25824) _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo/db/sqlalchemy/session.py:509
2015-01-09 18:37:21.418 INFO alembic.migration [-] Context impl MySQLImpl.
2015-01-09 18:37:21.418 INFO alembic.migration [-] Will assume non-transactional DDL.
2015-01-09 18:37:21.421 INFO alembic.migration [-] Running downgrade 42c559fa14c5 -> 162a3e673105, add is_deletable field to share_servers table
2015-01-09 18:37:21.537 DEBUG alembic.migration [-] update 42c559fa14c5 to 162a3e673105 from (pid=25824) update_to_step /usr/local/lib/python2.7/dist-packages/alembic/migration.py:493
2015-01-09 18:37:21.546 INFO alembic.migration [-] Running downgrade 162a3e673105 -> , manila_init
2015-01-09 18:37:21.547 CRITICAL manila [-] NotImplementedError: Downgrade from initial Manila install is not supported.

Changed in manila:
assignee: nobody → Igor Malinovskiy (imalinovskiy)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: New → In Progress
Changed in manila:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/146807
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=98faeb138d96157be608b7681ec8c3944c6c46e7
Submitter: Jenkins
Branch: master

commit 98faeb138d96157be608b7681ec8c3944c6c46e7
Author: Igor Malinovskiy <email address hidden>
Date: Tue Jan 20 13:17:50 2015 +0200

    Change default migration in "manila-manage db downgrade" command

    Currently command "manila-manage db downgrade" without arguments
    tries to downgrade db to empty migration, but this is prohibited
    by base (manila_init) migration.

    Set manila_init(162a3e673105) as default migration in downgrade
    command.

    Change-Id: Ia0ccb708a3afa93df68cef6facc4c90b7c088435
    Closes-Bug: #1409770

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: kilo-2 → 2015.1.0
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.