Ask Your Question
0

Help with migration from juno to neutron database: 2 alembic_version row matching

asked 2016-01-01 19:40:14 -0500

don gravatar image

I have a juno vintage OpenStack installation. I am trying to upgrade neutron to liberty, and am running into an issue with the database migration. I'm wondering if someone can point me in the right direction.

Specifically, I am getting an error that "Online migration expected to match one row when updating... 2 found"

I'm not really sure where to look. Does anyone have some advice? This is on an offline copy I am testing (e.g. i did a mysqldump/restore for this test, so no agent is active on the db).

# neutron-db-manage current --verbose
No handlers could be found for logger "oslo_config.cfg"
  Running current for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Current revision(s) for mysql+pymysql://stack:XXXXX@db.sandvine.rocks/neutron?charset=utf8:
Rev: juno
Parent: <base>
Path: /usr/local/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/juno_initial.py

    juno_initial

    Revision ID: juno
    Revises: None
# neutron-db-manage current --verbose
No handlers could be found for logger "oslo_config.cfg"
  Running current for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Current revision(s) for mysql+pymysql://stack:XXXXX@db.sandvine.rocks/neutron?charset=utf8:
Rev: juno
Parent: <base>
Path: /usr/local/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/juno_initial.py

    juno_initial

    Revision ID: juno
    Revises: None

Rev: juno
Parent: <base>
Path: /usr/local/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/juno_initial.py

    juno_initial

    Revision ID: juno
    Revises: None

  OK


# neutron-db-manage upgrade heads
No handlers could be found for logger "oslo_config.cfg"
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Running upgrade for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 28c0ffb8ebbd -> 57086602ca0a, scrap_nsx_adv_svcs_models
ERROR [alembic.util.messaging] Online migration expected to match one row when updating '28c0ffb8ebbd' to '57086602ca0a' in 'alembic_version'; 2 found
  FAILED: Online migration expected to match one row when updating '28c0ffb8ebbd' to '57086602ca0a' in
  'alembic_version'; 2 found

# neutron-db-manage upgrade --expand
No handlers could be found for logger "oslo_config.cfg"
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Running upgrade (expand) for neutron ...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 57086602ca0a -> 38495dc99731, ml2_tunnel_endpoints_table
ERROR [alembic.util.messaging] Online migration expected to match one row when updating '57086602ca0a' to '38495dc99731' in 'alembic_version'; 2 found
  FAILED: Online migration expected to match one row when updating '57086602ca0a' to '38495dc99731' in
  'alembic_version'; 2 found


Rev: juno
Parent: <base>
Path: /usr/local/lib/python2.7/dist-packages/neutron/db/migration/alembic_migrations/versions/juno_initial.py

    juno_initial

    Revision ID: juno
    Revises: None

  OK


# neutron-db-manage upgrade heads
No handlers could be found for logger "oslo_config.cfg"
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
  Running upgrade for neutron ...
INFO ...
(more)
edit retag flag offensive close merge delete

Comments

OK, so 'select * from alembic_version' shows 2 rows, both juno. deleting one moves it further to the next problem.

don gravatar imagedon ( 2016-01-01 19:57:09 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-01-01 19:59:07 -0500

don gravatar image

OK, so 'select * from alembic_version' shows 2 rows, both juno. deleting one moves it further to the next problem. But this was the first problem.

ran "delete from alembic_version limit 1;" to remove one of them.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-01-01 19:40:14 -0500

Seen: 9,305 times

Last updated: Jan 01 '16