diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2021-08-02 16:07:46 -0700 |
---|---|---|
committer | Julia Kreger <juliaashleykreger@gmail.com> | 2021-09-10 14:47:27 -0700 |
commit | d17749249cbe8507c39eb213e5e97aa1fb543a55 (patch) | |
tree | b1ae17fd632e65e9710566f3ab1dffe6335be46d /ironic/db/api.py | |
parent | fbaad948d870ffd18995f5494016798c8d3c9206 (diff) | |
download | ironic-d17749249cbe8507c39eb213e5e97aa1fb543a55.tar.gz |
Record node history and manage events in db
* Adds periodic task to purge node_history entries based upon
provided configuration.
* Adds recording of node history entries for errors in the
core conductor code.
* Also changes the rescue abort behavior to remove the notice
from being recorded as an error, as this is a likely bug in
behavior for any process or service evaluating the node
last_error field.
* Makes use of a semi-free form event_type field to help
provide some additional context into what is going on and
why. For example if deployments are repeatedly failing,
then perhaps it is a configuration issue, as opposed to
a general failure. If a conductor has no resources, then
the failure, in theory would point back to the conductor
itself.
Story: 2002980
Task: 42960
Change-Id: Ibfa8ac4878cacd98a43dd4424f6d53021ad91166
Diffstat (limited to 'ironic/db/api.py')
-rw-r--r-- | ironic/db/api.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ironic/db/api.py b/ironic/db/api.py index 5b71d32bc..77fa054e2 100644 --- a/ironic/db/api.py +++ b/ironic/db/api.py @@ -1380,3 +1380,21 @@ class Connection(object, metaclass=abc.ABCMeta): (asc, desc) :returns: A list of histories. """ + + @abc.abstractmethod + def query_node_history_records_for_purge(self, conductor_id): + """Utility method to identify nodes to clean history records for. + + :param conductor_id: Id value for the conductor to perform this + query on behalf of. + :returns: A dictionary with key values of node database ID values + and a list of values associated with the node. + """ + + @abc.abstractmethod + def bulk_delete_node_history_records(self, node_id, limit): + """Utility method to bulk delete node history entries. + + :param entires: A list of node history entriy id's to be + queried for deletion. + """ |