summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2015-07-15 15:23:45 +0100
committerLucas Alvares Gomes <lucasagomes@gmail.com>2015-09-26 19:01:26 +0000
commitcd70f514d6615d954dcc7e80c6438078a945b46e (patch)
treea50fec2f08728421c02f359c973739aa9a730c6e
parentcdb4b520eb8f5fd7ed1b1e48f74d229d63c3a21a (diff)
downloadironic-python-agent-cd70f514d6615d954dcc7e80c6438078a945b46e.tar.gz
Make the erase_devices clean step abortable
This patches updates the get_clean_steps() method to make the erase_devices step abortable. Erasing devices is something that can be cancelled without damaging the machine. When a clean step is aborted the provision state of the Ironic node will go to CLEANFAIL state. The operator can then do what is needed to fix the problem (i.e network booting issues) and restart the cleaning later on. Partial-Bug: #1455825 Change-Id: Ic181ac3712810c6f6925e8b627ee79e77ecf4d83
-rw-r--r--ironic_python_agent/hardware.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py
index 49473ac2..ebde7b01 100644
--- a/ironic_python_agent/hardware.py
+++ b/ironic_python_agent/hardware.py
@@ -234,6 +234,12 @@ class HardwareManager(object):
'reboot_requested': Whether the agent should request Ironic reboots
the node via the power driver after the
operation completes.
+ 'abortable': Boolean value. Whether the clean step can be
+ stopped by the operator or not. Some clean step may
+ cause non-reversible damage to a machine if interrupted
+ (i.e firmware update), for such steps this parameter
+ should be set to False. If no value is set for this
+ parameter, Ironic will consider False (non-abortable).
}
If multiple hardware managers return the same step name, the priority
@@ -257,7 +263,8 @@ class HardwareManager(object):
'step': 'erase_devices',
'priority': 10,
'interface': 'deploy',
- 'reboot_requested': False
+ 'reboot_requested': False,
+ 'abortable': True
}
]