summaryrefslogtreecommitdiff
path: root/ironic_python_agent/hardware.py
diff options
context:
space:
mode:
authorArne Wiebalck <Arne.Wiebalck@cern.ch>2021-04-26 12:00:44 +0200
committerArne Wiebalck <Arne.Wiebalck@cern.ch>2021-05-01 10:36:20 +0200
commit6702fcaa43fda3384415f8e6c2848b8abc6ff15e (patch)
tree067ddc65dfdb0f6b2a0c9e5c1f176bc2c42efba6 /ironic_python_agent/hardware.py
parent9edb13d891de658124d11099e2287163a76f1050 (diff)
downloadironic-python-agent-6702fcaa43fda3384415f8e6c2848b8abc6ff15e.tar.gz
Burn-in: Add CPU step
Add a clean step for CPU burn-in via stress-ng. Get basic run parameters from the node's driver_info. Story: #2007523 Task: #42382 Change-Id: I14fd4164991fb94263757244f716b6bfe8edf875
Diffstat (limited to 'ironic_python_agent/hardware.py')
-rw-r--r--ironic_python_agent/hardware.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py
index abda1f1a..97c45449 100644
--- a/ironic_python_agent/hardware.py
+++ b/ironic_python_agent/hardware.py
@@ -38,6 +38,7 @@ import pyudev
import stevedore
import yaml
+from ironic_python_agent import burnin
from ironic_python_agent import encoding
from ironic_python_agent import errors
from ironic_python_agent.extensions import base as ext_base
@@ -1393,6 +1394,14 @@ class GenericHardwareManager(HardwareManager):
except OSError:
os.remove(filepath)
+ def burnin_cpu(self, node, ports):
+ """Burn-in the CPU
+
+ :param node: Ironic node object
+ :param ports: list of Ironic port objects
+ """
+ burnin.stress_ng_cpu(node)
+
def _shred_block_device(self, node, block_device):
"""Erase a block device using shred.
@@ -1865,7 +1874,14 @@ class GenericHardwareManager(HardwareManager):
'interface': 'raid',
'reboot_requested': False,
'abortable': True
- }
+ },
+ {
+ 'step': 'burnin_cpu',
+ 'priority': 0,
+ 'interface': 'deploy',
+ 'reboot_requested': False,
+ 'abortable': True
+ },
]
def get_deploy_steps(self, node, ports):