summaryrefslogtreecommitdiff
path: root/ironic/common/states.py
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2021-08-02 16:07:46 -0700
committerJulia Kreger <juliaashleykreger@gmail.com>2021-09-10 14:47:27 -0700
commitd17749249cbe8507c39eb213e5e97aa1fb543a55 (patch)
treeb1ae17fd632e65e9710566f3ab1dffe6335be46d /ironic/common/states.py
parentfbaad948d870ffd18995f5494016798c8d3c9206 (diff)
downloadironic-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/common/states.py')
-rw-r--r--ironic/common/states.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/ironic/common/states.py b/ironic/common/states.py
index 3b0cbe18a..89b710189 100644
--- a/ironic/common/states.py
+++ b/ironic/common/states.py
@@ -297,6 +297,25 @@ ALLOCATING = 'allocating'
# States ERROR and ACTIVE are reused.
+###########################
+# History Event State Types
+###########################
+
+PROVISIONING = "provisioning"
+CLEANING = "cleaning"
+DEPLOYING = "deploying"
+TAKEOVER = "takeover"
+INTROSPECTION = "introspection"
+RESCUE = "rescue"
+CONDUCTOR = "conductor"
+TRANSITION = "transition"
+STARTFAIL = "startup failure"
+UNPROVISION = "unprovision"
+ADOPTION = "adoption"
+CONSOLE = "console"
+MONITORING = "monitoring"
+VERIFY = "verify"
+
#####################
# State machine model