yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #95261
[Bug 2094810] Re: neutron-status upgrade check fails on checking if ovn_alembic_version table exists
Reviewed: https://review.opendev.org/c/openstack/neutron/+/939248
Committed: https://opendev.org/openstack/neutron/commit/9867f072c17190c6be167c0fccc5ea97f65a55ea
Submitter: "Zuul (22348)"
Branch: master
commit 9867f072c17190c6be167c0fccc5ea97f65a55ea
Author: Slawek Kaplonski <skaplons@xxxxxxxxxx>
Date: Tue Jan 14 16:19:51 2025 +0100
Fix neutron-status upgrade check tool
It is now using sqlalchemy.text() to declare SQL query to check
existing tables in the Neutron Database.
Closes-Bug: #2094810
Change-Id: I8d19ad41472f8d2b8ce622dd608de339c4302af0
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2094810
Title:
neutron-status upgrade check fails on checking if ovn_alembic_version
table exists
Status in neutron:
Fix Released
Bug description:
I am using SQLAlchemy==2.0.36 and it is failing for me with error
like:
$ /opt/stack/data/venv/bin/neutron-status --debug --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade check
JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.
Error:
Traceback (most recent call last):
File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_upgradecheck/upgradecheck.py", line 195, in run
return conf.command.action_fn()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/oslo_upgradecheck/upgradecheck.py", line 105, in check
result = func(self)
^^^^^^^^^^
File "/opt/stack/neutron/neutron/cmd/upgrade_checks/checks.py", line 296, in ovn_db_revision_check
if not table_exists(OVN_ALEMBIC_TABLE_NAME):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/neutron/neutron/cmd/upgrade_checks/checks.py", line 102, in table_exists
tables = [t[0] for t in ctx.session.execute("SHOW TABLES;")]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2145, in _execute_internal
statement = coercions.expect(roles.StatementRole, statement)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/sql/coercions.py", line 395, in expect
resolved = impl._literal_coercion(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/sql/coercions.py", line 621, in _literal_coercion
return self._text_coercion(element, argname, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/sql/coercions.py", line 614, in _text_coercion
return _no_text_coercion(element, argname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/stack/data/venv/lib/python3.12/site-packages/sqlalchemy/sql/coercions.py", line 584, in _no_text_coercion
raise exc_cls(
sqlalchemy.exc.ArgumentError: Textual SQL expression 'SHOW TABLES;' should be explicitly declared as text('SHOW TABLES;')
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2094810/+subscriptions
References