ironic/releasenotes/notes/remove-model-query-from-upgrade-af227b6c8a5d654a.yaml
Julia Kreger 93688e9531 Explicitly use a session for DB version check
The db field value version check, which is a preflight to
major upgrades (to detect if a prior upgrade was not completed)
was using model_query, which could orphan an open transaction in
the same process until the python interpretter went and took out
the perverable trash.

We now use an explicit session which structurally ensures we close
any open transactions which allows a metadata lock to be obtained
to perform a schema update..

Change-Id: Id51419bc50af5a756bb7b0ca451df1936dd6f904
2023-05-23 20:26:05 +00:00

10 lines
387 B
YAML

---
fixes:
- |
Fixes an issue where the database upgrade can hang on Python 3.10.
This was because open transactions could become orphaned awaiting
the Python runtime to clean up their memory references due to the
way the overall database query was being intiiated to pre-flight
check the upgrade. We have structurally changed the behavior
to remedy this case.