Commit Graph

6 Commits

Author SHA1 Message Date
Anton Arefiev 3fe42b53fd SQLAlchemy 2.0 Support
Primarily remove the workaround added in
Ia6d512ff2ae417bab938cb095fbb0884d195010a which added
continued use of autocommit, which is incompatible with
SQLAlchemy 2.0.

Also set the environment for unit tests to report compatability
warnings, although it appears none are being reported at this time.

Also cuts out the db upgrade cruft to only use the online database
migration code through oslo_db's enginefacade, which has the smarts
to handle online or offline migrations.

And then, retools unit/functional test data storage to utlize sqlite,
and in that re-tooled the queries to prevent locking conditions
which could exist with queries, and some additional refactoring/cleanup.

Also, don't mock and test time.sleep().

Additionally, it looks like we have discovered the root cause of the
memory/connection leakage issue which has been observed, due to the
way lists of nodes are processed/returned.

This change was based upon the work in
I506da42a9891a245831f325e34bec92e0a3f33f0 which is included in
this commit as the entire database structure and interaction
has been modified for ironic-inspector.

Co-Authored-By: aarefiev <aarefiev@mirantis.com>
Story: 2009727
Task: 44132
Change-Id: Ic88eb9dec5fddc924a72d9a23c17a304954ebf46
2022-12-15 09:28:55 -08:00
Riccardo Pittau 9b1450398c Stop using six library
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.

Change-Id: Ic443c7e4d5a5a849c4dc220207f8957e4c90bf53
2019-12-17 09:23:01 +01:00
Kaifeng Wang 0e11af26b5 Remove deprecated store_data_location
The deprecated configuration option [processing]store_data_location was
removed.

Change-Id: I3f66af7fe67284e0b391188bef7d949cec8feb40
2019-04-09 08:45:04 +08:00
Kaifeng Wang 444c20d9fc Deprecates [processing]store_data_location
Since the introspection data could be retrieved from inspector API,
there is no need to keep an extra link in ironic. This also keeps
inspector's behavior consistent by doing so.

Change-Id: Ib667afc4f16551b195641888831df7b681217184
Story: 1726713
Task: 11373
2019-02-26 11:49:15 +08:00
Kaifeng Wang 8b2fb384c3 Revise driver api for introspection data backend
The patch revises driver interface for the introspection data
backends. Previously getting introspection data supports node
uuid/name, while saving takes a node_info object, which is not
consistent and makes migration tool looks weird if implemented
based upon it.

For the get() interface, actually only uuid will be passed in,
so it's narrowed down to accept only uuids, logic names will be
converted from api level if there is a need.

The save() interface is changed to accept node uuid instead of
node_info, which is consistent with the get() interface.

Change-Id: I4702ed7372d0e60ed6252879a7496649a0453b84
Story: 1726713
Task: 11373
2019-02-19 11:18:04 +08:00
space d278bb6f77 introspection data backend: plugin layer
Configurable introspection data storage backend [1] is proposed
to provide flexible extension of introspection data storage
instead of the single support of Swift storage backend.

This patch adds plugin mechanism for loading introspection
storage, creates database backend and moves Swift storage
into a plugin.

[1] http://specs.openstack.org/openstack/ironic-inspector-specs/specs/configurable-introspection-data-backends.html

Story: 1726713
Task: 11373

Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: Ie4d09dc0afc441b20a1e5e3bd8e742b1df918954
2019-01-07 17:31:15 +08:00