ironic-status upgrade check is broken with SQLALchemy 2.0

Bug #2061345 reported by Takashi Kajinami
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Takashi Kajinami

Bug Description

It seems the upgrade check command is using SQLAlchemy API which was removed in 2.0.

The following traceback is seen during the attempt[1] to bump SQLAlchemy version in u-c to 2.0 .

[1] https://zuul.opendev.org/t/openstack/build/1b8c8a6be8594770beaf870d5b456e90
```
Error:
Traceback (most recent call last):
  File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_upgradecheck/upgradecheck.py", line 195, in run
    return conf.command.action_fn()
  File "/opt/stack/data/venv/lib/python3.10/site-packages/oslo_upgradecheck/upgradecheck.py", line 105, in check
    result = func(self)
  File "/opt/stack/ironic/ironic/cmd/status.py", line 104, in _check_allocations_table
    res = engine.execute("show create table allocations")
AttributeError: 'Engine' object has no attribute 'execute'
```

affects: ironic-inspector → ironic
Changed in ironic:
assignee: nobody → Takashi Kajinami (kajinamit)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ironic/+/915789

Changed in ironic:
status: New → In Progress
Changed in ironic:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.opendev.org/c/openstack/ironic/+/915789
Committed: https://opendev.org/openstack/ironic/commit/7408a93dcd9c231cfc122b22663b63bc131a5cd0
Submitter: "Zuul (22348)"
Branch: master

commit 7408a93dcd9c231cfc122b22663b63bc131a5cd0
Author: Takashi Kajinami <email address hidden>
Date: Mon Apr 15 11:47:25 2024 +0900

    db: Replace use of Engine.execute() method

    Resolve the following RemovedIn20Warning warning:

      The Engine.execute() method is considered legacy as of the 1.x
      series of SQLAlchemy and will be removed in 2.0.

    Closes-Bug: #2061345
    Co-Authored-By: Stephen Finucane <email address hidden>
    Change-Id: Ib0519af8a15ca02e351f8d739d52f4e658f7615a

Changed in ironic:
status: In Progress → Fix Released
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.