From 1a59ef96fc2470b22caa42b3ab45a8f2def79521 Mon Sep 17 00:00:00 2001 From: Kaifeng Wang Date: Wed, 9 May 2018 00:34:50 +0800 Subject: [PATCH] Follow up to inspect wait implementation Follow up to Ie76bfdad5966014a4dae826919ff5705462c743b to address comments after approve. Adds notes to describe the behavior change of node update in the inspecting state with different API version. Change-Id: I6bbe86c20afc9a006e71ff1bbbd559baa0207ef8 Story: #1725211 Task: #10630 --- ironic/common/states.py | 2 ++ ironic/conductor/manager.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/ironic/common/states.py b/ironic/common/states.py index a0d26405f6..694e63818a 100644 --- a/ironic/common/states.py +++ b/ironic/common/states.py @@ -216,6 +216,8 @@ UNRESCUEFAIL = 'unrescue failed' UNRESCUING = 'unrescuing' """ Node is being restored from rescue mode (to active state). """ +# NOTE(kaifeng): INSPECTING is allowed to keep backwards compatibility, +# starting from API 1.39 node update is disallowed in this state. UPDATE_ALLOWED_STATES = (DEPLOYFAIL, INSPECTING, INSPECTFAIL, INSPECTWAIT, CLEANFAIL, ERROR, VERIFYING, ADOPTFAIL, RESCUEFAIL, UNRESCUEFAIL) diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index 801f7808c7..865b7dc036 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -170,6 +170,9 @@ class ConductorManager(base_manager.BaseConductorManager): # TODO(dtantsur): reconsider allowing changing some (but not all) # interfaces for active nodes in the future. + # NOTE(kaifeng): INSPECTING is allowed to keep backwards + # compatibility, starting from API 1.39 node update is disallowed + # in this state. allowed_update_states = [states.ENROLL, states.INSPECTING, states.INSPECTWAIT, states.MANAGEABLE, states.AVAILABLE]