The Bare Metal Provisioning service (ironic) cleans nodes automatically when they are unprovisioned to prepare them for provisioning. You can perform manual cleaning on specific nodes as required. Node cleaning has two modes:
About this task
- Metadata only clean: Removes partitions from all disks on the node. The metadata only mode of cleaning is faster than a full clean, but less secure because it erases only partition tables. Use this mode only on trusted tenant environments.
- Full clean: Removes all data from all disks, using either ATA secure erase or by shredding. A full clean can take several hours to complete.
Procedure
-
Access the remote shell for the
OpenStackClient pod from your workstation:
$ oc rsh -n openstack openstackclient
-
Check the current state of the node:
$ openstack baremetal node show \
-f value -c provision_state <node>
- Replace
<node> with the name or UUID of the node to clean.
-
If the node is not in the
manageable state, then set it to manageable:
$ openstack baremetal node manage <node>
-
Clean the node:
$ openstack baremetal node clean <node> \
--clean-steps '[{"interface": "deploy", "step": "<clean_mode>"}]'
- Replace
<node> with the name or UUID of the node to clean.
- Replace
<clean_mode> with the type of cleaning to perform on the node:
erase_devices: Performs a full clean.erase_devices_metadata: Performs a metadata only clean.
-
Wait for the clean to complete, then check the status of the node:
manageable: The clean was successful, and the node is ready to provision.
clean failed: The clean was unsuccessful. Inspect the last_error field for the cause of failure.
-
Exit the
openstackclient pod: