Skip to content

Latest commit

 

History

History
316 lines (247 loc) · 14.8 KB

bmo-about-the-baremetalhost-resource.adoc

File metadata and controls

316 lines (247 loc) · 14.8 KB

About the BareMetalHost resource

Metal3 introduces the concept of the BareMetalHost resource, which defines a physical host and its properties. The BareMetalHost resource contains two sections:

  1. The BareMetalHost spec

  2. The BareMetalHost status

The BareMetalHost spec

The spec section of the BareMetalHost resource defines the desired state of the host.

Table 1. BareMetalHost spec
Parameters Description

automatedCleaningMode

An interface to enable or disable automated cleaning during provisioning and de-provisioning. When set to disabled, it skips automated cleaning. When set to metadata, automated cleaning is enabled. The default setting is metadata.

bmc:
  address:
  credentialsName:
  disableCertificateVerification:

The bmc configuration setting contains the connection information for the baseboard management controller (BMC) on the host. The fields are:

  • address: The URL for communicating with the host’s BMC controller.

  • credentialsName: A reference to a secret containing the username and password for the BMC.

  • disableCertificateVerification: A boolean to skip certificate validation when set to true.

bootMACAddress

The MAC address of the NIC used for provisioning the host.

bootMode

The boot mode of the host. It defaults to UEFI, but it can also be set to legacy for BIOS boot, or UEFISecureBoot.

consumerRef

A reference to another resource that is using the host. It could be empty if another resource is not currently using the host. For example, a Machine resource might use the host when the machine-api is using the host.

description

A human-provided string to help identify the host.

externallyProvisioned

A boolean indicating whether the host provisioning and deprovisioning are managed externally. When set:

  • Power status can still be managed using the online field.

  • Hardware inventory will be monitored, but no provisioning or deprovisioning operations are performed on the host.

firmware

Contains information about the BIOS configuration of bare metal hosts. Currently, firmware is only supported by iRMC, iDRAC, iLO4 and iLO5 BMCs. The sub fields are:

  • simultaneousMultithreadingEnabled: Allows a single physical processor core to appear as several logical processors. Valid settings are true or false.

  • sriovEnabled: SR-IOV support enables a hypervisor to create virtual instances of a PCI-express device, potentially increasing performance. Valid settings are true or false.

  • virtualizationEnabled: Supports the virtualization of platform hardware. Valid settings are true or false.

image:
  url:
  checksum:
  checksumType:
  format:

The image configuration setting holds the details for the image to be deployed on the host. Ironic requires the image fields. However, when the externallyProvisioned configuration setting is set to true and the external management doesn’t require power control, the fields can be empty. The fields are:

  • url: The URL of an image to deploy to the host.

  • checksum: The actual checksum or a URL to a file containing the checksum for the image at image.url.

  • checksumType: You can specify checksum algorithms. Currently image.checksumType only supports md5, sha256, and sha512. The default checksum type is md5.

  • format: This is the disk format of the image. It can be one of raw, qcow2, vdi, vmdk, live-iso or be left unset. Setting it to raw enables raw image streaming in the Ironic agent for that image. Setting it to live-iso enables iso images to live boot without deploying to disk, and it ignores the checksum fields.

networkData

A reference to the secret containing the network configuration data and its namespace, so that it can be attached to the host before the host boots to set up the network.

online

A boolean indicating whether the host should be powered on (true) or off (false). Changing this value will trigger a change in the power state of the physical host.

raid:
  hardwareRAIDVolumes:
  softwareRAIDVolumes:

