Traceback thrown when applying migration downgrade and cluster is present

Bug #1434466 reported by Przemyslaw Kaminski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Andriy Popovych

Bug Description

Install fuel, create cluster then do

manage.py migrate downgrade -1

This results in traceback:

File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/alembic/operations.py", line 911, in execute
    execution_options=execution_options)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 79, in execute
    self._exec(sql, execution_options)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 76, in _exec
    conn.execute(construct, *multiparams, **params)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 841, in execute
    return meth(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 322, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 938, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1070, in _execute_context
    context)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1271, in _handle_dbapi_exception
    exc_info
  File "/home/vagrant/.virtualenvs/fuel/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/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1063, in _execute_context
    context)
  File "/home/vagrant/.virtualenvs/fuel/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 442, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.DataError: (DataError) invalid input value for enum _possible_changes: "vmware_attributes"
 'ALTER TABLE cluster_changes ALTER COLUMN name TYPE _possible_changes USING name::text::_possible_changes' {}

Tags: nailgun
Changed in fuel:
status: New → In Progress
assignee: Fuel Python Team (fuel-python) → Andriy Popovych (popovych-andrey)
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/166545

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

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

commit d56068fae5d24bcf09d68ad51a6fe57cab4e9e53
Author: Andriy Popovych <email address hidden>
Date: Sat Mar 21 21:11:57 2015 +0200

    Remove impossible records in downgrade migration

    After filling cluster_changes table with data and
    then downgrade it some values can become impossible
    due to changes in Enum list and cause errors

    Change-Id: I425a93298ad9aa0c5d4796e881da49dc7cce8420
    Closes-Bug: #1434466

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Olesia Tsvigun (otsvigun) wrote :

Verified at Fuel ISO#361

Ubuntu, Centos

Fuel version
api: '1.0'
astute_sha: 04ebab96d57b0e8acbf2d7f3ba05e4fbf31b741e
auth_required: true
build_id: 2015-04-29_07-55-19
build_number: '361'
feature_groups:
- mirantis
fuel-library_sha: 0e5b82d24853304befb22145ac4aaf3545d295e1
fuel-ostf_sha: b38602c841deaa03ddffc95c02f319360462cbe3
fuelmain_sha: ee112acfdd0f9017ef40be53e8e51bb5c429e97c
nailgun_sha: e660b1c09d7d4d07bdd48d424ce9aed3b6facd6e
openstack_version: 2014.2.2-6.1
production: docker
python-fuelclient_sha: 8cd6cf575d3c101dee1032abb6877dfa8487e077
release: '6.1'
release_versions:
  2014.2.2-6.1:
    VERSION:
      api: '1.0'
      astute_sha: 04ebab96d57b0e8acbf2d7f3ba05e4fbf31b741e
      build_id: 2015-04-29_07-55-19
      build_number: '361'
      feature_groups:
      - mirantis
      fuel-library_sha: 0e5b82d24853304befb22145ac4aaf3545d295e1
      fuel-ostf_sha: b38602c841deaa03ddffc95c02f319360462cbe3
      fuelmain_sha: ee112acfdd0f9017ef40be53e8e51bb5c429e97c
      nailgun_sha: e660b1c09d7d4d07bdd48d424ce9aed3b6facd6e
      openstack_version: 2014.2.2-6.1
      production: docker
      python-fuelclient_sha: 8cd6cf575d3c101dee1032abb6877dfa8487e077
      release: '6.1'

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.