From 490cad0b04f273a1fad34074dbece4fcb0d1a95d Mon Sep 17 00:00:00 2001 From: Anton Arefiev Date: Mon, 27 Feb 2017 18:31:28 +0200 Subject: [PATCH] Fix valid provision states for introspection Ironic provision state 'inspectfail' was renamed to 'inspect failed', but Inspector continues to rely on old name when performing node provision state validation. Change-Id: I21763261bfe2015f9ea8984eef62c5b5cb513d2b Closes-Bug: #1668326 --- ironic_inspector/common/ironic.py | 2 +- ...x-wrong-provision-state-name-150c91c48d471bf9.yaml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-wrong-provision-state-name-150c91c48d471bf9.yaml diff --git a/ironic_inspector/common/ironic.py b/ironic_inspector/common/ironic.py index 57deee7ee..53899a03c 100644 --- a/ironic_inspector/common/ironic.py +++ b/ironic_inspector/common/ironic.py @@ -26,7 +26,7 @@ CONF = cfg.CONF LOG = utils.getProcessingLogger(__name__) # See http://specs.openstack.org/openstack/ironic-specs/specs/kilo/new-ironic-state-machine.html # noqa -VALID_STATES = {'enroll', 'manageable', 'inspecting', 'inspectfail'} +VALID_STATES = {'enroll', 'manageable', 'inspecting', 'inspect failed'} SET_CREDENTIALS_VALID_STATES = {'enroll'} # 1.11 is API version, which support 'enroll' state diff --git a/releasenotes/notes/fix-wrong-provision-state-name-150c91c48d471bf9.yaml b/releasenotes/notes/fix-wrong-provision-state-name-150c91c48d471bf9.yaml new file mode 100644 index 000000000..a05f3cbc2 --- /dev/null +++ b/releasenotes/notes/fix-wrong-provision-state-name-150c91c48d471bf9.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Wrong provision state name 'inspectfail' in *ironic-inspector* valid + states for node inspection. + This issue leads to state inconsistency between *ironic* and + *ironic-inspector*. For example, if *ironic* inspection timeout is + lower than *ironic-inspector*'s, and inspection timeout occurs, *ironic* + will transition node into 'inspect failed' provision state. In such case + when node inspection finishes without errors the node will be in + 'inspect failed' provision state with inspection in 'finished' state.