Configurable introspection data storage backend¶
This spec proposes a mechanism to read and write introspection data from configured storage backend, and additionally provides support to read and write introspection data in ironic inspector database.
Currently, introspection data can only be stored in Swift, there are no alternatives in an environment where Swift is not adopted. Also there is lack of mechanisms to support other storage backends by extending ironic-inspector with extensions.
Adds a table named
introspection_datato store introspection data.
Adds an inspector plugin named
introspection_datawhich supports three types of storage backend:
Each type of storage backend exposes two interfaces:
def get(self, node_id, suffix=None): pass def save(self, node_info, data, suffix=None): pass
Adds a plugin manager to dynamically load driver extensions according to the configuration option
[processing]storage_backend, in a way similar to rule manager.
Adds a new entry point to the setup.cfg:
ironic_inspector.introspection.storage_backend = none = ironic_inspector.plugins.introspection_data:NoStore swift = ironic_inspector.plugins.introspection_data:SwiftStore database = ironic_inspector.plugins.introspection_data:DatabaseStore
Data model impact¶
A new table named
introspection_data will be created, with three fields:
uuid: String(36), foreign key to
processed: Boolean, used to determine whether the introspection data is processed or not. Currently, inspector uses suffix
UNPROCESSEDfor unprocessed data,
Nonefor processed data, This will be mapped to the boolean field.
The Swift storage backend uses suffix as part of the object name:
data: JsonEncodedDict(), LONGTEXT for MySQL. This field is used as the storage of introspected data.
When a node is removed from the cache, the associated introspection data will be removed as well.
HTTP API impact¶
Client (CLI) impact¶
Ironic python agent impact¶
Performance and scalability impact¶
[processing]storage_backend will have
a valid value. When set, the inspected data will be stored to ironic inspector
Swift is not a mandatory requirement for storing introspection data in this case.
After this feature is implemented, additional plugins can be implemented to support other type of stores.
Upgrades and Backwards Compatibility¶
Database upgrade will be handled by ironic-inspector-dbsync.
Provides a tool to assist with the migration of existing introspection data between Swift and database, e.g.:
$ ironic-inspector-migrate-data --from swift --to database $ ironic-inspector-migrate-data --from database --to swift
- Primary assignee:
Implements db layer support.
Implements inspection data plugin, migrates swift support into plugin as a storage backend.
Implements database storage backend.
Creates introspection data plugin manager to load driver instance according to configuration option, rework introspection data read/write access based on interfaces provided by introspection data plugin.
Implements the tool to help with introspection data migration.
This will be covered by unit tests and functional tests.