test_postgresql_opportunistically failure - MismatchError: ('project_user_quotas_user_id_deleted_idx

Bug #1213921 reported by Mark McLoughlin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Viktor Serhieiev

Bug Description

Examples:

  http://logs.openstack.org/37/40237/8/check/gate-nova-python26/b2b2a0c/
  http://logs.openstack.org/77/41977/3/check/gate-nova-python26/7ed4f4b/
  http://logs.openstack.org/77/41977/3/check/gate-nova-python27/e70a958/

 Failed to migrate to version 210 on engine Engine(postgresql+psycopg2://openstack_citest:openstack_citest@localhost/openstack_citest)
 }}}

 Traceback (most recent call last):
   File "/home/jenkins/workspace/gate-nova-python26/nova/tests/db/test_migrations.py", line 175, in test_postgresql_opportunistically
     self._test_postgresql_opportunistically()
   File "/home/jenkins/workspace/gate-nova-python26/nova/tests/db/test_migrations.py", line 358, in _test_postgresql_opportunistically
     self._walk_versions(engine, False, False)
   File "/home/jenkins/workspace/gate-nova-python26/nova/tests/db/test_migrations.py", line 379, in _walk_versions
     self._migrate_up(engine, version, with_data=True)
   File "/home/jenkins/workspace/gate-nova-python26/nova/tests/db/test_migrations.py", line 444, in _migrate_up
     check(engine, data)
   File "/home/jenkins/workspace/gate-nova-python26/nova/tests/db/test_migrations.py", line 2677, in _check_210
     ['user_id', 'deleted']), index_data)
   File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 328, in assertIn
     self.assertThat(haystack, Contains(needle))
   File "/home/jenkins/workspace/gate-nova-python26/.tox/py26/lib/python2.6/site-packages/testtools/testcase.py", line 417, in assertThat
     raise MismatchError(matchee, matcher, mismatch, verbose)
 MismatchError: ('project_user_quotas_user_id_deleted_idx', ['user_id', 'deleted']) not in [(u'project_user_quotas_project_id_deleted_idx', [u'project_id', u'deleted']), (u'project_user_quotas_user_id_deleted_idx', [u'deleted', u'user_id']), (u'uniq_project_user_quotas0user_id0project_id0resource0deleted', [u'deleted', u'resource', u'project_id', u'user_id'])]

Tags: db
Mark McLoughlin (markmc)
description: updated
description: updated
Revision history for this message
Mark McLoughlin (markmc) wrote :
Changed in nova:
assignee: nobody → Victor Sergeyev (vsergeyev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/42649
Committed: http://github.com/openstack/nova/commit/281c7429b733f5b09f05b970a5a61bb4e64c4f5b
Submitter: Jenkins
Branch: master

commit 281c7429b733f5b09f05b970a5a61bb4e64c4f5b
Author: Victor Sergeyev <email address hidden>
Date: Mon Aug 19 16:47:42 2013 +0300

    Fix migration 210 tests for PostgreSQL

    We check index in table in _check_210() and _post_downgrade_210()
    methods in a such way:

    self.assertIn(('project_user_quotas_user_id_deleted_idx',
                   ['user_id', 'deleted']), index_data)

    But we have no possibility to get the order of columns due to SQLA
    issue in reflection of indexes for PostgreSQL.
    See http://www.sqlalchemy.org/trac/ticket/2767
    So columns order in `index_data` variable can be wrong and test
    fails in such case.

    To fix this we should store colums as sets (instead of lists) if
    we run tests on PostgreSQL.

    Fixes bug 1213921

    Change-Id: I9e10b325940becfdcff6b13fcaa4146731126a60

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