Skip to content

Commit 5ae5062

Browse files
committed
HCIDOCS-652: Made updates and clarifying remarks for live updates..
1 parent 03bfd3f commit 5ae5062

8 files changed

+153
-131
lines changed

installing/installing_bare_metal/ipi/ipi-install-post-installation-configuration.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ include::modules/bmo-getting-the-hostfirmwaresettings-resource.adoc[leveloffset=
4747
// Editing the HostFirmwareSettings resource
4848
include::modules/bmo-editing-the-hostfirmwaresettings-resource-of-a-provisioned-host.adoc[leveloffset=+2]
4949
// Patching the HostFirmawareSettings resource
50-
include::modules/bmo-patching-the-hostfirmwaresettings-resource.adoc[leveloffset=+2]
50+
include::modules/bmo-performing-a-live-update-to-the-hostfirmwaresettings-resource.adoc[leveloffset=+2]
5151
// Verifying the HostFirmware Settings resource is valid
5252
include::modules/bmo-verifying-the-hostfirmware-settings-resource-is-valid.adoc[leveloffset=+2]
5353
// About the FirmwareSchema resource
@@ -61,7 +61,7 @@ include::modules/bmo-getting-the-hostfirmwarecomponents-resource.adoc[leveloffse
6161
// Editing the HostFirmwareComponents resource
6262
include::modules/bmo-editing-the-hostfirmwarecomponents-resource-of-a-provisioned-host.adoc[leveloffset=+2]
6363
// Patching the HostFirmawareComponents resource
64-
include::modules/bmo-patching-the-hostfirmwarecomponents-resource.adoc[leveloffset=+2]
64+
include::modules/bmo-performing-a-live-update-to-the-hostfirmwarecomponents-resource.adoc[leveloffset=+2]
6565
// About the HostUpdatePolicy resource
6666
include::modules/bmo-about-the-hostupdatepolicy-resource.adoc[leveloffset=+2]
6767
// Setting the HostUpdatePolicy resource

modules/bmo-editing-the-hostfirmwarecomponents-resource-of-a-provisioned-host.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ $ oc get hostfirmwarecomponents -n openshift-machine-api -o yaml
2020
+
2121
[source,terminal]
2222
----
23-
$ oc edit <host_name> hostfirmwarecomponents -n openshift-machine-api <1>
23+
$ oc edit <hostname> hostfirmwarecomponents -n openshift-machine-api <1>
2424
----
25-
<1> Where `<host_name>` is the name of the host. The `HostFirmwareComponents` resource will open in the default editor for your terminal.
25+
<1> Where `<hostname>` is the name of the host. The `HostFirmwareComponents` resource will open in the default editor for your terminal.
2626

2727
. Make the appropriate edits.
2828
+

modules/bmo-editing-the-hostfirmwaresettings-resource-of-a-provisioned-host.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
To make changes to the `HostFirmwareSettings` spec for a provisioned host, perform the following actions:
1010

11+
* Edit the host `HostFirmwareSettings` resource.
1112
* Delete the host from the machine set.
1213
* Scale down the machine set.
1314
* Scale up the machine set to make the changes take effect.
@@ -30,10 +31,10 @@ $ oc get hfs -n openshift-machine-api
3031
+
3132
[source,terminal]
3233
----
33-
$ oc edit hfs <host_name> -n openshift-machine-api
34+
$ oc edit hfs <hostname> -n openshift-machine-api
3435
----
3536
+
36-
Where `<host_name>` is the name of a provisioned host. The `HostFirmwareSettings` resource will open in the default editor for your terminal.
37+
Where `<hostname>` is the name of a provisioned host. The `HostFirmwareSettings` resource will open in the default editor for your terminal.
3738

3839
. Add name and value pairs to the `spec.settings` section by running the following command:
3940
+
@@ -48,14 +49,14 @@ spec:
4849

4950
. Save the changes and exit the editor.
5051

51-
. Get the host's machine name by running the following command:
52+
. Get the host machine name by running the following command:
5253
+
5354
[source,terminal]
5455
----
55-
$ oc get bmh <host_name> -n openshift-machine name
56+
$ oc get bmh <hostname> -n openshift-machine name
5657
----
5758
+
58-
Where `<host_name>` is the name of the host. The terminal displays the machine name under the `CONSUMER` field.
59+
Where `<hostname>` is the name of the host. The terminal displays the machine name under the `CONSUMER` field.
5960
6061
. Annotate the machine to delete it from the machine set by running the following command:
6162
+

modules/bmo-patching-the-hostfirmwarecomponents-resource.adoc

Lines changed: 0 additions & 62 deletions
This file was deleted.

modules/bmo-patching-the-hostfirmwaresettings-resource.adoc

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// This is included in the following assemblies:
2+
//
3+
// * installing/installing_bare_metal/ipi/ipi-install-post-installation-configuration.adoc
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="bmo-performing-a-live-update-to-the-hostfirmwarecomponents-resource_{context}"]
6+
= Performing a live update to the HostFirmwareComponents resource
7+
8+
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.
9+
10+
:FeatureName: Live updating a host
11+
include::snippets/technology-preview.adoc[]
12+
:!FeatureName:
13+
14+
[IMPORTANT]
15+
====
16+
Do not perform live updates on production hosts. You can perform live updates to the BIOS for testing purposes. We do not recommend that you perform live updates to the BMC on {product-title} {product-version} for test purposes, especially on earlier generation hardware.
17+
====
18+
19+
.Prerequisites
20+
21+
* The `HostUpdatePolicy` resource must have the `firmwareUpdates` parameter set to `onReboot`.
22+
23+
.Procedure
24+
25+
. Update the `HostFirmwareComponents` resource by running the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc patch hostfirmwarecomponents <hostname> --type merge -p \// <1>
30+
'{"spec": {"updates": [{"component": "<type>", \// <2>
31+
"url": "<url>"}]}}' <3>
32+
----
33+
<1> Replace `<hostname>` with the name of the host.
34+
<2> Replace `<type>` with the type of component. Specify `bios` or `bmc`.
35+
<3> Replace `<url>` with the URL for the component.
36+
+
37+
[NOTE]
38+
====
39+
You can also use the `oc edit <hostname> hostfirmwarecomponents -n openshift-machine-api` command to update the resource.
40+
====
41+
42+
. Cordon and drain the node by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc drain <node_name> --force <1>
47+
----
48+
<1> Replace `<node_name>` with the name of the node.
49+
50+
. Power off the host for a period of 5 minutes by running the following command:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": false}}'
55+
----
56+
+
57+
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.
58+
59+
. After 5 minutes, power on the host by running the following command:
60+
+
61+
[source,terminal]
62+
----
63+
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": true}}'
64+
----
65+
+
66+
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.
67+
68+
. Uncordon the node by running the following command:
69+
+
70+
[source,terminal]
71+
----
72+
$ oc uncordon <node_name>
73+
----
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// This is included in the following assemblies:
2+
//
3+
// * installing/installing_bare_metal/ipi/ipi-install-post-installation-configuration.adoc
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="bmo-performing-a-live-update-to-the-hostfirmwaresettings-resource_{context}"]
6+
= Performing a live update to the HostFirmwareSettings resource
7+
8+
You can perform a live update to the `HostFirmareSettings` resource after it has begun running workloads. Live updates do not trigger deprovisioning and reprovisioning the host.
9+
10+
:FeatureName: Live updating a host
11+
include::snippets/technology-preview.adoc[]
12+
:!FeatureName:
13+
14+
.Prerequisites
15+
16+
* The `HostUpdatePolicy` resource must the have `firmwareSettings` parameter set to `onReboot`.
17+
18+
.Procedure
19+
20+
. Update the `HostFirmwareSettings` resource by running the following command:
21+
+
22+
[source,terminal]
23+
----
24+
$ oc patch hostfirmwaresettings <hostname> --type merge -p \// <1>
25+
'{"spec": {"settings": {"<name>": "<value>"}}}' <2>
26+
----
27+
<1> Replace `<hostname>` with the name of the host.
28+
<2> Replace `<name>` with the name of the setting. Replace `<value>` with the value of the setting. You can set multiple name-value pairs.
29+
+
30+
[NOTE]
31+
====
32+
Get the `FirmwareSchema` resource to determine which settings the hardware supports and what settings and values you can update. You cannot update read-only values and you cannot update the `FirmwareSchema` resource. You can also use the `oc edit <hostname> hostfirmwaresettings -n openshift-machine-api` command to update the `HostFirmwareSettings` resource.
33+
====
34+
35+
. Cordon and drain the node by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc drain <node_name> --force <1>
40+
----
41+
<1> Replace `<node_name>` with the name of the node.
42+
43+
. Power off the host for a period of 5 minutes by running the following command:
44+
+
45+
[source,terminal]
46+
----
47+
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": false}}'
48+
----
49+
+
50+
This step ensures that daemonsets or controllers can mark any infrastructure pods that might be running on the host as offline, while the remaining hosts handle incoming requests.
51+
52+
. After 5 minutes, power on the host by running the following command:
53+
+
54+
[source,terminal]
55+
----
56+
$ oc patch bmh <hostname> --type merge -p '{"spec": {"online": true}}'
57+
----
58+
+
59+
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.
60+
61+
. Once Ironic completes the update and the host powers up, uncordon the node by running the following command:
62+
+
63+
[source,terminal]
64+
----
65+
$ oc uncordon <node_name>
66+
----

modules/bmo-setting-the-hostupdatepolicy-resource.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
By default, the `HostUpdatePolicy` disables live updates. To enable live updates, use the following procedure.
1010

11+
:FeatureName: Setting the `HostUpdatePolicy` resource
12+
include::snippets/technology-preview.adoc[]
13+
:!FeatureName:
14+
1115
.Procedure
1216

1317
. Create the `HostUpdatePolicy` resource by running the following command:

0 commit comments

Comments
 (0)