← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2094810] [NEW] neutron-status upgrade check fails on checking if ovn_alembic_version table exists

 

Public bug reported:

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;')

** Affects: neutron
     Importance: High
     Assignee: Slawek Kaplonski (slaweq)
         Status: Confirmed

-- 
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:
  Confirmed

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