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
This commit is contained in:
Kaifeng Wang
2018-05-09 00:34:50 +08:00
committed by Shivanand Tendulker
parent 74a99d09b3
commit 1a59ef96fc
2 changed files with 5 additions and 0 deletions

View File

@@ -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)

View File

@@ -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]