(Optional) Contains the information about the RAID configuration for bare metal hosts. If not specified, it retains the current configuration. Currently, raid is only supported by iRMC, iDRAC, and iLO5 BMCs. The fields are:

  • hardwareRAIDVolumes: Contains the list of logical drives for hardware RAID, and defines the desired volume configuration in the hardware RAID. If you don’t specify rootDeviceHints, the first volume is the root volume. The sub-fields are:

    • level: The RAID level for the logical drive. The following levels are supported: 0,1,2,5,6,1+0,5+0,6+0.

    • name: The name of the volume as a string. It should be unique within the server. If not specified, the volume name will be auto-generated.

    • numberOfPhysicalDisks: The number of physical drives as an integer to use for the logical drove. Defaults to the minimum number of disk drives required for the particular RAID level.

    • physicalDisks: The list of names of physical disk drives as a string. This is an optional field. If specified, the controller field must be specified too.

    • controller: (Optional) The name of the RAID controller as a string to use in the hardware RAID volume.

    • rotational: If set to true, it will only select rotational disk drives. If set to false, it will only select solid-state and NVMe drives. If not set, it selects any drive types, which is the default behavior.

    • sizeGibibytes: The size of the logical drive as an integer to create in GiB. If unspecified or set to 0, it will use the maximum capacity of physical drive for the logical drive.

  • softwareRAIDVolumes: Contains the list of logical disks for software RAID. If you don’t specify rootDeviceHints, the first volume is the root volume. If you set HardwareRAIDVolumes, this item will be invalid. Software RAIDs will always be deleted. The number of created software RAID devices must be 1 or 2. If there is only one software RAID device, it must be RAID-1. If there are two RAID devices, the first device must be RAID-1, while the RAID level for the second device can be 0, 1, or 1+0. The first RAID device will be the deployment device. Therefore, enforcing RAID-1 reduces the risk of a non-booting node in case of a device failure. The softwareRAIDVolume field defines the desired configuration of the volume in the software RAID. The sub-fields are:

    • level: The RAID level for the logical drive. The following levels are supported: 0,1,1+0.

    • physicalDisks: A list of device hints. The number of items should be greater than or equal to 2.

    • sizeGibibytes: The size of the logical disk drive as an integer to be created in GiB. If unspecified or set to 0, it will use the maximum capacity of physical drive for logical drive.

You can set the hardwareRAIDVolume as an empty slice to clear the hardware RAID configuration. For example:

spec:
   raid:
     hardwareRAIDVolume: []

If you receive an error message indicating that the driver does not support RAID, set the raid, hardwareRAIDVolumes or softwareRAIDVolumes to nil. You might need to ensure the host has a RAID controller.

rootDeviceHints:
  deviceName:
  hctl:
  model:
  vendor:
  serialNumber:
  minSizeGigabytes:
  wwn:
  wwnWithExtension:
  wwnVendorExtension:
  rotational:

The rootDeviceHints parameter enables provisioning of the {op-system} image to a particular device. It examines the devices in the order it discovers them, and compares the discovered values with the hint values. It uses the first discovered device that matches the hint value. The configuration can combine multiple hints, but a device must match all hints to get selected. The fields are:

  • deviceName: A string containing a Linux device name like /dev/vda. The hint must match the actual value exactly.

  • hctl: A string containing a SCSI bus address like 0:0:0:0. The hint must match the actual value exactly.

  • model: A string containing a vendor-specific device identifier. The hint can be a substring of the actual value.

  • vendor: A string containing the name of the vendor or manufacturer of the device. The hint can be a sub-string of the actual value.

  • serialNumber: A string containing the device serial number. The hint must match the actual value exactly.

  • minSizeGigabytes: An integer representing the minimum size of the device in gigabytes.

  • wwn: A string containing the unique storage identifier. The hint must match the actual value exactly.

  • wwnWithExtension: A string containing the unique storage identifier with the vendor extension appended. The hint must match the actual value exactly.

  • wwnVendorExtension: A string containing the unique vendor storage identifier. The hint must match the actual value exactly.

  • rotational: A boolean indicating whether the device should be a rotating disk (true) or not (false).

The BareMetalHost status

The BareMetalHost status represents the host’s current state, and includes tested credentials, current hardware details, and other information.

Table 2. BareMetalHost status
Parameters Description

goodCredentials

A reference to the secret and its namespace holding the last set of baseboard management controller (BMC) credentials the system was able to validate as working.

errorMessage

Details of the last error reported by the provisioning backend, if any.

errorType

