<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><div><div dir="auto">Hi Nate,</div></div><div dir="auto"><br></div><div dir="auto">This issue is already reported and I have submitted a patch [1] to resolve the same.</div><div dir="auto"><br></div><div dir="auto">Kindly confirm this patch resolves your issue.</div><div dir="auto"><br></div><div dir="auto">[1] <div><a href="https://review.opendev.org/#/c/677694/" target="_blank">https://review.opendev.org/#/c/677694/</a></div><div dir="auto"><br></div></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks & Best Regards,<br><br></div>Abhishek Kekane<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 12:54 AM Nate Johnston <<a href="mailto:nate.johnston@redhat.com">nate.johnston@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Glance developers,<br>
<br>
I am investigating failures with the neutron-tempest-postgres-full periodic job<br>
in Zuul, and it looks like the failing step is actually a database migration for<br>
Glance that occurs during devstack setup.  Pasted below is a representative<br>
example [1].  You can see the same issue causing failures for this neutron<br>
periodic job by looking at the Zuul failures [2]; the error is in<br>
logs/devstacklog.txt.gz.<br>
<br>
The last successful job was 2019-08-15T06:07:06; the next one on 2019-08-16<br>
failed.  But there were no changes merged in glance during that time period [3].<br>
So if you could help debug the source of this issue then we can hopefully get<br>
this job - and probably whatever others depend on postgresql - back working.<br>
<br>
2019-08-27 06:35:44.963 | INFO  [alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01<br>
2019-08-27 06:35:44.967 | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.<br>
2019-08-27 06:35:44.967 | INFO  [alembic.runtime.migration] Will assume transactional DDL.<br>
2019-08-27 06:35:44.970 | Upgraded database to: train_expand01, current revision(s): train_expand01<br>
2019-08-27 06:35:44.971 | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.<br>
2019-08-27 06:35:44.971 | INFO  [alembic.runtime.migration] Will assume transactional DDL.<br>
2019-08-27 06:35:44.975 | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.<br>
2019-08-27 06:35:44.975 | INFO  [alembic.runtime.migration] Will assume transactional DDL.<br>
2019-08-27 06:35:44.995 | CRITI [glance] Unhandled error<br>
2019-08-27 06:35:44.996 | Traceback (most recent call last):<br>
2019-08-27 06:35:44.996 |   File "/usr/local/bin/glance-manage", line 10, in <module><br>
2019-08-27 06:35:44.996 |     sys.exit(main())<br>
2019-08-27 06:35:44.996 |   File "/opt/stack/new/glance/glance/cmd/manage.py", line 563, in main<br>
2019-08-27 06:35:44.996 |     return CONF.command.action_fn()<br>
2019-08-27 06:35:44.996 |   File "/opt/stack/new/glance/glance/cmd/manage.py", line 395, in sync<br>
2019-08-27 06:35:44.996 |     self.command_object.sync(CONF.command.version)<br>
2019-08-27 06:35:44.996 |   File "/opt/stack/new/glance/glance/cmd/manage.py", line 166, in sync<br>
2019-08-27 06:35:44.996 |     self.migrate(online_migration=False)<br>
2019-08-27 06:35:44.996 |   File "/opt/stack/new/glance/glance/cmd/manage.py", line 294, in migrate<br>
2019-08-27 06:35:44.996 |     if data_migrations.has_pending_migrations(db_api.get_engine()):<br>
2019-08-27 06:35:44.996 |   File "/opt/stack/new/glance/glance/db/sqlalchemy/alembic_migrations/data_migrations/__init__.py", line 61, in has_pending_migrations<br>
2019-08-27 06:35:44.997 |     return any([x.has_migrations(engine) for x in migrations])<br>
2019-08-27 06:35:44.997 |   File "/opt/stack/new/glance/glance/db/sqlalchemy/alembic_migrations/data_migrations/train_migrate01_backend_to_store.py", line 28, in has_migrations<br>
2019-08-27 06:35:44.997 |     metadata_backend = con.execute(sql_query)<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 982, in execute<br>
2019-08-27 06:35:44.997 |     return self._execute_text(object_, multiparams, params)<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1155, in _execute_text<br>
2019-08-27 06:35:44.997 |     parameters,<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context<br>
2019-08-27 06:35:44.997 |     e, statement, parameters, cursor, context<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1464, in _handle_dbapi_exception<br>
2019-08-27 06:35:44.997 |     util.raise_from_cause(newraise, exc_info)<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause<br>
2019-08-27 06:35:44.997 |     reraise(type(exception), exception, tb=exc_tb, cause=cause)<br>
2019-08-27 06:35:44.997 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context<br>
2019-08-27 06:35:44.998 |     cursor, statement, parameters, context<br>
2019-08-27 06:35:44.998 |   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 552, in do_execute<br>
2019-08-27 06:35:44.998 |     cursor.execute(statement, parameters)<br>
2019-08-27 06:35:44.998 | DBError: (psycopg2.errors.UndefinedFunction) function instr(text, unknown) does not exist<br>
2019-08-27 06:35:44.998 | LINE 1: select meta_data from image_locations where INSTR(meta_data,...<br>
2019-08-27 06:35:44.998 |                                                     ^<br>
2019-08-27 06:35:44.998 | HINT:  No function matches the given name and argument types. You might need to add explicit type casts.<br>
<br>
Thanks,<br>
<br>
Nate<br>
<br>
[1] also <a href="http://paste.openstack.org/show/765665/" rel="noreferrer" target="_blank">http://paste.openstack.org/show/765665/</a> if that is an easier view<br>
[2] <a href="http://zuul.openstack.org/builds?project=openstack%2Fneutron&job_name=neutron-tempest-postgres-full&branch=master" rel="noreferrer" target="_blank">http://zuul.openstack.org/builds?project=openstack%2Fneutron&job_name=neutron-tempest-postgres-full&branch=master</a><br>
[3] <a href="https://review.opendev.org/#/q/project:openstack/glance+status:merged" rel="noreferrer" target="_blank">https://review.opendev.org/#/q/project:openstack/glance+status:merged</a><br>
<br>
</blockquote></div>