1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/bmo-performing-a-live-update-to-the-hostfirmwarecomponents-resource.adoc
2026-01-27 15:12:12 +00:00

84 lines
3.0 KiB
Plaintext

// This is included in the following assemblies:
//
// * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adocbare-metal-postinstallation-configuration.adoc
:_mod-docs-content-type: PROCEDURE
[id="bmo-performing-a-live-update-to-the-hostfirmwarecomponents-resource_{context}"]
= Performing a live update to the HostFirmwareComponents resource
[role="_abstract"]
You can perform a live update to the `HostFirmwareComponents` resource on an already provisioned host. Live updates do not trigger deprovisioning and reprovisioning the host.
[WARNING]
====
Performing a live update to the `HostFirmwareComponents` resource can be a destructive and destabilizing action. Perform these updates only after careful consideration.
Before you apply a live update in a production cluster, validate the update in a development or test cluster. Ensure that these updates comply with your organization's test policies before you apply them to a production cluster.
If a cluster has fewer than three compute nodes, use caution. Firmware updates in such clusters can result in the cluster entering a degraded state.
Do not interrupt firmware updates. If the update stops responding, engage the support of your hardware vendor.
====
.Prerequisites
* The `HostUpdatePolicy` resource must have the `firmwareUpdates` parameter set to `onReboot`.
.Procedure
. Update the `HostFirmwareComponents` resource by running the following command:
+
[source,terminal]
----
$ oc patch hostfirmwarecomponents <hostname> --type merge -p \
'{"spec": {"updates": [{"component": "<type>", \
"url": "<url>"}]}}'
----
+
where:
`<hostname>`:: Specifies the name of the host.
`<type>`:: Specifies the type of component, either `bios` or `bmc`.
`<url>`:: Specifies the URL for the component.
+
[NOTE]
====
You can also use the `oc edit <hostname> hostfirmwarecomponents -n openshift-machine-api` command to update the resource.
====
. Cordon and drain the node by running the following command:
+
[source,terminal]
----
$ oc drain <node_name> --force
----
+
Replace `<node_name>` with the name of the node.
. Power off the host for a period of 5 minutes by running the following command:
+
[source,terminal]
----
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": false}}'
----
+
This step ensures that daemonsets or controllers mark any infrastructure pods that might be running on the node as offline, while the remaining nodes handle incoming requests.
. After 5 minutes, power on the host by running the following command:
+
[source,terminal]
----
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": true}}'
----
+
The servicing operation commences and the Bare Metal Operator (BMO) sets the `operationalStatus` parameter of the `BareMetalHost` to `servicing`. The BMO updates the `operationalStatus` parameter to `OK` after updating the resource. If an error occurs, the BMO updates the `operationalStatus` parameter to `error` and retries the operation.
. Uncordon the node by running the following command:
+
[source,terminal]
----
$ oc uncordon <node_name>
----