yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01847
[Bug 1160114] Re: test_postgresql_opportunistically fails on RHEL
Reviewed: https://review.openstack.org/25634
Committed: http://github.com/openstack/glance/commit/b5757246b00c23523b5e2b829435aebf1ee9c000
Submitter: Jenkins
Branch: milestone-proposed
commit b5757246b00c23523b5e2b829435aebf1ee9c000
Author: Eoghan Glynn <eglynn@xxxxxxxxxx>
Date: Wed Mar 27 12:17:28 2013 +0000
Fallback to inferring image_members unique constraint name
Fixes bug 1160114
The initial version of the 022_image_member_index migration
hardcoded the default naming convention for unqiue constraints
used by PostgreSQL 9.2, which turns out to different to the
convention used by PostgreSQL 8.4. This causes the CI to fail
(non-voting) against RHEL.
We resolve the issue by falling back to inferring the existing
unique constraint name from the image_members indices.
Change-Id: Iad6db033e63cdfd7a77db44bdeaed2284699b469
** Changed in: glance
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1160114
Title:
test_postgresql_opportunistically fails on RHEL
Status in OpenStack Image Registry and Delivery Service (Glance):
Fix Released
Bug description:
Using the latest version of Glance grizzly I'm seeing the following
when running unit tests on RHEL (with postgres):
======================================================================
ERROR: glance.tests.unit.test_migrations.TestMigrations.test_postgresql_opportunistically
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/home/dprince/glance/glance/tests/unit/test_migrations.py", line 292, in test_postgresql_opportunistically
self._walk_versions(engine, False, False)
File "/home/dprince/glance/glance/tests/unit/test_migrations.py", line 319, in _walk_versions
self._migrate_up(engine, version, with_data=True)
File "/home/dprince/glance/glance/tests/unit/test_migrations.py", line 359, in _migrate_up
version)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/versioning/api.py", line 186, in upgrade
return _migrate(url, repository, version, upgrade=True, err=err, **opts)
File "<string>", line 2, in _migrate
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
return f(*a, **kw)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/versioning/api.py", line 366, in _migrate
schema.runchange(ver, change, changeset.step)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/versioning/schema.py", line 91, in runchange
change.run(self.engine, step)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/versioning/script/py.py", line 145, in run
script_func(engine)
File "/home/dprince/glance/glance/db/sqlalchemy/migrate_repo/versions/022_image_member_index.py", line 33, in upgrade
table=image_members).drop()
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/constraint.py", line 59, in drop
self.__do_imports('constraintdropper', *a, **kw)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/constraint.py", line 32, in __do_imports
run_single_visitor(engine, visitorcallable, self, *a, **kw)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/databases/visitor.py", line 75, in run_single_visitor
fn(element, **kwargs)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/ansisql.py", line 272, in visit_migrate_unique_constraint
self._visit_constraint(*p, **k)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/ansisql.py", line 284, in _visit_constraint
self.execute()
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/migrate/changeset/ansisql.py", line 42, in execute
return self.connection.execute(self.buffer.getvalue())
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1449, in execute
params)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1628, in _execute_text
statement, parameters
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
context)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
context)
File "/home/dprince/glance/.venv/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 331, in do_execute
cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) constraint "image_members_image_id_member_key" of relation "image_members" does not exist
'ALTER TABLE image_members DROP CONSTRAINT image_members_image_id_member_key ' {}
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1160114/+subscriptions