Skip to content

Safeguards

Cleaning safeguards

Ironic allows users to list disks which should not be touched during cleaning, choosing root device, etc.

To use this feature, one must have a way of identifying the disks in question - ideally by WWN. The identifiers are used as hints in a property of the baremetal node called skip_block_devices. For each disk (or group of disks) to be untouched by Ironic, one must create a dictionary of hints (same hints as for root device hints), for example:

{'wwn': '0x5002e10000000000'}

or for multiple disks

{'vendor': ‘'Oxlaf4', ‘size': '>100'}

The property skip_block_devices is then a list of these dictionaries and can look, for example, as follows:

'skip_block_devices': [{'wwn': '0x5002e10000000001'}, {‘wwn': '0x5002e10000000002'}]

The command to set the example property above would be

openstack baremetal node set --property 'skip_block_devices'='[{"wwn":"0x5002e10000000001"},{"wwn":"0x5002e10000000001"}]' $NODE

Note, the property needs to be a list of dictionaries even if it contains one dictionary.

For example, the following property applies to all disks larger than 900 GB:

openstack baremetal node set --property 'skip_block_devices'='[{"size":"> 900"}]' $NODE

RAID safeguards

To protect logical disks from cleaning, they have to have a volume name specified in the target RAID config, such as:

{
  "logical_disks": [
    {
      "size_gb": 100,
      "raid_level": "1",
      "controller": "software",
      "volume_name": "root"
    },
    {
      "size_gb": "MAX",
      "raid_level": "1",
      "controller": "software",
      "volume_name": "data"
    }
  ]
}

More about target RAID config options can be found in the upstream docs.

Then you can use the volume name to protect the logical disk as follows:

'skip_block_devices': [{'volume_name': 'data'}]

which can be set with a command similar to the one above:

openstack baremetal node set --property 'skip_block_devices'='[{"volume_name": "data"}]' $NODE