From 22666a889f3bf7b9a58012af8de4c81407854e28 Mon Sep 17 00:00:00 2001 From: Jacob Anders Date: Wed, 10 Apr 2024 11:16:57 +1000 Subject: [PATCH] Add states.SERVICING and SERVICEWAIT to _FASTTRACK_HEARTBEAT_ALLOWED Currently, service steps may fail to start in scenarios dependent on IPA fasttrack. This change attempts to resolve this by incorporating servicing states in the fast track allowed states whitelist while also making _FASTTRACK_HEARTBEAT_ALLOWED a superset of _HEARTBEAT_ALLOWED instead of duplicating values in the two constants. Change-Id: I47984469c1432e7fc7b4f1494b9f6c551c34672f (cherry picked from commit 619e1ac80ccc6f20e32a2a80d31637dd45d6d45b) --- ironic/drivers/modules/agent_base.py | 8 +++----- ...servicing-to-heartbeat-fasttrack-85863df34ece6401.yaml | 6 ++++++ 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/add-servicing-to-heartbeat-fasttrack-85863df34ece6401.yaml diff --git a/ironic/drivers/modules/agent_base.py b/ironic/drivers/modules/agent_base.py index c99fdeb767..d4169cc2e4 100644 --- a/ironic/drivers/modules/agent_base.py +++ b/ironic/drivers/modules/agent_base.py @@ -98,11 +98,9 @@ _HEARTBEAT_ALLOWED = (states.DEPLOYWAIT, states.CLEANWAIT, states.RESCUEWAIT, states.SERVICEWAIT, states.SERVICEHOLD) HEARTBEAT_ALLOWED = frozenset(_HEARTBEAT_ALLOWED) -_FASTTRACK_HEARTBEAT_ALLOWED = (states.DEPLOYWAIT, states.CLEANWAIT, - states.RESCUEWAIT, states.ENROLL, - states.MANAGEABLE, states.AVAILABLE, - states.DEPLOYING, states.CLEANHOLD, - states.DEPLOYHOLD, states.SERVICEHOLD) +_FASTTRACK_HEARTBEAT_ALLOWED = _HEARTBEAT_ALLOWED + (states.MANAGEABLE, + states.AVAILABLE, + states.ENROLL) FASTTRACK_HEARTBEAT_ALLOWED = frozenset(_FASTTRACK_HEARTBEAT_ALLOWED) diff --git a/releasenotes/notes/add-servicing-to-heartbeat-fasttrack-85863df34ece6401.yaml b/releasenotes/notes/add-servicing-to-heartbeat-fasttrack-85863df34ece6401.yaml new file mode 100644 index 0000000000..6f74b96bd6 --- /dev/null +++ b/releasenotes/notes/add-servicing-to-heartbeat-fasttrack-85863df34ece6401.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes the issue of service steps not starting due to servicing states + (states.SERVICING and states.SERVICEWAIT) missing from + _FASTTRACK_HEARTBEAT_ALLOWED constant.