Migration #33 doesn't work well with SQLite

Bug #1431374 reported by Ivan Kolodyazhny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Anton Arefiev

Bug Description

I hope, nobody uses SQLite not for unit-tests only. It is reproducible with SQLite only.

    /home/e0ne/src/openstack/cinder/.venv/local/lib/python2.7/site-packages/migrate/changeset/constraint.py:85: SAWarning: Table 'encryption' specifies columns 'volume_type_id' as primary_key=True, not matching locally specified columns 'encryption_id'; setting the current primary key columns to 'encryption_id'. This warning may become an exception in a future release
      self._set_parent(table)

We need to fix this warning before it will an error

Ivan Kolodyazhny (e0ne)
description: updated
Anton Arefiev (aarefiev)
Changed in cinder:
assignee: nobody → Anton Arefiev (aarefiev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/165403
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5f8a616b15b70ddba6a64689b547521c91b95c84
Submitter: Jenkins
Branch: master

commit 5f8a616b15b70ddba6a64689b547521c91b95c84
Author: Anton Arefiev <email address hidden>
Date: Wed Mar 18 14:59:59 2015 +0200

    Fix 033 add encryption unique key migration

    SQLite doesn't support 'drop constraint' statament. So it notifies:
    SAWarning: Table 'encryption' specifies columns 'volume_type_id'
    as primary_key=True, not matching locally specified columns
    'encryption_id'; setting the current primary key columns to
    'encryption_id'. This warning may become an exception in a future
    release.

    Add new strategy for sqlite upgrade: table is renamed to temporary
    name, new table is created followed by INSERT statements, and
    renamed to original one.

    Change-Id: I723fdadb946f6944dde03954409899a9ddc3ee0e
    Closes-Bug: #1431374

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → 7.0.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.