Indicates the class of problem that has caused the host to enter an error state. The error types are:

  • provisioned registration error: Occurs when the controller is unable to re-register an already provisioned host.

  • registration error: Occurs when the controller is unable to connect to the host’s baseboard management controller.

  • inspection error: Occurs when an attempt to obtain hardware details from the host fails.

  • preparation error: Occurs when cleaning fails.

  • provisioning error: Occurs when the controller fails to provision or deprovision the host.

  • power management error: Occurs when the controller is unable to modify the power state of the host.

  • detach error: Occurs when the controller is unable to detatch the host from the provisioner.

hardware:
  cpu
    arch:
    model:
    clockMegahertz:
    flags:
    count:

The hardware.cpu field details of the CPU(s) in the system. The fields include:

  • arch: The architecture of the CPU.

  • model: The CPU model as a string.

  • clockMegahertz: The speed in MHz of the CPU.

  • flags: The list of CPU flags. For example, 'mmx','sse','sse2','vmx' etc.

  • count: The number of CPUs available in the system.

hardware:
  firmware:

Contains BIOS firmware information. For example, the hardware vendor and version.

hardware:
  nics:
  - ip:
    name:
    mac:
    speedGbps:
    vlans:
    vlanId:
    pxe:

The hardware.nics field contains a list of network interfaces for the host. The fields include:

  • ip: The IP address of the NIC, if one was assigned when the discovery agent ran.

  • name: A string identifying the network device. For example, nic-1.

  • mac: The MAC address of the NIC.

  • speedGbps: The speed of the device in Gbps.

  • vlans: A list holding all the VLANs available for this NIC.

  • vlanId: The untagged VLAN ID.

  • pxe: Whether the NIC is able to boot using PXE.

hardware:
  ramMebibytes:

The host’s amount of memory in Mebibytes (MiB).

hardware:
  storage:
  - name:
    rotational:
    sizeBytes:
    serialNumber:

The hardware.storage field contains a list of storage devices available to the host. The fields include:

  • name: A string identifying the storage device. For example, disk 1 (boot).

  • rotational: Indicates whether the disk is rotational, and returns either true or false.

  • sizeBytes: The size of the storage device.

  • serialNumber: The device’s serial number.

hardware:
  systemVendor:
    manufacturer:
    productName:
    serialNumber:

Contains information about the host’s manufacturer, the productName, and the serialNumber.

lastUpdated

The timestamp of the last time the status of the host was updated.

operationalStatus

The status of the server. The status is one of the following:

  • OK: Indicates all the details for the host are known, correctly configured, working, and manageable.

  • discovered: Implies some of the host’s details are either not working correctly or missing. For example, the BMC address is known but the login credentials are not.

  • error: Indicates the system found some sort of irrecoverable error. Refer to the errorMessage field in the status section for more details.

  • delayed: Indicates that provisioning is delayed to limit simultaneous provisioning of multiple hosts.

  • detached: Indicates the host is marked unmanaged.

poweredOn

Boolean indicating whether the host is powered on.

provisioning:
  state:
  id:
  image:
  raid:
  firmware:
  rootDeviceHints:

The provisioning field contains values related to deploying an image to the host. The sub-fields include:

  • state: The current state of any ongoing provisioning operation. The states include:

    • <empty string>: There is no provisioning happening at the moment.

    • unmanaged: There is insufficient information available to register the host.

    • registering: The agent is checking the host’s BMC details.

    • match profile: The agent is comparing the discovered hardware details on the host against known profiles.

    • available: The host is available for provisioning. This state was previously known as ready.

    • preparing: The existing configuration will be removed, and the new configuration will be set on the host.

    • provisioning: The provisioner is writing an image to the host’s storage.

    • provisioned: The provisioner wrote an image to the host’s storage.

    • externally provisioned: Metal3 does not manage the image on the host.

    • deprovisioning: The provisioner is wiping the image from the host’s storage.

    • inspecting: The agent is collecting hardware details for the host.

    • deleting: The agent is deleting the from the cluster.

  • id: The unique identifier for the service in the underlying provisioning tool.

  • image: The image most recently provisioned to the host.

  • raid: The list of hardware or software RAID volumes recently set.

  • firmware: The BIOS configuration for the bare metal server.

  • rootDeviceHints: The root device selection instructions used for the most recent provisioning operation.

triedCredentials

A reference to the secret and its namespace holding the last set of BMC credentials that were sent to the provisioning backend.