- Bare metal configuration
- About the BareMetalHost resource
- Getting the BareMetalHost resource
- About the HostFirmwareSettings resource
- Getting the HostFirmwareSettings resource
- Editing the HostFirmwareSettings resource
- Verifying the HostFirmware Settings resource is valid
- About the FirmwareSchema resource
- Getting the FirmwareSchema resource
Bare metal configuration
When deploying OKD on bare metal hosts, there are times when you need to make changes to the host either before or after provisioning. This can include inspecting the host’s hardware, firmware, and BIOS details. It can also include formatting disks or changing modifiable BIOS settings. There are two resources that you can use with the Bare Metal Operator (BMO):
BareMetalHost
HostFirmwareSettings
There is also a read-only FirmwareSchema
resource, which you can use to determine the valid values that you can send to a host when making changes to host firmware settings.
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:
The
BareMetalHost
specThe
BareMetalHost
status
The BareMetalHost spec
The spec
section of the BareMetalHost
resource defines the desired state of the host.
Parameters | Description |
---|---|
| An interface to enable or disable automated cleaning during provisioning and de-provisioning. When set to |
| The
|
| The MAC address of the NIC used for provisioning the host. |
| The boot mode of the host. It defaults to |
| 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 |
| A human-provided string to help identify the host. |
| A boolean indicating whether the host provisioning and deprovisioning are managed externally. When set:
|
| Contains information about the BIOS configuration of bare metal hosts. Currently,
|
| The
|
| 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. |
| A boolean indicating whether the host should be powered on ( |
| (Optional) Contains the information about the RAID configuration for bare metal hosts. If not specified, it retains the current configuration. Currently,
You can set the
If you receive an error message indicating that the driver does not support RAID, set the |
| The
|
The BareMetalHost status
The BareMetalHost
status represents the host’s current state, and includes tested credentials, current hardware details, and other information.
Parameters | Description |
---|---|
| 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. |
| Details of the last error reported by the provisioning backend, if any. |
| Indicates the class of problem that has caused the host to enter an error state. The error types are:
|
| The
|
| Contains BIOS firmware information. For example, the hardware vendor and version. |
| The
|
| The host’s amount of memory in Mebibytes (MiB). |
| The
|
| Contains information about the host’s |
| The timestamp of the last time the status of the host was updated. |
| The status of the server. The status is one of the following:
|
| Boolean indicating whether the host is powered on. |
| The
|
| A reference to the secret and its namespace holding the last set of BMC credentials that were sent to the provisioning backend. |
Getting the BareMetalHost resource
The BareMetalHost
resource contains the properties of a physical host. You must get the BareMetalHost
resource for a physical host to review its properties.
Procedure
Get the list of
BareMetalHost
resources:$ oc get bmh -n openshift-machine-api -o yaml
You can use
baremetalhost
as the long form ofbmh
withoc get
command.Get the list of hosts:
$ oc get bmh -n openshift-machine-api
Get the
BareMetalHost
resource for a specific host:$ oc get bmh <host_name> -n openshift-machine-api -o yaml
Where
<host_name>
is the name of the host.Example output
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
creationTimestamp: "2019-09-20T06:33:35Z"
finalizers:
- baremetalhost.metal3.io
generation: 2
name: bmo-controlplane-0
namespace: bmo-project
resourceVersion: "22642"
selfLink: /apis/metal3.io/v1alpha1/namespaces/bmo-project/baremetalhosts/bmo-controlplane-0
uid: 92b2f77a-db70-11e9-9db1-525400764849
spec:
bmc:
address: ipmi://10.10.57.19
credentialsName: bmo-controlplane-0-bmc-secret
bootMACAddress: 98:03:9b:61:80:48
consumerRef:
apiVersion: machine.openshift.io/v1beta1
kind: Machine
name: bmo-controlplane-0
namespace: bmo-project
externallyProvisioned: true
hardwareProfile: default
image:
checksum: http://172.16.1.100/images/myOSv1/myOS.qcow2.md5sum
url: http://172.16.1.100/images/myOSv1/myOS.qcow2
online: true
raid:
hardwareRAIDVolumes:
- level: "1"
sizeGibibytes: 200
rotational: true
firmware:
virtualizationEnabled: true
userData:
name: bmo-controlplane-user-data
namespace: bmo-project
networkData:
name: bmo-controlplane-network-data
namespace: bmo-project
metaData:
name: bmo-controlplane-meta-data
namespace: bmo-project
status:
errorMessage: ""
goodCredentials:
credentials:
name: bmo-controlplane-0-bmc-secret
namespace: bmo-project
credentialsVersion: "5562"
hardware:
cpu:
arch: x86_64
clockMegahertz: 2000
count: 40
flags: []
model: Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz
firmware:
bios:
date: 12/17/2018
vendor: Dell Inc.
version: 1.6.13
hostname: bmo-controlplane-0.localdomain
nics:
- ip: 172.22.135.105
mac: "00:00:00:00:00:00"
model: unknown
name: eno1
pxe: true
speedGbps: 25
vlanId: 0
ramMebibytes: 0
storage: []
systemVendor:
manufacturer: Dell Inc.
productName: PowerEdge r460
serialNumber: ""
hardwareProfile: ""
lastUpdated: "2019-09-20T07:03:23Z"
operationalStatus: OK
poweredOn: true
provisioning:
ID: a4438010-3fc6-4c5c-b570-900bbe85da57
image:
checksum: ""
url: ""
state: externally provisioned
triedCredentials:
credentials:
name: bmo-controlplane-0-bmc-secret
namespace: bmo-project
credentialsVersion: "5562"
About the HostFirmwareSettings resource
You can use the HostFirmwareSettings
resource to retrieve and manage the BIOS settings for a host. When a host moves to the Available
state, Ironic reads the host’s BIOS settings and creates the HostFirmwareSettings
resource. The resource contains the complete BIOS configuration returned from the baseboard management controller (BMC). Whereas, the firmware
field in the BareMetalHost
resource returns three vendor-independent fields, the HostFirmwareSettings
resource typically comprises many BIOS settings of vendor-specific fields per host.
The HostFirmwareSettings
resource contains two sections:
The
HostFirmwareSettings
spec.The
HostFirmwareSettings
status.
The HostFirmwareSettings
spec
The spec
section of the HostFirmwareSettings
resource defines the desired state of the host’s BIOS, and it is empty by default. Ironic uses the settings in the spec.settings
section to update the baseboard management controller (BMC) when the host is in the Preparing
state. Use the FirmwareSchema
resource to ensure that you do not send invalid name/value pairs to hosts. See “About the FirmwareSchema resource” for additional details.
Example
spec:
settings:
ProcTurboMode: Disabled(1)
1 | In the foregoing example, the spec.settings section contains a name/value pair that will set the ProcTurboMode BIOS setting to Disabled . |
Integer parameters listed in the |
The HostFirmwareSettings
status
The status
represents the current state of the host’s BIOS.
Parameters | Description |
---|---|
| The
|
| The
|
| The |
Getting the HostFirmwareSettings resource
The HostFirmwareSettings
resource contains the vendor-specific BIOS properties of a physical host. You must get the HostFirmwareSettings
resource for a physical host to review its BIOS properties.
Procedure
Get the detailed list of
HostFirmwareSettings
resources:$ oc get hfs -n openshift-machine-api -o yaml
You can use
hostfirmwaresettings
as the long form ofhfs
with theoc get
command.Get the list of
HostFirmwareSettings
resources:$ oc get hfs -n openshift-machine-api
Get the
HostFirmwareSettings
resource for a particular host$ oc get hfs <host_name> -n openshift-machine-api -o yaml
Where
<host_name>
is the name of the host.
Editing the HostFirmwareSettings resource
You can edit the HostFirmwareSettings
of provisioned hosts.
You can only edit hosts in the |
Procedure
Get the list of
HostFirmwareSettings
resources:$ oc get hfs -n openshift-machine-api
Edit a host’s
HostFirmwareSettings
resource:$ oc edit hfs <host_name> -n openshift-machine-api
Where
<host_name>
is the name of a provisioned host. TheHostFirmwareSettings
resource will open in the default editor for your terminal.Add name/value pairs to the
spec.settings
section:Example
spec:
settings:
name: value (1)
1 Use the FirmwareSchema
resource to identify the available settings for the host. You cannot set values that are read-only.Save the changes and exit the editor.
Get the host’s machine name:
$ oc get bmh <host_name> -n openshift-machine name
Where
<host_name>
is the name of the host. The machine name appears under theCONSUMER
field.Annotate the machine to delete it from the machineset:
$ oc annotate machine <machine_name> machine.openshift.io/cluster-api-delete-machine=yes -n openshift-machine-api
Where
<machine_name>
is the name of the machine to delete.Get a list of nodes and count the number of worker nodes:
$ oc get nodes
Get the machineset:
$ oc get machinesets -n openshift-machine-api
Scale the machineset:
$ oc scale machineset <machineset_name> -n openshift-machine-api --replicas=<n-1>
Where
<machineset_name>
is the name of the machineset and<n-1>
is the decremented number of worker nodes.When the host enters the
Available
state, scale up the machineset to make theHostFirmwareSettings
resource changes take effect:$ oc scale machineset <machineset_name> -n openshift-machine-api --replicas=<n>
Where
<machineset_name>
is the name of the machineset and<n>
is the number of worker nodes.
Verifying the HostFirmware Settings resource is valid
When the user edits the spec.settings
section to make a change to the HostFirmwareSetting
(HFS) resource, the Bare Metal Operator (BMO) validates the change against the FimwareSchema
resource, which is a read-only resource. If the setting is invalid, the BMO will set the Type
value of the status.Condition
setting to False
and also generate an event and store it in the HFS resource. Use the following procedure to verify that the resource is valid.
Procedure
Get a list of
HostFirmwareSetting
resources:$ oc get hfs -n openshift-machine-api
Verify that the
HostFirmwareSettings
resource for a particular host is valid:$ oc describe hfs <host_name> -n openshift-machine-api
Where
<host_name>
is the name of the host.Example output
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal ValidationFailed 2m49s metal3-hostfirmwaresettings-controller Invalid BIOS setting: Setting ProcTurboMode is invalid, unknown enumeration value - Foo
If the response returns
ValidationFailed
, there is an error in the resource configuration and you must update the values to conform to theFirmwareSchema
resource.
About the FirmwareSchema resource
BIOS settings vary among hardware vendors and host models. A FirmwareSchema
resource is a read-only resource that contains the types and limits for each BIOS setting on each host model. The data comes directly from the BMC through Ironic. The FirmwareSchema
enables you to identify valid values you can specify in the spec
field of the HostFirmwareSettings
resource. The FirmwareSchema
resource has a unique identifier derived from its settings and limits. Identical host models use the same FirmwareSchema
identifier. It is likely that multiple instances of HostFirmwareSettings
use the same FirmwareSchema
.
Parameters | Description |
---|---|
| The
|
Getting the FirmwareSchema resource
Each host model from each vendor has different BIOS settings. When editing the HostFirmwareSettings
resource’s spec
section, the name/value pairs you set must conform to that host’s firmware schema. To ensure you are setting valid name/value pairs, get the FirmwareSchema
for the host and review it.
Procedure
To get a list of
FirmwareSchema
resource instances, execute the following:$ oc get firmwareschema -n openshift-machine-api
To get a particular
FirmwareSchema
instance, execute:$ oc get firmwareschema <instance_name> -n openshift-machine-api -o yaml
Where
<instance_name>
is the name of the schema instance stated in theHostFirmwareSettings
resource (see Table 3).