Model sync is broken for SQLite because of BigInteger type mismatch

Bug #1526804 reported by Mike Fedosin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Mike Fedosin
Kilo
Fix Released
Undecided
Unassigned

Bug Description

Here the output for glance.tests.unit.test_migrations.ModelsMigrationsSyncSQLite.test_models_sync:

AssertionError: Models and migration scripts aren't in sync:
[ [ ( 'modify_type',
      None,
      'artifact_blobs',
      'size',
      { 'existing_nullable': False,
        'existing_server_default': False},
      INTEGER(),
      BigInteger())],
  [ ( 'modify_type',
      None,
      'artifacts',
      'type_version_prefix',
      { 'existing_nullable': False,
        'existing_server_default': False},
      INTEGER(),
      BigInteger())],
  [ ( 'modify_type',
      None,
      'artifacts',
      'version_prefix',
      { 'existing_nullable': False,
        'existing_server_default': False},
      INTEGER(),
      BigInteger())],
  [ ( 'modify_type',
      None,
      'images',
      'size',
      { 'existing_nullable': True,
        'existing_server_default': False},
      INTEGER(),
      BigInteger())],
  [ ( 'modify_type',
      None,
      'images',
      'virtual_size',
      { 'existing_nullable': True,
        'existing_server_default': False},
      INTEGER(),
      BigInteger())]]

Mike Fedosin (mfedosin)
Changed in glance:
assignee: nobody → Mike Fedosin (mfedosin)
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/259244

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

Reviewed: https://review.openstack.org/258527
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=2e2adb3935bcbf9dc6e100c4ba9a8e1b4bf3a4e6
Submitter: Jenkins
Branch: master

commit 2e2adb3935bcbf9dc6e100c4ba9a8e1b4bf3a4e6
Author: Mike Fedosin <email address hidden>
Date: Wed Dec 16 17:05:45 2015 +0300

    Fix model sync for SQLite

    This code fixes the situation when several
    models are mismatched for SQLite because of
    type inconsistencies between Integer and
    BigInteger in sqlalchemy.

    Change-Id: I52b3a0158db8e3dc48f19509d1f9f80420ee40ea
    Closes-bug: #1526804
    Closes-bug: #1526675

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/liberty)

Reviewed: https://review.openstack.org/259244
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=2b20285a1a48aa88e6d101e62d4bef2b9eda1c35
Submitter: Jenkins
Branch: stable/liberty

commit 2b20285a1a48aa88e6d101e62d4bef2b9eda1c35
Author: Mike Fedosin <email address hidden>
Date: Wed Dec 16 17:05:45 2015 +0300

    Fix model sync for SQLite

    This code fixes the situation when several
    models are mismatched for SQLite because of
    type inconsistencies between Integer and
    BigInteger in sqlalchemy.

    Change-Id: I52b3a0158db8e3dc48f19509d1f9f80420ee40ea
    Closes-bug: #1526804
    Closes-bug: #1526675
    (cherry picked from commit 2e2adb3935bcbf9dc6e100c4ba9a8e1b4bf3a4e6)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/259667

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/kilo)

Reviewed: https://review.openstack.org/259667
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5cb8d33860fbadcaee7dbcf61b866c5ce18b5054
Submitter: Jenkins
Branch: stable/kilo

commit 5cb8d33860fbadcaee7dbcf61b866c5ce18b5054
Author: Mike Fedosin <email address hidden>
Date: Wed Dec 16 17:05:45 2015 +0300

    Fix model sync for SQLite

    This code fixes the situation when several
    models are mismatched for SQLite because of
    type inconsistencies between Integer and
    BigInteger in sqlalchemy.

     Conflicts:
     glance/db/sqlalchemy/models_artifacts.py

    Change-Id: I52b3a0158db8e3dc48f19509d1f9f80420ee40ea
    Closes-bug: #1526804
    Closes-bug: #1526675
    (cherry picked from commit 2e2adb3935bcbf9dc6e100c4ba9a8e1b4bf3a4e6)
    (cherry picked from commit 2b20285a1a48aa88e6d101e62d4bef2b9eda1c35)

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 11.0.1

This issue was fixed in the openstack/glance 11.0.1 release.

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.